mumuki-classroom 9.10.0 → 9.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c7c30f98fc529ad7681905d65157b251efaa4256fc5f50da76c73212f9e5889
4
- data.tar.gz: 16818b3647a79814fa5d46f023d418684c0a3bcf377398eb2676089fe5732dae
3
+ metadata.gz: 21100d727f3476b29cc15aeef88c865f5db3d9511ab35266fe7aec351887acdd
4
+ data.tar.gz: c66715863408dd7d29ba365c5b20870670184e42c6d172f1469ae2e5764362f2
5
5
  SHA512:
6
- metadata.gz: 26c327aadd834edb574873bf59c9ef46da06685112495eda3b9fcd04baf636a5bec47513ff723b5f54178b7eb0cf97833a2ce9e8bf765a147da97c7809e59fd3
7
- data.tar.gz: 2178af3c7ce54d9a91951d9fca695c1f2290d66e8b7413a7f8e8d923e78ee22af14a270c06bf156bf0c59f05fe7b0b873b09a62b1331537a1322e0f2134543f8
6
+ metadata.gz: c384e134cee58e6f5a652e1b738267fbb6e6f6f435020bb4c39523b054dc0313d5f7cfe33c5c97592b36210391463f933b32ddf461b79948095c6bfe64455284
7
+ data.tar.gz: c98ab00391692542fde27f389dc8610d82e9b4381f27becf74687b379e1389528acadc34c145a35afa9cc110f74f176fac13ddc308d8e969b8f153746094b66b
@@ -52,7 +52,9 @@ class Mumuki::Classroom::App < Sinatra::Application
52
52
  post '/courses/:course/students/:uid/detach' do
53
53
  authorize! :janitor
54
54
  Mumuki::Classroom::Student.find_by!(with_organization_and_course uid: uid).detach!
55
- update_user_permissions!(uid, 'remove', course_slug)
55
+ update_user_permissions!(uid, 'remove', course_slug) do |user|
56
+ user.make_ex_student_of! course_slug if user.solved_any_exercises?
57
+ end
56
58
  {status: :updated}
57
59
  end
58
60
 
@@ -143,6 +143,7 @@ class Mumuki::Classroom::App < Sinatra::Application
143
143
  def update_user_permissions!(uid, method, *slugs)
144
144
  user = User.locate!(uid)
145
145
  user.send("#{method}_permission!", :student, *slugs)
146
+ yield user if block_given?
146
147
  user.save!
147
148
  end
148
149
 
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Classroom
3
- VERSION = '9.10.0'
3
+ VERSION = '9.14.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-classroom
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.10.0
4
+ version: 9.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-29 00:00:00.000000000 Z
11
+ date: 2021-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 9.10.0
89
+ version: 9.14.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 9.10.0
96
+ version: 9.14.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: mumukit-login
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -199,9 +199,6 @@ dependencies:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '2.0'
202
- - - "<"
203
- - !ruby/object:Gem::Version
204
- version: '2.2'
205
202
  type: :development
206
203
  prerelease: false
207
204
  version_requirements: !ruby/object:Gem::Requirement
@@ -209,9 +206,6 @@ dependencies:
209
206
  - - "~>"
210
207
  - !ruby/object:Gem::Version
211
208
  version: '2.0'
212
- - - "<"
213
- - !ruby/object:Gem::Version
214
- version: '2.2'
215
209
  description: Teacher tools for Mumuki
216
210
  email:
217
211
  - franco@mumuki.org