mumuki-domain 7.4.0 → 7.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/contextualization.rb +3 -7
- data/app/models/concerns/submittable/solvable.rb +1 -1
- data/app/models/stats.rb +2 -2
- data/lib/mumuki/domain/status/submission/skipped.rb +0 -4
- data/lib/mumuki/domain/status/submission/submission.rb +5 -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: 68dc581849f150d3c0a958f3a1df2b25b4959b3ee71a595364cf2ac7533fbd25
|
4
|
+
data.tar.gz: dc6a6e467c80e08d035ccc70c7ace81ffdabb41088564350220f76706738332a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d852df438a75e07817d1b01769559faf0a68b7c892a4423b7ee0a97a04153439388904b544a19562597015c2f613596a8236d87205aedaf86304d9141f7992ea
|
7
|
+
data.tar.gz: aeb1db5771206c8de35da5e9d03395f5029ce7dcec4d5b643d65365f4d1ef01e5159ffc66038bc056300bc9f9f103549ff029bcbb7b22c08fc2b47270b7aecb8
|
@@ -25,7 +25,7 @@ module Contextualization
|
|
25
25
|
|
26
26
|
delegate :visible_success_output?, to: :exercise
|
27
27
|
delegate :output_content_type, to: :language
|
28
|
-
delegate :should_retry?, :to_submission_status, :completed?, *Mumuki::Domain::Status::Submission.test_selectors, to: :submission_status
|
28
|
+
delegate :should_retry?, :to_submission_status, :completed?, :solved?, *Mumuki::Domain::Status::Submission.test_selectors, to: :submission_status
|
29
29
|
delegate :inspection_keywords, to: :exercise
|
30
30
|
end
|
31
31
|
|
@@ -44,11 +44,7 @@ module Contextualization
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def results_body_hidden?
|
47
|
-
(passed? && !visible_success_output?) || exercise.choice? || manual_evaluation_pending?
|
48
|
-
end
|
49
|
-
|
50
|
-
def result_preview
|
51
|
-
result.truncate(100) unless passed?
|
47
|
+
(passed? && !visible_success_output?) || exercise.choice? || manual_evaluation_pending? || skipped?
|
52
48
|
end
|
53
49
|
|
54
50
|
def visible_status
|
@@ -68,7 +64,7 @@ module Contextualization
|
|
68
64
|
end
|
69
65
|
|
70
66
|
def failed_expectation_results
|
71
|
-
expectation_results.to_a.select { |it| it[:result].failed? }
|
67
|
+
expectation_results.to_a.select { |it| it[:result].failed? }.uniq
|
72
68
|
end
|
73
69
|
|
74
70
|
def expectation_results_visible?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Solvable
|
2
2
|
def submit_solution!(user, attributes={})
|
3
3
|
assignment, _ = find_assignment_and_submit! user, attributes[:content].to_mumuki_solution(language)
|
4
|
-
try_solve_discussions(user) if assignment.
|
4
|
+
try_solve_discussions(user) if assignment.solved?
|
5
5
|
assignment
|
6
6
|
end
|
7
7
|
|
data/app/models/stats.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Stats
|
2
2
|
include ActiveModel::Model
|
3
3
|
|
4
|
-
attr_accessor :passed, :passed_with_warnings, :failed, :pending
|
4
|
+
attr_accessor :passed, :passed_with_warnings, :failed, :pending, :skipped
|
5
5
|
|
6
6
|
def submitted
|
7
7
|
passed + passed_with_warnings + failed
|
@@ -16,7 +16,7 @@ class Stats
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.from_statuses(statuses)
|
19
|
-
Stats.new(statuses.inject({passed: 0, passed_with_warnings: 0, failed: 0, pending: 0}) do |accum, status|
|
19
|
+
Stats.new(statuses.inject({passed: 0, passed_with_warnings: 0, failed: 0, pending: 0, skipped: 0}) do |accum, status|
|
20
20
|
accum[status.group.to_sym] += 1
|
21
21
|
accum
|
22
22
|
end)
|
@@ -23,8 +23,6 @@ module Mumuki::Domain::Status::Submission
|
|
23
23
|
self
|
24
24
|
end
|
25
25
|
|
26
|
-
# Tells if a new, different submission should be tried.
|
27
|
-
# True for `failed`, `errored` and `passed_with_warnings`
|
28
26
|
def should_retry?
|
29
27
|
false
|
30
28
|
end
|
@@ -38,6 +36,10 @@ module Mumuki::Domain::Status::Submission
|
|
38
36
|
end
|
39
37
|
|
40
38
|
def completed?
|
41
|
-
|
39
|
+
solved?
|
40
|
+
end
|
41
|
+
|
42
|
+
def solved?
|
43
|
+
passed? || skipped?
|
42
44
|
end
|
43
45
|
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.4.
|
4
|
+
version: 7.4.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-04-
|
11
|
+
date: 2020-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|