mumuki-domain 7.9.0 → 7.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/user.rb +4 -0
- data/lib/mumuki/domain/incognito.rb +4 -0
- data/lib/mumuki/domain/organization/settings.rb +12 -3
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad60eb8f13c6f52972aa84b4ebf50135ba135516b1585bc62f40207f07996adc
|
|
4
|
+
data.tar.gz: 10dc84895d41a0ee5f78e43ed9a8aa6d4acaade45241d43de3228dee2050eb1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2457634d76eb4c1023af5c05915a7150aa9425ce77b03b10f073872fc3e9db6edfa071c7937b74bbb315db4f105c3a8006bd2085ed7fce0020811deab750a450
|
|
7
|
+
data.tar.gz: 221ec0189f3dfa9d62df6beb258a046e2f327d90133109ef88c8e937e383f7473fa2dc5c54f65d5c81448a180a2450e172270b096bc0729fbbacc3233484096d
|
data/app/models/user.rb
CHANGED
|
@@ -190,6 +190,10 @@ class User < ApplicationRecord
|
|
|
190
190
|
can_discuss_in? Organization.current
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
+
def can_access_teacher_info_in?(organization)
|
|
194
|
+
teacher_of?(organization) || organization.teacher_training?
|
|
195
|
+
end
|
|
196
|
+
|
|
193
197
|
def name_initials
|
|
194
198
|
name.split.map(&:first).map(&:capitalize).join(' ')
|
|
195
199
|
end
|
|
@@ -8,6 +8,7 @@ class Mumuki::Domain::Organization::Settings < Mumukit::Platform::Model
|
|
|
8
8
|
:forum_enabled?,
|
|
9
9
|
:forum_only_for_trusted?,
|
|
10
10
|
:gamification_enabled?,
|
|
11
|
+
:greet_new_users?,
|
|
11
12
|
:immersive?,
|
|
12
13
|
:in_preparation_until,
|
|
13
14
|
:login_methods,
|
|
@@ -16,7 +17,7 @@ class Mumuki::Domain::Organization::Settings < Mumukit::Platform::Model
|
|
|
16
17
|
:public?,
|
|
17
18
|
:raise_hand_enabled?,
|
|
18
19
|
:report_issue_enabled?,
|
|
19
|
-
:
|
|
20
|
+
:teacher_training?
|
|
20
21
|
|
|
21
22
|
def private?
|
|
22
23
|
!public?
|
|
@@ -30,11 +31,19 @@ class Mumuki::Domain::Organization::Settings < Mumukit::Platform::Model
|
|
|
30
31
|
(@forum_discussions_minimal_role || 'student').to_sym
|
|
31
32
|
end
|
|
32
33
|
|
|
34
|
+
def disabled_from=(disabled_from)
|
|
35
|
+
@disabled_from = disabled_from.to_time
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def in_preparation_until=(in_preparation_until)
|
|
39
|
+
@in_preparation_until = in_preparation_until.to_time
|
|
40
|
+
end
|
|
41
|
+
|
|
33
42
|
def disabled?
|
|
34
|
-
disabled_from.present? && disabled_from
|
|
43
|
+
disabled_from.present? && disabled_from < Time.now
|
|
35
44
|
end
|
|
36
45
|
|
|
37
46
|
def in_preparation?
|
|
38
|
-
in_preparation_until.present? && in_preparation_until
|
|
47
|
+
in_preparation_until.present? && in_preparation_until > Time.now
|
|
39
48
|
end
|
|
40
49
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mumuki-domain
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.9.
|
|
4
|
+
version: 7.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Franco Leonardo Bulgarelli
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-09-
|
|
11
|
+
date: 2020-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|