mumuki-classroom 9.9.0 → 9.13.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: 1e4a51f37b4783b82d331992f9b51e614bcfcdf83b2f0122bbad8560f538266e
4
- data.tar.gz: c2bbccce37491aa950344ff30797b1e49d45b975eb1497e7f1dff5464da09aa8
3
+ metadata.gz: 4fd2b74d132c1d49644bc0d6c4d95e53949faae022207c633546eb5ddcdf1975
4
+ data.tar.gz: 74a3af3038a4731cd54ba5ac261cc2f834ff4d829b34fa58ecb4ab6a2cebfb8a
5
5
  SHA512:
6
- metadata.gz: a0dd537fa0c2fc989d78ef24365add61b690b2df2723dae1c64f3cd1b276647a2f6a22df4a3d39965920ae4ccc15483ee0a855027ba64ebfc75ac90d5818111b
7
- data.tar.gz: aff846456542b15d791451de4b969a3b7101bc8436237c57e9abebfa49b365260f2f0cb04eaf1ccbc0552788c246c746c1b4b401f16f7dd48d0b4e046befba72
6
+ metadata.gz: 8001ad450e397310cf5777e500c175d391e661046a14db6fc4450b07494b0a634517939f7c48834a5a2768a50dd087088b2458272d5598c9bccb4b180a71e299
7
+ data.tar.gz: 662643cdb94e5caee3277b1e88cec6dc23b96082b9972383aeb5ac71c0def5a627307110c7f42ff4f09428882ebef6e2697fe3b097a25e7bcc0ba10ab67f9cba
@@ -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
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Classroom
3
- VERSION = '9.9.0'
3
+ VERSION = '9.13.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.9.0
4
+ version: 9.13.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-15 00:00:00.000000000 Z
11
+ date: 2021-08-19 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.9.0
89
+ version: 9.13.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.9.0
96
+ version: 9.13.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