mumuki-domain 7.6.1 → 7.8.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/assignment.rb +2 -0
- data/app/models/book.rb +4 -2
- data/app/models/concerns/contextualization.rb +1 -1
- data/app/models/concerns/navigation/siblings_navigation.rb +2 -2
- data/app/models/concerns/submittable/solvable.rb +9 -3
- data/app/models/concerns/submittable/submittable.rb +1 -1
- data/app/models/concerns/with_assignments.rb +1 -1
- data/app/models/concerns/with_discussions.rb +9 -6
- data/app/models/concerns/with_layout.rb +5 -1
- data/app/models/concerns/with_progress.rb +1 -1
- data/app/models/concerns/with_scoped_queries.rb +9 -9
- data/app/models/concerns/with_scoped_queries/page.rb +1 -1
- data/app/models/concerns/with_scoped_queries/sort.rb +6 -1
- data/app/models/course.rb +13 -7
- data/app/models/discussion.rb +51 -13
- data/app/models/exam.rb +53 -23
- data/app/models/exam/passing_criterion.rb +53 -0
- data/app/models/exercise/challenge.rb +1 -1
- data/app/models/exercise/problem.rb +6 -0
- data/app/models/exercise/reading.rb +4 -0
- data/app/models/guide.rb +1 -1
- data/app/models/invitation.rb +7 -1
- data/app/models/message.rb +28 -4
- data/app/models/organization.rb +7 -11
- data/app/models/user.rb +64 -0
- data/db/migrate/20200601203033_add_course_to_exam.rb +5 -0
- data/db/migrate/20200605161350_add_passing_criterions_to_exam.rb +6 -0
- data/db/migrate/20200702165503_add_messages_count_to_discussion.rb +6 -0
- data/db/migrate/20200728162727_add_not_actually_a_question_field_to_messages.rb +5 -0
- data/db/migrate/20200728163038_add_requires_moderator_response_to_discussions.rb +5 -0
- data/db/migrate/20200730221001_add_trusted_for_forum_to_user.rb +5 -0
- data/db/migrate/20200731081757_add_last_moderator_access_fields_to_discussion.rb +6 -0
- data/db/migrate/20200804191643_add_incognito_mode_enabled_to_organization.rb +5 -0
- data/lib/mumuki/domain.rb +1 -0
- data/lib/mumuki/domain/factories/course_factory.rb +2 -0
- data/lib/mumuki/domain/factories/discussion_factory.rb +2 -2
- data/lib/mumuki/domain/factories/exam_factory.rb +1 -0
- data/lib/mumuki/domain/factories/message_factory.rb +1 -6
- data/lib/mumuki/domain/incognito.rb +112 -0
- data/lib/mumuki/domain/locales/activerecord/es-CL.yml +59 -0
- data/lib/mumuki/domain/locales/console_submission/es-CL.yml +3 -0
- data/lib/mumuki/domain/organization/profile.rb +2 -1
- data/lib/mumuki/domain/organization/settings.rb +12 -9
- data/lib/mumuki/domain/status/discussion/discussion.rb +0 -8
- data/lib/mumuki/domain/submission/base.rb +11 -1
- data/lib/mumuki/domain/submission/solution.rb +3 -1
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +19 -8
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
es-CL:
|
3
|
+
activerecord:
|
4
|
+
attributes:
|
5
|
+
exercise:
|
6
|
+
description: Descripción
|
7
|
+
extra: Biblioteca
|
8
|
+
hint: Ayudas
|
9
|
+
language: Lenguaje
|
10
|
+
locale: Idioma
|
11
|
+
tag_list: Etiquetas
|
12
|
+
title: Título
|
13
|
+
guide:
|
14
|
+
description: Descripción
|
15
|
+
github_repository: Repositorio Github
|
16
|
+
language: Lenguaje
|
17
|
+
locale: Idioma
|
18
|
+
name: Nombre
|
19
|
+
submission:
|
20
|
+
content: Contenido
|
21
|
+
errors:
|
22
|
+
models:
|
23
|
+
guide:
|
24
|
+
attributes:
|
25
|
+
base:
|
26
|
+
in_use: 'La guía aún está siendo utilizada en la organización %{organization}'
|
27
|
+
topic:
|
28
|
+
attributes:
|
29
|
+
base:
|
30
|
+
in_use: 'El tema aún está siendo utilizado en la organización %{organization}'
|
31
|
+
exercise:
|
32
|
+
attributes:
|
33
|
+
randomizations:
|
34
|
+
invalid_format: 'formato inválido'
|
35
|
+
own_expectations:
|
36
|
+
invalid_format: 'formato inválido'
|
37
|
+
assistance_rules:
|
38
|
+
invalid_format: 'formato inválido'
|
39
|
+
name:
|
40
|
+
invalid_format: 'no debe contener /'
|
41
|
+
base:
|
42
|
+
evaluation_criteria_required: 'Tienes que proveer tests y/o expectativas'
|
43
|
+
organization:
|
44
|
+
attributes:
|
45
|
+
base:
|
46
|
+
consistent_public_login: 'Una organización pública no puede restringir los métodos de login'
|
47
|
+
invalid_activity_range: 'La fecha de inhabilitación no puede ser anterior a la de inicio del recorrido'
|
48
|
+
models:
|
49
|
+
exercise:
|
50
|
+
one: Ejercicio
|
51
|
+
other: Ejercicios
|
52
|
+
chapter:
|
53
|
+
one: Capítulo
|
54
|
+
other: Capítulos
|
55
|
+
guide: Guía
|
56
|
+
language: Lenguaje
|
57
|
+
submission:
|
58
|
+
one: Solución
|
59
|
+
other: Soluciones
|
@@ -1,19 +1,22 @@
|
|
1
1
|
class Mumuki::Domain::Organization::Settings < Mumukit::Platform::Model
|
2
2
|
include Mumukit::Login::LoginSettingsHelpers
|
3
3
|
|
4
|
-
model_attr_accessor :
|
4
|
+
model_attr_accessor :disabled_from,
|
5
|
+
:embeddable?,
|
6
|
+
:feedback_suggestions_enabled?,
|
7
|
+
:forum_discussions_minimal_role,
|
8
|
+
:forum_enabled?,
|
9
|
+
:forum_only_for_trusted?,
|
10
|
+
:gamification_enabled?,
|
11
|
+
:immersive?,
|
12
|
+
:in_preparation_until,
|
13
|
+
:login_methods,
|
5
14
|
:login_provider,
|
6
15
|
:login_provider_settings,
|
7
|
-
:forum_discussions_minimal_role,
|
8
|
-
:raise_hand_enabled?,
|
9
|
-
:feedback_suggestions_enabled?,
|
10
16
|
:public?,
|
11
|
-
:
|
12
|
-
:immersive?,
|
13
|
-
:forum_enabled?,
|
17
|
+
:raise_hand_enabled?,
|
14
18
|
:report_issue_enabled?,
|
15
|
-
:
|
16
|
-
:in_preparation_until
|
19
|
+
:greet_new_users?
|
17
20
|
|
18
21
|
def private?
|
19
22
|
!public?
|
@@ -14,10 +14,6 @@ module Mumuki::Domain::Status::Discussion
|
|
14
14
|
define_method(selector) { false }
|
15
15
|
end
|
16
16
|
|
17
|
-
def allowed_for?(*)
|
18
|
-
true
|
19
|
-
end
|
20
|
-
|
21
17
|
def reachable_statuses_for_moderator(*)
|
22
18
|
[]
|
23
19
|
end
|
@@ -38,10 +34,6 @@ module Mumuki::Domain::Status::Discussion
|
|
38
34
|
end
|
39
35
|
end
|
40
36
|
|
41
|
-
def allowed_statuses_for(user, discussion)
|
42
|
-
STATUSES.select { |it| it.allowed_for?(user, discussion) }
|
43
|
-
end
|
44
|
-
|
45
37
|
def as_json(_options={})
|
46
38
|
to_s
|
47
39
|
end
|
@@ -9,6 +9,7 @@ class Mumuki::Domain::Submission::Base
|
|
9
9
|
:submission_id, :queries, :query_results, :manual_evaluation_comment]
|
10
10
|
|
11
11
|
attr_accessor *ATTRIBUTES
|
12
|
+
attr_accessor :client_result
|
12
13
|
|
13
14
|
def self.from_attributes(*args)
|
14
15
|
new ATTRIBUTES.zip(args).to_h
|
@@ -20,12 +21,21 @@ class Mumuki::Domain::Submission::Base
|
|
20
21
|
|
21
22
|
def run!(assignment, evaluation)
|
22
23
|
save_submission! assignment
|
23
|
-
results =
|
24
|
+
results = dry_run! assignment, evaluation
|
24
25
|
save_results! results, assignment
|
25
26
|
notify_results! results, assignment
|
26
27
|
results
|
27
28
|
end
|
28
29
|
|
30
|
+
def dry_run!(assignment, evaluation)
|
31
|
+
evaluation.evaluate! assignment, self
|
32
|
+
end
|
33
|
+
|
34
|
+
def with_client_result(result)
|
35
|
+
self.client_result = result if result.present?
|
36
|
+
self
|
37
|
+
end
|
38
|
+
|
29
39
|
def evaluate!(assignment)
|
30
40
|
try_evaluate! assignment
|
31
41
|
rescue => e
|
@@ -2,6 +2,8 @@ class Mumuki::Domain::Submission::Solution < Mumuki::Domain::Submission::Persist
|
|
2
2
|
attr_accessor :content
|
3
3
|
|
4
4
|
def try_evaluate!(assignment)
|
5
|
-
assignment
|
5
|
+
assignment
|
6
|
+
.run_tests!({client_result: client_result}.compact.merge(content: content))
|
7
|
+
.except(:response_type)
|
6
8
|
end
|
7
9
|
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
|
+
version: 7.8.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-
|
11
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '7.
|
33
|
+
version: '7.8'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '7.
|
40
|
+
version: '7.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mumukit-assistant
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '5.
|
131
|
+
version: '5.2'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '5.
|
138
|
+
version: '5.2'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: mumukit-sync
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -299,6 +299,7 @@ files:
|
|
299
299
|
- app/models/discussion.rb
|
300
300
|
- app/models/event.rb
|
301
301
|
- app/models/exam.rb
|
302
|
+
- app/models/exam/passing_criterion.rb
|
302
303
|
- app/models/exam_authorization.rb
|
303
304
|
- app/models/exercise.rb
|
304
305
|
- app/models/exercise/challenge.rb
|
@@ -604,7 +605,15 @@ files:
|
|
604
605
|
- db/migrate/20200508191543_create_avatars.rb
|
605
606
|
- db/migrate/20200518135658_add_avatar_to_users.rb
|
606
607
|
- db/migrate/20200527180729_add_disabled_at_to_users.rb
|
608
|
+
- db/migrate/20200601203033_add_course_to_exam.rb
|
609
|
+
- db/migrate/20200605161350_add_passing_criterions_to_exam.rb
|
607
610
|
- db/migrate/20200608132959_add_progressive_display_lookahead_to_organizations.rb
|
611
|
+
- db/migrate/20200702165503_add_messages_count_to_discussion.rb
|
612
|
+
- db/migrate/20200728162727_add_not_actually_a_question_field_to_messages.rb
|
613
|
+
- db/migrate/20200728163038_add_requires_moderator_response_to_discussions.rb
|
614
|
+
- db/migrate/20200730221001_add_trusted_for_forum_to_user.rb
|
615
|
+
- db/migrate/20200731081757_add_last_moderator_access_fields_to_discussion.rb
|
616
|
+
- db/migrate/20200804191643_add_incognito_mode_enabled_to_organization.rb
|
608
617
|
- lib/mumuki/domain.rb
|
609
618
|
- lib/mumuki/domain/area.rb
|
610
619
|
- lib/mumuki/domain/engine.rb
|
@@ -649,10 +658,13 @@ files:
|
|
649
658
|
- lib/mumuki/domain/helpers/course.rb
|
650
659
|
- lib/mumuki/domain/helpers/organization.rb
|
651
660
|
- lib/mumuki/domain/helpers/user.rb
|
661
|
+
- lib/mumuki/domain/incognito.rb
|
652
662
|
- lib/mumuki/domain/locales/activerecord/en.yml
|
663
|
+
- lib/mumuki/domain/locales/activerecord/es-CL.yml
|
653
664
|
- lib/mumuki/domain/locales/activerecord/es.yml
|
654
665
|
- lib/mumuki/domain/locales/activerecord/pt.yml
|
655
666
|
- lib/mumuki/domain/locales/console_submission/en.yml
|
667
|
+
- lib/mumuki/domain/locales/console_submission/es-CL.yml
|
656
668
|
- lib/mumuki/domain/locales/console_submission/es.yml
|
657
669
|
- lib/mumuki/domain/locales/console_submission/pt.yml
|
658
670
|
- lib/mumuki/domain/organization.rb
|
@@ -714,8 +726,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
714
726
|
- !ruby/object:Gem::Version
|
715
727
|
version: '0'
|
716
728
|
requirements: []
|
717
|
-
|
718
|
-
rubygems_version: 2.7.7
|
729
|
+
rubygems_version: 3.0.8
|
719
730
|
signing_key:
|
720
731
|
specification_version: 4
|
721
732
|
summary: Mumuki Platform's Domain Model
|