mumuki-classroom 9.12.0 → 9.16.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: 7537e413e2d2f0ebaddf1999edaaa17c6857f033a07f6b46a5059d3cf4880d21
4
- data.tar.gz: 1a643d034c8c954648859c159f807c627266a0500a69d57741ebfa67cf853c52
3
+ metadata.gz: 6d9090ff650a5cea81124fdffc96d00fe6c308fe9069f4952c4ba2b0b27b1b7c
4
+ data.tar.gz: 01ad126ad907237af1ad96d6598e27dbcf0f8c87f510878f60aaa4dbd0562449
5
5
  SHA512:
6
- metadata.gz: ca7e5b33b4a1ebea9a1157ea9fbf54ce5b8c148c600b0f1571caceb92f1e0fc306e3cec7cdd219fa31f753838ec3a036a5af9f248d98602d16fa20286693ccc1
7
- data.tar.gz: 66a8b36bdd9fe94388670ee3d727c9d1c015e73593546dc2990640f14bae476368bf59a2b22232ab97ad92fc1406d74e3198f902ae1cd4bf745d0fae4d4bdfc1
6
+ metadata.gz: 7b69b1e38ced1d557df2c5dbf238300b5aeb99ae7d901ce6b2852cbd6c71cc77883262bb401208a81486e6f60f901cf86684d828a00414ba117eba32342a3084
7
+ data.tar.gz: e9501973a53c75f951f994fc1fddf9e41cafcd4b140fee01150ce2c6e0cdfba732995596379cfa7c6f1163b58f5e7cf576672679cfc7203699781bba80effcdf
@@ -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.12.0'
3
+ VERSION = '9.16.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.12.0
4
+ version: 9.16.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-08-12 00:00:00.000000000 Z
11
+ date: 2021-09-16 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.12.0
89
+ version: 9.16.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.12.0
96
+ version: 9.16.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