mumuki-domain 9.0.6 → 9.1.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: 03cf2d9f0764fe073de42e72cbb94233949692b8e5ef60b97afeca431d374719
4
- data.tar.gz: 5db8d1777ae3622bf9673b09f9bc06322ffc46af56780f4a47fc19e5f77462f9
3
+ metadata.gz: 3d165cf9f919009ff75f9b6287e01df473ff786089c553651d0841911afb7375
4
+ data.tar.gz: 6b746d09af5ab93422f9bd8091a0fb5d809f74422fb4ec6b6c4847af86896451
5
5
  SHA512:
6
- metadata.gz: a3abfa44040d80767963218a039bc1eea419921bffb8a4efbd8908bff4b1d5b395cf9c4d10d1844978ee71caa9d2f783d045f4e3f365e68c69a680c930b9b08f
7
- data.tar.gz: ec63d6c11722ac7dc29c6d58af654fc3dc72ed71fdc387555e60ac71d1711cf893016aaa16c55903d85c5ad961cff7aa0206dd642074f7e5a5fc6f14a246336a
6
+ metadata.gz: 396f0b0743fd5d44e4bc5bea7b8e8ffedd34932df9f98b29334cef334ff6361fbdc769e81deec7213aaa1ad684acb627ca52ddf68bc3e6b88019d1195470f278
7
+ data.tar.gz: 901f97fe4f6f6d1b8a6b916b9d90339d350d796d9c3e3f8b9a3c01bf9770a707a145370be8162eabcfa03490a2dff4cf77236de8ffc43ee2cc7d7414429f2743
@@ -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
- #TODO reestablish this after indicators reliably linked to assignments
16
- # def pending_siblings_for(user, organization=Organization.current)
17
- # siblings.reject { |it| it.progress_for(user, organization).completed? }
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
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '9.0.6'
3
+ VERSION = '9.1.0'
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: 9.0.6
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-09 00:00:00.000000000 Z
11
+ date: 2021-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails