mumuki-domain 9.0.6 → 9.1.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d165cf9f919009ff75f9b6287e01df473ff786089c553651d0841911afb7375
|
|
4
|
+
data.tar.gz: 6b746d09af5ab93422f9bd8091a0fb5d809f74422fb4ec6b6c4847af86896451
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 396f0b0743fd5d44e4bc5bea7b8e8ffedd34932df9f98b29334cef334ff6361fbdc769e81deec7213aaa1ad684acb627ca52ddf68bc3e6b88019d1195470f278
|
|
7
|
+
data.tar.gz: 901f97fe4f6f6d1b8a6b916b9d90339d350d796d9c3e3f8b9a3c01bf9770a707a145370be8162eabcfa03490a2dff4cf77236de8ffc43ee2cc7d7414429f2743
|
data/app/models/chapter.rb
CHANGED
|
@@ -2,8 +2,8 @@ class Chapter < ApplicationRecord
|
|
|
2
2
|
include WithStats
|
|
3
3
|
include WithNumber
|
|
4
4
|
|
|
5
|
-
include SiblingsNavigation
|
|
6
5
|
include TerminalNavigation
|
|
6
|
+
include SiblingsNavigation
|
|
7
7
|
|
|
8
8
|
include FriendlyName
|
|
9
9
|
|
|
@@ -29,8 +29,4 @@ class Chapter < ApplicationRecord
|
|
|
29
29
|
def structural_parent
|
|
30
30
|
book
|
|
31
31
|
end
|
|
32
|
-
|
|
33
|
-
def pending_siblings_for(user)
|
|
34
|
-
book.pending_chapters(user)
|
|
35
|
-
end
|
|
36
32
|
end
|
|
@@ -12,10 +12,9 @@ module SiblingsNavigation
|
|
|
12
12
|
structural_parent.structural_children
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# end
|
|
15
|
+
def pending_siblings_for(user, organization=Organization.current)
|
|
16
|
+
siblings.reject { |it| it.progress_for(user, organization).completed? }
|
|
17
|
+
end
|
|
19
18
|
|
|
20
19
|
# Names
|
|
21
20
|
|
data/app/models/organization.rb
CHANGED
|
@@ -33,7 +33,7 @@ class Organization < ApplicationRecord
|
|
|
33
33
|
after_create :reindex_usages!
|
|
34
34
|
after_update :reindex_usages!, if: lambda { |user| user.saved_change_to_book_id? }
|
|
35
35
|
|
|
36
|
-
has_many :guides, through: 'usages', source: 'item', source_type: 'Guide'
|
|
36
|
+
has_many :guides, -> { where 'usages.parent_item_type' => 'Lesson' }, through: 'usages', source: 'item', source_type: 'Guide'
|
|
37
37
|
has_many :exercises, through: :guides
|
|
38
38
|
has_many :assignments, through: :exercises
|
|
39
39
|
has_many :exams
|
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: 9.0
|
|
4
|
+
version: 9.1.0
|
|
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: 2021-04-
|
|
11
|
+
date: 2021-04-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|