mumuki-classroom 9.11.0 → 9.15.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: 04441c1b1d2f8628e9c3c44a1ec045ee82bb05c1c501f3aaab4dca20ba1d72a8
4
- data.tar.gz: da3e6060d7baf4d351893e7692b1643958b6b0684e59663f0548620ca5a36eac
3
+ metadata.gz: 59b6dd39113863abdfaa2cbfba668de58f6e25db7388bed3fc99576ee56dbf31
4
+ data.tar.gz: 29b4818f46de3d10468f5a879e6814a722e735808b4a493dcdb5a4e34553c412
5
5
  SHA512:
6
- metadata.gz: 78921a569da9113781bb5aa8d015f8a3b6973255708090bffd749872800091262797b504bfc8d3ca6067255e1bbb0bf3fc8fc94a1228fab385fa79af7c471972
7
- data.tar.gz: e0cdb29d9609b2f0b5e1610d923ba422f1f30f022f721b381ccc405cd342c6da5f4591b64c7a65a877ba79311dd0e140870b57edec3fcdde4d91d5095cb8eff6
6
+ metadata.gz: 661c3313ae823623a9a324672fbcae3bcd383444a437771375beef267747bcf31f12601def1a4de57552c8bf8a3d840f5938b4fcb952d0076ab19b0c236b8bf6
7
+ data.tar.gz: fc126eaab4c7160198587a870e9b0768861568a7c1e5f08f96943b808a4c472f69a31a95c52d360400977074f74bebf8eeea210c8195ec9de8751becd36ba6fe
@@ -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.11.0'
3
+ VERSION = '9.15.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.11.0
4
+ version: 9.15.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-06 00:00:00.000000000 Z
11
+ date: 2021-09-09 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.11.0
89
+ version: 9.15.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.11.0
96
+ version: 9.15.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