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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4d324f2eb4b3e06fb42a0aabbbd007c4c828569899c89a789ad681432bb97ba
4
- data.tar.gz: 3f540fc72a7180e247ee11535316d977920872ecc888c77c7c68346eae0c276e
3
+ metadata.gz: ad60eb8f13c6f52972aa84b4ebf50135ba135516b1585bc62f40207f07996adc
4
+ data.tar.gz: 10dc84895d41a0ee5f78e43ed9a8aa6d4acaade45241d43de3228dee2050eb1f
5
5
  SHA512:
6
- metadata.gz: ac7828f09dec30a19e4f4b96bfcfb472fe7fcfc5b53aaeb81e4fb4f5b52533d10b462e9e923d2a2857cec7367cda7d40d6222bd8f8a105dfc84e394b35e552c5
7
- data.tar.gz: 40cede7e7ff373b1a3a170fbd6bf55bb40faf5c2a814af0849a698f2205a15bff49bca7ba5737577620c48265bad4e42d68e8b4befcb4bbb5d78f9ec82bf23fe
6
+ metadata.gz: 2457634d76eb4c1023af5c05915a7150aa9425ce77b03b10f073872fc3e9db6edfa071c7937b74bbb315db4f105c3a8006bd2085ed7fce0020811deab750a450
7
+ data.tar.gz: 221ec0189f3dfa9d62df6beb258a046e2f327d90133109ef88c8e937e383f7473fa2dc5c54f65d5c81448a180a2450e172270b096bc0729fbbacc3233484096d
@@ -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
@@ -44,6 +44,10 @@ module Mumuki::Domain
44
44
  false
45
45
  end
46
46
 
47
+ def can_access_teacher_info_in?(*)
48
+ false
49
+ end
50
+
47
51
  # ========
48
52
  # Visiting
49
53
  # ========
@@ -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
- :greet_new_users?
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.to_datetime < DateTime.now
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.to_datetime > DateTime.now
47
+ in_preparation_until.present? && in_preparation_until > Time.now
39
48
  end
40
49
  end
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '7.9.0'
3
+ VERSION = '7.9.1'
4
4
  end
5
5
  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.0
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 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails