mumuki-domain 9.2.0 → 9.2.1

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: fc8a965a85ae367436a825f12235e8ce3149baacb9e610d6f2801c97270cf603
4
- data.tar.gz: d1f59395e72b047031ff987e47e8a48a596aefd1c57d566480c4c7e33737d058
3
+ metadata.gz: 1f51de9222a3fb2a4f3a4e1f8498d90baf49b4b47b87662193510a601e5c7905
4
+ data.tar.gz: b12cf9c00c8b1a2e77e5f758205c89874de9c94e2e5ee8ac3f30f39f6210f272
5
5
  SHA512:
6
- metadata.gz: b9b535002f54d54cfd9487122943bd44e31a6563eda77f672fb3b78347b13bf2cecacc880c7999efa04ed3a028d1352f899764a0fd95cbc4f53f617e9f010904
7
- data.tar.gz: dbde9d021212f2fd8f6118df3a9f6585606e317b8b6d14acd0adb1190b834b8fdf63646ba1b2025db204e3424bcefe17c2491aa1c2f63cdeadd4b4b6a7bc798f
6
+ metadata.gz: d7ec4c49f78dde3d0422309cf38db8049909eba137b0d4c0ea6b0a27a5d7b475139a351e9c2e272771f9e2b8b59c42c00395511050e3c424369b118b3b23e3d6
7
+ data.tar.gz: 3bc5e9b62d860e7ec0092352be7ae556ae93c19a2e4173667e3ed8ff3576de8a2bd6bf07128808c64a3ad791c06d8bb358ddfe8d248766b08a3eb1ab54ad51b0
@@ -29,7 +29,7 @@ class Exercise < ApplicationRecord
29
29
  defaults { self.submissions_count = 0 }
30
30
 
31
31
  def self.default_scope
32
- where(manual_evaluation: false) if Organization.safe_current&.prevent_manual_evaluation_content
32
+ where(manual_evaluation: false) if hide_manual_evaluation?
33
33
  end
34
34
 
35
35
  alias_method :progress_for, :assignment_for
@@ -256,6 +256,10 @@ class Exercise < ApplicationRecord
256
256
  layouts.keys[0]
257
257
  end
258
258
 
259
+ def self.hide_manual_evaluation?
260
+ Organization.safe_current&.prevent_manual_evaluation_content
261
+ end
262
+
259
263
  def self.with_pending_assignments_for(user, relation)
260
264
  relation.
261
265
  joins("left join assignments assignments
@@ -266,6 +270,7 @@ class Exercise < ApplicationRecord
266
270
  #{Mumuki::Domain::Status::Submission::Passed.to_i},
267
271
  #{Mumuki::Domain::Status::Submission::ManualEvaluationPending.to_i}
268
272
  )").
269
- where('assignments.id is null')
273
+ where('assignments.id is null').
274
+ where(('exercises.manual_evaluation = false' if hide_manual_evaluation?))
270
275
  end
271
276
  end
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '9.2.0'
3
+ VERSION = '9.2.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: 9.2.0
4
+ version: 9.2.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: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails