mumuki-laboratory 5.5.0 → 5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/application/discussions.js +43 -0
- data/app/assets/stylesheets/application/_modules.scss +2 -0
- data/app/assets/stylesheets/application/modules/_checkboxes.scss +21 -8
- data/app/assets/stylesheets/application/modules/_discussion.scss +339 -0
- data/app/assets/stylesheets/application/modules/_pagination.scss +10 -0
- data/app/controllers/application_controller.rb +4 -9
- data/app/controllers/book_discussions_controller.rb +7 -0
- data/app/controllers/chapters_controller.rb +2 -0
- data/app/controllers/discussions_controller.rb +65 -0
- data/app/controllers/discussions_messages_controller.rb +25 -0
- data/app/controllers/exercises_controller.rb +1 -0
- data/app/controllers/guide_container_controller.rb +1 -0
- data/app/controllers/messages_controller.rb +1 -1
- data/app/controllers/users_controller.rb +1 -0
- data/app/helpers/application_helper.rb +7 -0
- data/app/helpers/assignment_result_helper.rb +10 -30
- data/app/helpers/breadcrumbs_helper.rb +7 -3
- data/app/helpers/contextualization_result_helper.rb +31 -0
- data/app/helpers/discussions_helper.rb +163 -0
- data/app/helpers/exercise_input_helper.rb +33 -5
- data/app/helpers/icons_helper.rb +20 -3
- data/app/helpers/messages_helper.rb +4 -0
- data/app/helpers/status_helper.rb +2 -2
- data/app/models/assignment.rb +31 -47
- data/app/models/book.rb +3 -0
- data/app/models/chapter.rb +2 -0
- data/app/models/concerns/contextualization.rb +85 -0
- data/app/models/concerns/submittable/solvable.rb +1 -0
- data/app/models/concerns/with_assignments.rb +1 -1
- data/app/models/concerns/with_discussion_creation.rb +9 -0
- data/app/models/concerns/with_discussion_creation/subscription.rb +33 -0
- data/app/models/concerns/with_discussion_creation/upvote.rb +28 -0
- data/app/models/concerns/with_discussion_status.rb +11 -0
- data/app/models/concerns/with_discussions.rb +23 -0
- data/app/models/concerns/with_randomizations.rb +34 -0
- data/app/models/concerns/with_scoped_queries.rb +47 -0
- data/app/models/concerns/with_scoped_queries/filter.rb +15 -0
- data/app/models/concerns/with_scoped_queries/page.rb +10 -0
- data/app/models/concerns/with_scoped_queries/sort.rb +47 -0
- data/app/models/discussion.rb +128 -0
- data/app/models/exercise.rb +10 -1
- data/app/models/guide.rb +1 -1
- data/app/models/message.rb +24 -3
- data/app/models/organization.rb +4 -0
- data/app/models/submission/confirmation.rb +1 -1
- data/app/models/submission/console_submission.rb +1 -1
- data/app/models/submission/submission.rb +13 -0
- data/app/models/subscription.rb +12 -0
- data/app/models/topic.rb +1 -1
- data/app/models/upvote.rb +4 -0
- data/app/models/user.rb +3 -2
- data/app/views/book_discussions/index.html.erb +23 -0
- data/app/views/chapters/show.html.erb +0 -1
- data/app/views/discussions/_message.html.erb +22 -0
- data/app/views/discussions/_message_container.html.erb +8 -0
- data/app/views/discussions/_new_message.html.erb +19 -0
- data/app/views/discussions/index.html.erb +30 -0
- data/app/views/discussions/show.html.erb +76 -0
- data/app/views/exercise_solutions/_contextualization_results.html.erb +21 -0
- data/app/views/exercise_solutions/_contextualization_results_container.html.erb +4 -0
- data/app/views/exercise_solutions/_expectations.html.erb +9 -3
- data/app/views/exercise_solutions/_kids_results.html.erb +1 -1
- data/app/views/exercise_solutions/_results.html.erb +21 -55
- data/app/views/exercise_solutions/_results_title.html.erb +2 -2
- data/app/views/exercises/_exercise_assignment.html.erb +20 -0
- data/app/views/exercises/_read_only.html.erb +104 -0
- data/app/views/exercises/show.html.erb +4 -20
- data/app/views/layouts/_discussions.html.erb +68 -0
- data/app/views/layouts/_kids.html.erb +9 -6
- data/app/views/layouts/_messages.html.erb +1 -1
- data/app/views/layouts/_result.html.erb +2 -2
- data/app/views/layouts/_test_results.html.erb +6 -6
- data/app/views/layouts/application.html.erb +10 -9
- data/app/views/layouts/exercise_inputs/forms/_form.html.erb +5 -6
- data/app/views/layouts/exercise_inputs/forms/_interactive_form.html.erb +5 -5
- data/app/views/layouts/exercise_inputs/forms/_kids_form.html.erb +9 -17
- data/app/views/layouts/exercise_inputs/forms/_playground_form.html.erb +5 -5
- data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +11 -11
- data/app/views/layouts/exercise_inputs/forms/_reading_form.html.erb +1 -1
- data/app/views/layouts/exercise_inputs/layouts/_input_bottom.html.erb +1 -1
- data/app/views/layouts/exercise_inputs/layouts/_input_kids.html.erb +7 -7
- data/app/views/layouts/exercise_inputs/layouts/_input_right.html.erb +1 -1
- data/app/views/layouts/exercise_inputs/read_only_editors/_code.html.erb +3 -0
- data/app/views/layouts/exercise_inputs/read_only_editors/_custom.html.erb +6 -0
- data/app/views/layouts/exercise_inputs/read_only_editors/_multiple_choice.html.erb +8 -0
- data/app/views/layouts/exercise_inputs/read_only_editors/_single_choice.html.erb +8 -0
- data/app/views/layouts/modals/_kids_context.html.erb +2 -2
- data/app/views/layouts/modals/_new_discussion.html.erb +27 -0
- data/app/views/users/show.html.erb +23 -3
- data/config/routes.rb +21 -1
- data/db/migrate/20180504173548_create_discussions.rb +12 -0
- data/db/migrate/20180504185845_add_discussion_id_to_message.rb +5 -0
- data/db/migrate/20180605143727_add_submission_to_discussion.rb +16 -0
- data/db/migrate/20180619182555_create_subscriptions.rb +9 -0
- data/db/migrate/20180702153442_create_upvotes.rb +8 -0
- data/db/migrate/20180702175220_add_upvotes_count_to_discussions.rb +5 -0
- data/db/migrate/20180704150839_rename_assignment_status_to_submission_status.rb +5 -0
- data/lib/mumuki/laboratory.rb +2 -0
- data/lib/mumuki/laboratory/controllers.rb +2 -1
- data/lib/mumuki/laboratory/controllers/content.rb +12 -0
- data/lib/mumuki/laboratory/controllers/notifications.rb +31 -0
- data/lib/mumuki/laboratory/controllers/results_rendering.rb +1 -1
- data/lib/mumuki/laboratory/engine.rb +0 -2
- data/lib/mumuki/laboratory/evaluation/manual.rb +1 -1
- data/lib/mumuki/laboratory/locales/en.yml +37 -1
- data/lib/mumuki/laboratory/locales/es.yml +42 -1
- data/lib/mumuki/laboratory/locales/pt.yml +33 -1
- data/lib/mumuki/laboratory/status.rb +51 -44
- data/lib/mumuki/laboratory/status/discussion/closed.rb +15 -0
- data/lib/mumuki/laboratory/status/discussion/discussion.rb +56 -0
- data/lib/mumuki/laboratory/status/discussion/opened.rb +27 -0
- data/lib/mumuki/laboratory/status/discussion/pending_review.rb +15 -0
- data/lib/mumuki/laboratory/status/discussion/solved.rb +19 -0
- data/lib/mumuki/laboratory/status/submission/aborted.rb +11 -0
- data/lib/mumuki/laboratory/status/submission/errored.rb +15 -0
- data/lib/mumuki/laboratory/status/{failed.rb → submission/failed.rb} +2 -2
- data/lib/mumuki/laboratory/status/submission/manual_evaluation_pending.rb +15 -0
- data/lib/mumuki/laboratory/status/{passed.rb → submission/passed.rb} +2 -2
- data/lib/mumuki/laboratory/status/{passed_with_warnings.rb → submission/passed_with_warnings.rb} +2 -2
- data/lib/mumuki/laboratory/status/submission/pending.rb +11 -0
- data/lib/mumuki/laboratory/status/submission/running.rb +11 -0
- data/lib/mumuki/laboratory/status/submission/submission.rb +49 -0
- data/lib/mumuki/laboratory/status/{unknown.rb → submission/unknown.rb} +2 -2
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/controllers/chapters_controller_spec.rb +17 -0
- data/spec/controllers/discussions_controller_spec.rb +19 -0
- data/spec/dummy/config/environments/development.rb +0 -2
- data/spec/dummy/config/environments/test.rb +0 -2
- data/spec/dummy/db/schema.rb +42 -2
- data/spec/evaluation_helper.rb +1 -1
- data/spec/factories/discussion_factory.rb +8 -0
- data/spec/features/dynamic_exam_spec.rb +1 -1
- data/spec/helpers/exercise_input_helper_spec.rb +25 -0
- data/spec/helpers/test_results_rendering_spec.rb +7 -7
- data/spec/models/assignment_spec.rb +17 -2
- data/spec/models/discussion_spec.rb +153 -0
- metadata +108 -27
- data/app/models/concerns/with_status.rb +0 -43
- data/app/models/status_rendering_verbosity.rb +0 -40
- data/lib/mumuki/laboratory/controllers/messages.rb +0 -9
- data/lib/mumuki/laboratory/status/aborted.rb +0 -7
- data/lib/mumuki/laboratory/status/base.rb +0 -47
- data/lib/mumuki/laboratory/status/errored.rb +0 -15
- data/lib/mumuki/laboratory/status/manual_evaluation_pending.rb +0 -15
- data/lib/mumuki/laboratory/status/pending.rb +0 -11
- data/lib/mumuki/laboratory/status/running.rb +0 -11
- data/spec/models/randomizer_spec.rb +0 -18
- data/spec/models/verbosity_spec.rb +0 -24
@@ -62,14 +62,29 @@ describe Assignment, organization_workspace: :test do
|
|
62
62
|
let(:haskell) { create(:language, visible_success_output: true) }
|
63
63
|
let(:exercise) { create(:exercise) }
|
64
64
|
context 'should show expectation with failed submissions' do
|
65
|
-
let(:failed_submission) { create(:assignment, status: :failed, expectation_results: [{:
|
65
|
+
let(:failed_submission) { create(:assignment, status: :failed, expectation_results: [{binding: "foo", inspection: "HasBinding", result: :failed}]) }
|
66
66
|
it { expect(failed_submission.expectation_results_visible?).to be true }
|
67
|
+
it { expect(failed_submission.failed_expectation_results.size).to eq 1 }
|
67
68
|
end
|
68
69
|
context 'should show expectation with errored submissions' do
|
69
|
-
let(:errored_submission) { create(:assignment, status: :errored, expectation_results: [{:
|
70
|
+
let(:errored_submission) { create(:assignment, status: :errored, expectation_results: [{binding: "foo", inspection: "HasBinding", result: :failed}]) }
|
70
71
|
it { expect(errored_submission.expectation_results_visible?).to be true }
|
71
72
|
end
|
72
73
|
end
|
74
|
+
describe '#showable_results_visible?' do
|
75
|
+
let(:failed_submission) { create(:assignment, exercise: problem, status: :failed, expectation_results: [{binding: "foo", inspection: "HasBinding", result: :failed},
|
76
|
+
{binding: "bar", inspection: "HasBinding", result: :failed}]) }
|
77
|
+
|
78
|
+
context 'should show all failed expectation results for regular problems' do
|
79
|
+
let(:problem) { create(:problem) }
|
80
|
+
it { expect(failed_submission.visible_expectation_results.size).to eq 2 }
|
81
|
+
end
|
82
|
+
|
83
|
+
context 'should show only the first failed expectation result for kids problems' do
|
84
|
+
let(:problem) { create(:problem, layout: 'input_kids') }
|
85
|
+
it { expect(failed_submission.visible_expectation_results.size).to eq 1 }
|
86
|
+
end
|
87
|
+
end
|
73
88
|
describe '#run_update!' do
|
74
89
|
let(:assignment) { create(:assignment) }
|
75
90
|
context 'when run passes unstructured' do
|
@@ -0,0 +1,153 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Discussion, organization_workspace: :test do
|
4
|
+
|
5
|
+
context 'when created' do
|
6
|
+
let(:initiator) { create(:user) }
|
7
|
+
let(:student) { create(:user) }
|
8
|
+
let(:problem) { create(:problem) }
|
9
|
+
let(:discussion) { problem.discuss! initiator, title: 'Need help' }
|
10
|
+
let(:moderator) { create(:user, permissions: {moderator: 'private/*'}) }
|
11
|
+
|
12
|
+
it { expect(discussion.new_record?).to be false }
|
13
|
+
it { expect(discussion.has_responses?).to be false }
|
14
|
+
it { expect(discussion.messages).to eq [] }
|
15
|
+
it { expect(discussion.initiator).to eq initiator }
|
16
|
+
it { expect(discussion.title).to eq 'Need help' }
|
17
|
+
it { expect(discussion.item).to eq problem }
|
18
|
+
it { expect(initiator.subscribed_to? discussion).to be true }
|
19
|
+
it { expect(discussion.status).to eq :opened }
|
20
|
+
it { expect(discussion.reachable_statuses_for initiator).to eq [:closed] }
|
21
|
+
it { expect(discussion.reachable_statuses_for moderator).to eq [:closed, :solved] }
|
22
|
+
it { expect(discussion.reachable_statuses_for student).to eq [] }
|
23
|
+
|
24
|
+
describe 'initiator sends a message' do
|
25
|
+
before { discussion.submit_message!({content: 'I forgot to say this'}, initiator) }
|
26
|
+
|
27
|
+
it { expect(discussion.has_responses?).to be false }
|
28
|
+
it { expect(discussion.messages.first.content).to eq 'I forgot to say this' }
|
29
|
+
it { expect(initiator.unread_discussions).to eq [] }
|
30
|
+
it { expect(discussion.reachable_statuses_for initiator).to eq [:closed] }
|
31
|
+
it { expect(discussion.reachable_statuses_for moderator).to eq [:closed, :solved] }
|
32
|
+
it { expect(discussion.reachable_statuses_for student).to eq [] }
|
33
|
+
|
34
|
+
describe 'and closes the discussion' do
|
35
|
+
before { discussion.update_status!(:closed, initiator) }
|
36
|
+
|
37
|
+
it { expect(discussion.status).to eq :closed }
|
38
|
+
it { expect(discussion.reachable_statuses_for initiator).to eq [] }
|
39
|
+
it { expect(discussion.reachable_statuses_for moderator).to eq [:opened, :solved] }
|
40
|
+
it { expect(discussion.reachable_statuses_for student).to eq [] }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'receive message from helper' do
|
45
|
+
before { discussion.submit_message!({content: 'You should do this'}, student) }
|
46
|
+
|
47
|
+
it { expect(discussion.has_responses?).to be true }
|
48
|
+
it { expect(initiator.unread_discussions).to include discussion }
|
49
|
+
it { expect(discussion.messages.first.content).to eq 'You should do this' }
|
50
|
+
it { expect(discussion.reachable_statuses_for initiator).to eq [:pending_review] }
|
51
|
+
it { expect(discussion.reachable_statuses_for moderator).to eq [:closed, :solved] }
|
52
|
+
it { expect(discussion.reachable_statuses_for student).to eq [] }
|
53
|
+
|
54
|
+
describe 'gets updated to pending_review by initiator' do
|
55
|
+
before { discussion.update_status!(:pending_review, initiator) }
|
56
|
+
|
57
|
+
it { expect(discussion.status).to eq :pending_review }
|
58
|
+
it { expect(discussion.reachable_statuses_for initiator).to eq [] }
|
59
|
+
it { expect(discussion.reachable_statuses_for moderator).to eq [:closed, :solved] }
|
60
|
+
it { expect(discussion.reachable_statuses_for student).to eq [] }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe 'initiator tries to solve it' do
|
64
|
+
it { expect { discussion.update_status!(:solved, initiator) }.not_to change(discussion, :status) }
|
65
|
+
end
|
66
|
+
|
67
|
+
describe 'gets solved by moderator' do
|
68
|
+
before { discussion.update_status!(:solved, moderator) }
|
69
|
+
|
70
|
+
it { expect(discussion.status).to eq :solved }
|
71
|
+
it { expect(discussion.reachable_statuses_for initiator).to eq [] }
|
72
|
+
it { expect(discussion.reachable_statuses_for moderator).to eq [:closed] }
|
73
|
+
it { expect(discussion.reachable_statuses_for student).to eq [] }
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
describe '#toggle_subscription!' do
|
79
|
+
context 'when the student is not subscribed' do
|
80
|
+
let(:discussion) { create(:discussion) }
|
81
|
+
let(:student) { create(:user) }
|
82
|
+
|
83
|
+
before { student.toggle_subscription!(discussion) }
|
84
|
+
|
85
|
+
it { expect(student.subscribed_to? discussion).to be true }
|
86
|
+
end
|
87
|
+
|
88
|
+
context 'when the student is subscribed' do
|
89
|
+
let(:discussion) { create(:discussion) }
|
90
|
+
let(:student) { create(:user, watched_discussions: [discussion]) }
|
91
|
+
|
92
|
+
before { student.toggle_subscription!(discussion) }
|
93
|
+
|
94
|
+
it { expect(student.subscribed_to? discussion).to be false }
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
describe '#toggle_upvote!' do
|
99
|
+
context 'when the student has not upvoted' do
|
100
|
+
let(:discussion) { create(:discussion) }
|
101
|
+
let(:student) { create(:user) }
|
102
|
+
|
103
|
+
before { student.toggle_upvote!(discussion) }
|
104
|
+
|
105
|
+
it { expect(student.upvoted? discussion).to be true }
|
106
|
+
it { expect(discussion.reload.upvotes_count).to be 1 }
|
107
|
+
end
|
108
|
+
|
109
|
+
context 'when the student is subscribed' do
|
110
|
+
let(:discussion) { create(:discussion) }
|
111
|
+
let(:student) { create(:user, upvoted_discussions: [discussion]) }
|
112
|
+
|
113
|
+
before { student.toggle_upvote!(discussion) }
|
114
|
+
|
115
|
+
it { expect(student.upvoted? discussion).to be false }
|
116
|
+
it { expect(discussion.reload.upvotes_count).to be 0 }
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
describe '#debatable_for' do
|
121
|
+
let(:exercise) { create(:problem) }
|
122
|
+
|
123
|
+
it { expect(described_class.debatable_for('Exercise', {exercise_id: exercise.id})).to eq exercise }
|
124
|
+
end
|
125
|
+
|
126
|
+
describe 'scope for user' do
|
127
|
+
let(:initiator) { create(:user) }
|
128
|
+
let(:exercise) { create(:problem) }
|
129
|
+
|
130
|
+
let!(:public_discussions) { [:opened, :solved].map { |it| create(:discussion, {status: it, initiator: initiator, item: exercise}) } }
|
131
|
+
let!(:private_discussions) { [:pending_review, :closed].map { |it| create(:discussion, {status: it, initiator: initiator, item: exercise}) } }
|
132
|
+
let!(:other_discussion) { create(:discussion, { status: :closed, item: exercise }) }
|
133
|
+
|
134
|
+
context 'as student' do
|
135
|
+
let(:student) { create(:user) }
|
136
|
+
it { expect(exercise.discussions.for_user(student)).to match_array public_discussions }
|
137
|
+
end
|
138
|
+
|
139
|
+
context 'as initiator' do
|
140
|
+
it { expect(exercise.discussions.for_user(initiator)).to match_array public_discussions + private_discussions }
|
141
|
+
end
|
142
|
+
|
143
|
+
context 'as moderator' do
|
144
|
+
let(:moderator) { create(:user, permissions: {moderator: 'private/*'}) }
|
145
|
+
it { expect(exercise.discussions.for_user(moderator)).to match_array public_discussions + private_discussions + [other_discussion] }
|
146
|
+
end
|
147
|
+
|
148
|
+
context 'for other item' do
|
149
|
+
let(:other_exercise) { create(:exercise) }
|
150
|
+
it { expect(other_exercise.discussions.for_user(initiator)).to be_empty }
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '7.
|
47
|
+
version: '7.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '7.
|
54
|
+
version: '7.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mumukit-core
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.3'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: mumukit-nuntius
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
117
|
+
version: '2.2'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '2.
|
124
|
+
version: '2.2'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: mumukit-login
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0
|
173
|
+
version: '1.0'
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0
|
180
|
+
version: '1.0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rack
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,6 +206,34 @@ dependencies:
|
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 1.4.0
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: kaminari
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0.16'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0.16'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: bootstrap-kaminari-views
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
209
237
|
- !ruby/object:Gem::Dependency
|
210
238
|
name: pg
|
211
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,6 +267,7 @@ files:
|
|
239
267
|
- app/assets/javascripts/application/confirmation.js
|
240
268
|
- app/assets/javascripts/application/console.js
|
241
269
|
- app/assets/javascripts/application/csrf-token.js
|
270
|
+
- app/assets/javascripts/application/discussions.js
|
242
271
|
- app/assets/javascripts/application/kids.js
|
243
272
|
- app/assets/javascripts/application/load-analytics.js
|
244
273
|
- app/assets/javascripts/application/load-error-svg.js
|
@@ -266,6 +295,7 @@ files:
|
|
266
295
|
- app/assets/stylesheets/application/modules/_breadcrumb.scss
|
267
296
|
- app/assets/stylesheets/application/modules/_checkboxes.scss
|
268
297
|
- app/assets/stylesheets/application/modules/_console.scss
|
298
|
+
- app/assets/stylesheets/application/modules/_discussion.scss
|
269
299
|
- app/assets/stylesheets/application/modules/_dropdown.scss
|
270
300
|
- app/assets/stylesheets/application/modules/_editor.scss
|
271
301
|
- app/assets/stylesheets/application/modules/_exercise_assignment.scss
|
@@ -279,6 +309,7 @@ files:
|
|
279
309
|
- app/assets/stylesheets/application/modules/_modal.scss
|
280
310
|
- app/assets/stylesheets/application/modules/_organization_chooser.scss
|
281
311
|
- app/assets/stylesheets/application/modules/_overlap.scss
|
312
|
+
- app/assets/stylesheets/application/modules/_pagination.scss
|
282
313
|
- app/assets/stylesheets/application/modules/_progress_bar.scss
|
283
314
|
- app/assets/stylesheets/application/modules/_progress_listing.scss
|
284
315
|
- app/assets/stylesheets/application/modules/_timer.scss
|
@@ -296,6 +327,7 @@ files:
|
|
296
327
|
- app/controllers/application_controller.rb
|
297
328
|
- app/controllers/assets_controller.rb
|
298
329
|
- app/controllers/book_controller.rb
|
330
|
+
- app/controllers/book_discussions_controller.rb
|
299
331
|
- app/controllers/chapters_controller.rb
|
300
332
|
- app/controllers/complements_controller.rb
|
301
333
|
- app/controllers/concerns/on_base_organization_only.rb
|
@@ -304,6 +336,8 @@ files:
|
|
304
336
|
- app/controllers/concerns/with_api_errors.rb
|
305
337
|
- app/controllers/concerns/with_authorization.rb
|
306
338
|
- app/controllers/concerns/with_errors_filter.rb
|
339
|
+
- app/controllers/discussions_controller.rb
|
340
|
+
- app/controllers/discussions_messages_controller.rb
|
307
341
|
- app/controllers/exams_controller.rb
|
308
342
|
- app/controllers/exercise_confirmations_controller.rb
|
309
343
|
- app/controllers/exercise_query_controller.rb
|
@@ -326,6 +360,8 @@ files:
|
|
326
360
|
- app/helpers/concerns/with_student_path_navigation/continue_navigation.rb
|
327
361
|
- app/helpers/concerns/with_student_path_navigation/navigation.rb
|
328
362
|
- app/helpers/concerns/with_student_path_navigation/revisit_navigation.rb
|
363
|
+
- app/helpers/contextualization_result_helper.rb
|
364
|
+
- app/helpers/discussions_helper.rb
|
329
365
|
- app/helpers/editor_tabs_helper.rb
|
330
366
|
- app/helpers/email_helper.rb
|
331
367
|
- app/helpers/exercise_input_helper.rb
|
@@ -348,6 +384,7 @@ files:
|
|
348
384
|
- app/models/chapter.rb
|
349
385
|
- app/models/complement.rb
|
350
386
|
- app/models/concerns/assistable.rb
|
387
|
+
- app/models/concerns/contextualization.rb
|
351
388
|
- app/models/concerns/friendly_name.rb
|
352
389
|
- app/models/concerns/guide_container.rb
|
353
390
|
- app/models/concerns/navigation/parent_navigation.rb
|
@@ -362,6 +399,11 @@ files:
|
|
362
399
|
- app/models/concerns/with_assignments.rb
|
363
400
|
- app/models/concerns/with_case_insensitive_search.rb
|
364
401
|
- app/models/concerns/with_description.rb
|
402
|
+
- app/models/concerns/with_discussion_creation.rb
|
403
|
+
- app/models/concerns/with_discussion_creation/subscription.rb
|
404
|
+
- app/models/concerns/with_discussion_creation/upvote.rb
|
405
|
+
- app/models/concerns/with_discussion_status.rb
|
406
|
+
- app/models/concerns/with_discussions.rb
|
365
407
|
- app/models/concerns/with_editor.rb
|
366
408
|
- app/models/concerns/with_expectations.rb
|
367
409
|
- app/models/concerns/with_language.rb
|
@@ -370,13 +412,18 @@ files:
|
|
370
412
|
- app/models/concerns/with_messages.rb
|
371
413
|
- app/models/concerns/with_number.rb
|
372
414
|
- app/models/concerns/with_profile.rb
|
415
|
+
- app/models/concerns/with_randomizations.rb
|
373
416
|
- app/models/concerns/with_reminders.rb
|
417
|
+
- app/models/concerns/with_scoped_queries.rb
|
418
|
+
- app/models/concerns/with_scoped_queries/filter.rb
|
419
|
+
- app/models/concerns/with_scoped_queries/page.rb
|
420
|
+
- app/models/concerns/with_scoped_queries/sort.rb
|
374
421
|
- app/models/concerns/with_slug.rb
|
375
|
-
- app/models/concerns/with_status.rb
|
376
422
|
- app/models/concerns/with_usages.rb
|
377
423
|
- app/models/concerns/with_user_navigation.rb
|
378
424
|
- app/models/content.rb
|
379
425
|
- app/models/course.rb
|
426
|
+
- app/models/discussion.rb
|
380
427
|
- app/models/event.rb
|
381
428
|
- app/models/exam.rb
|
382
429
|
- app/models/exam_authorization.rb
|
@@ -394,7 +441,6 @@ files:
|
|
394
441
|
- app/models/message.rb
|
395
442
|
- app/models/organization.rb
|
396
443
|
- app/models/stats.rb
|
397
|
-
- app/models/status_rendering_verbosity.rb
|
398
444
|
- app/models/submission/confirmation.rb
|
399
445
|
- app/models/submission/console_submission.rb
|
400
446
|
- app/models/submission/persistent_submission.rb
|
@@ -403,30 +449,43 @@ files:
|
|
403
449
|
- app/models/submission/solution.rb
|
404
450
|
- app/models/submission/submission.rb
|
405
451
|
- app/models/submission/try.rb
|
452
|
+
- app/models/subscription.rb
|
406
453
|
- app/models/topic.rb
|
407
454
|
- app/models/topic_container.rb
|
455
|
+
- app/models/upvote.rb
|
408
456
|
- app/models/usage.rb
|
409
457
|
- app/models/user.rb
|
410
458
|
- app/models/with_stats.rb
|
411
459
|
- app/views/appendixes/show.html.erb
|
412
460
|
- app/views/book/show.html.erb
|
461
|
+
- app/views/book_discussions/index.html.erb
|
413
462
|
- app/views/chapters/show.html.erb
|
414
463
|
- app/views/complements/show.html.erb
|
464
|
+
- app/views/discussions/_message.html.erb
|
465
|
+
- app/views/discussions/_message_container.html.erb
|
466
|
+
- app/views/discussions/_new_message.html.erb
|
467
|
+
- app/views/discussions/index.html.erb
|
468
|
+
- app/views/discussions/show.html.erb
|
415
469
|
- app/views/errors/forbidden.html.erb
|
416
470
|
- app/views/errors/gone.html.erb
|
417
471
|
- app/views/errors/internal_server_error.html.erb
|
418
472
|
- app/views/errors/not_found.html.erb
|
419
473
|
- app/views/errors/unauthorized.html.erb
|
420
474
|
- app/views/exams/show.html.erb
|
475
|
+
- app/views/exercise_solutions/_contextualization_results.html.erb
|
476
|
+
- app/views/exercise_solutions/_contextualization_results_container.html.erb
|
421
477
|
- app/views/exercise_solutions/_expectations.html.erb
|
422
478
|
- app/views/exercise_solutions/_kids_results.html.erb
|
423
479
|
- app/views/exercise_solutions/_kids_results_button.html.erb
|
424
480
|
- app/views/exercise_solutions/_results.html.erb
|
425
481
|
- app/views/exercise_solutions/_results_button.html.erb
|
426
482
|
- app/views/exercise_solutions/_results_title.html.erb
|
483
|
+
- app/views/exercises/_exercise_assignment.html.erb
|
484
|
+
- app/views/exercises/_read_only.html.erb
|
427
485
|
- app/views/exercises/show.html.erb
|
428
486
|
- app/views/invitations/show.html.erb
|
429
487
|
- app/views/layouts/_authoring.html.erb
|
488
|
+
- app/views/layouts/_discussions.html.erb
|
430
489
|
- app/views/layouts/_error.html.erb
|
431
490
|
- app/views/layouts/_guide.html.erb
|
432
491
|
- app/views/layouts/_kids.html.erb
|
@@ -459,12 +518,17 @@ files:
|
|
459
518
|
- app/views/layouts/exercise_inputs/layouts/_input_bottom.html.erb
|
460
519
|
- app/views/layouts/exercise_inputs/layouts/_input_kids.html.erb
|
461
520
|
- app/views/layouts/exercise_inputs/layouts/_input_right.html.erb
|
521
|
+
- app/views/layouts/exercise_inputs/read_only_editors/_code.html.erb
|
522
|
+
- app/views/layouts/exercise_inputs/read_only_editors/_custom.html.erb
|
523
|
+
- app/views/layouts/exercise_inputs/read_only_editors/_multiple_choice.html.erb
|
524
|
+
- app/views/layouts/exercise_inputs/read_only_editors/_single_choice.html.erb
|
462
525
|
- app/views/layouts/mailer.html.erb
|
463
526
|
- app/views/layouts/mailer.text.erb
|
464
527
|
- app/views/layouts/modals/_guide_corollary.html.erb
|
465
528
|
- app/views/layouts/modals/_kids_context.html.erb
|
466
529
|
- app/views/layouts/modals/_kids_results.html.erb
|
467
530
|
- app/views/layouts/modals/_kids_results_aborted.html.erb
|
531
|
+
- app/views/layouts/modals/_new_discussion.html.erb
|
468
532
|
- app/views/layouts/modals/_new_message.html.erb
|
469
533
|
- app/views/lessons/show.html.erb
|
470
534
|
- app/views/messages/errors.html.erb
|
@@ -716,18 +780,26 @@ files:
|
|
716
780
|
- db/migrate/20180323140943_remove_unused_omniauth_fields.rb
|
717
781
|
- db/migrate/20180326224511_remove_book_ids.rb
|
718
782
|
- db/migrate/20180402015405_remove_course_uid.rb
|
783
|
+
- db/migrate/20180504173548_create_discussions.rb
|
784
|
+
- db/migrate/20180504185845_add_discussion_id_to_message.rb
|
719
785
|
- db/migrate/20180526141344_add_tips_rules_to_exercise.rb
|
786
|
+
- db/migrate/20180605143727_add_submission_to_discussion.rb
|
720
787
|
- db/migrate/20180611190239_add_randomizations_to_exercises.rb
|
788
|
+
- db/migrate/20180619182555_create_subscriptions.rb
|
789
|
+
- db/migrate/20180702153442_create_upvotes.rb
|
790
|
+
- db/migrate/20180702175220_add_upvotes_count_to_discussions.rb
|
791
|
+
- db/migrate/20180704150839_rename_assignment_status_to_submission_status.rb
|
721
792
|
- db/seeds/users.rb
|
722
793
|
- lib/events.rb
|
723
794
|
- lib/mumuki/laboratory.rb
|
724
795
|
- lib/mumuki/laboratory/controllers.rb
|
725
796
|
- lib/mumuki/laboratory/controllers/authorization.rb
|
797
|
+
- lib/mumuki/laboratory/controllers/content.rb
|
726
798
|
- lib/mumuki/laboratory/controllers/current_organization.rb
|
727
799
|
- lib/mumuki/laboratory/controllers/dynamic_errors.rb
|
728
800
|
- lib/mumuki/laboratory/controllers/exercise_seed.rb
|
729
|
-
- lib/mumuki/laboratory/controllers/messages.rb
|
730
801
|
- lib/mumuki/laboratory/controllers/nested_in_exercise.rb
|
802
|
+
- lib/mumuki/laboratory/controllers/notifications.rb
|
731
803
|
- lib/mumuki/laboratory/controllers/results_rendering.rb
|
732
804
|
- lib/mumuki/laboratory/engine.rb
|
733
805
|
- lib/mumuki/laboratory/evaluation.rb
|
@@ -759,16 +831,21 @@ files:
|
|
759
831
|
- lib/mumuki/laboratory/mumukit/platform.rb
|
760
832
|
- lib/mumuki/laboratory/seed.rb
|
761
833
|
- lib/mumuki/laboratory/status.rb
|
762
|
-
- lib/mumuki/laboratory/status/
|
763
|
-
- lib/mumuki/laboratory/status/
|
764
|
-
- lib/mumuki/laboratory/status/
|
765
|
-
- lib/mumuki/laboratory/status/
|
766
|
-
- lib/mumuki/laboratory/status/
|
767
|
-
- lib/mumuki/laboratory/status/
|
768
|
-
- lib/mumuki/laboratory/status/
|
769
|
-
- lib/mumuki/laboratory/status/
|
770
|
-
- lib/mumuki/laboratory/status/
|
771
|
-
- lib/mumuki/laboratory/status/
|
834
|
+
- lib/mumuki/laboratory/status/discussion/closed.rb
|
835
|
+
- lib/mumuki/laboratory/status/discussion/discussion.rb
|
836
|
+
- lib/mumuki/laboratory/status/discussion/opened.rb
|
837
|
+
- lib/mumuki/laboratory/status/discussion/pending_review.rb
|
838
|
+
- lib/mumuki/laboratory/status/discussion/solved.rb
|
839
|
+
- lib/mumuki/laboratory/status/submission/aborted.rb
|
840
|
+
- lib/mumuki/laboratory/status/submission/errored.rb
|
841
|
+
- lib/mumuki/laboratory/status/submission/failed.rb
|
842
|
+
- lib/mumuki/laboratory/status/submission/manual_evaluation_pending.rb
|
843
|
+
- lib/mumuki/laboratory/status/submission/passed.rb
|
844
|
+
- lib/mumuki/laboratory/status/submission/passed_with_warnings.rb
|
845
|
+
- lib/mumuki/laboratory/status/submission/pending.rb
|
846
|
+
- lib/mumuki/laboratory/status/submission/running.rb
|
847
|
+
- lib/mumuki/laboratory/status/submission/submission.rb
|
848
|
+
- lib/mumuki/laboratory/status/submission/unknown.rb
|
772
849
|
- lib/mumuki/laboratory/version.rb
|
773
850
|
- lib/tasks/assignments.rake
|
774
851
|
- lib/tasks/events.rake
|
@@ -797,8 +874,10 @@ files:
|
|
797
874
|
- public/magnifying_glass_loop.svg
|
798
875
|
- spec/capybara_helper.rb
|
799
876
|
- spec/controllers/api_clients_controller.rb
|
877
|
+
- spec/controllers/chapters_controller_spec.rb
|
800
878
|
- spec/controllers/confirmations_controller_spec.rb
|
801
879
|
- spec/controllers/courses_api_controller_spec.rb
|
880
|
+
- spec/controllers/discussions_controller_spec.rb
|
802
881
|
- spec/controllers/exercise_solutions_controller_spec.rb
|
803
882
|
- spec/controllers/messages_controller_spec.rb
|
804
883
|
- spec/controllers/organizations_api_controller_spec.rb
|
@@ -844,6 +923,7 @@ files:
|
|
844
923
|
- spec/factories/chapter_factory.rb
|
845
924
|
- spec/factories/complement_factory.rb
|
846
925
|
- spec/factories/course_factory.rb
|
926
|
+
- spec/factories/discussion_factory.rb
|
847
927
|
- spec/factories/exam_factory.rb
|
848
928
|
- spec/factories/exercise_factory.rb
|
849
929
|
- spec/factories/guide_factory.rb
|
@@ -887,6 +967,7 @@ files:
|
|
887
967
|
- spec/models/book_import_spec.rb
|
888
968
|
- spec/models/book_spec.rb
|
889
969
|
- spec/models/course_spec.rb
|
970
|
+
- spec/models/discussion_spec.rb
|
890
971
|
- spec/models/event_generation_spec.rb
|
891
972
|
- spec/models/event_publishing_spec.rb
|
892
973
|
- spec/models/exam_spec.rb
|
@@ -903,7 +984,6 @@ files:
|
|
903
984
|
- spec/models/problem_spec.rb
|
904
985
|
- spec/models/query_spec.rb
|
905
986
|
- spec/models/question_spec.rb
|
906
|
-
- spec/models/randomizer_spec.rb
|
907
987
|
- spec/models/reading_spec.rb
|
908
988
|
- spec/models/solution_spec.rb
|
909
989
|
- spec/models/stats_spec.rb
|
@@ -912,7 +992,6 @@ files:
|
|
912
992
|
- spec/models/usage_spec.rb
|
913
993
|
- spec/models/user_changed_spec.rb
|
914
994
|
- spec/models/user_spec.rb
|
915
|
-
- spec/models/verbosity_spec.rb
|
916
995
|
- spec/models/with_expectations_spec.rb
|
917
996
|
- spec/spec_helper.rb
|
918
997
|
- vendor/assets/javascripts/analytics.js
|
@@ -980,8 +1059,10 @@ summary: Code assement web application for the Mumuki Platform.
|
|
980
1059
|
test_files:
|
981
1060
|
- spec/capybara_helper.rb
|
982
1061
|
- spec/controllers/api_clients_controller.rb
|
1062
|
+
- spec/controllers/chapters_controller_spec.rb
|
983
1063
|
- spec/controllers/confirmations_controller_spec.rb
|
984
1064
|
- spec/controllers/courses_api_controller_spec.rb
|
1065
|
+
- spec/controllers/discussions_controller_spec.rb
|
985
1066
|
- spec/controllers/exercise_solutions_controller_spec.rb
|
986
1067
|
- spec/controllers/messages_controller_spec.rb
|
987
1068
|
- spec/controllers/organizations_api_controller_spec.rb
|
@@ -1027,6 +1108,7 @@ test_files:
|
|
1027
1108
|
- spec/factories/chapter_factory.rb
|
1028
1109
|
- spec/factories/complement_factory.rb
|
1029
1110
|
- spec/factories/course_factory.rb
|
1111
|
+
- spec/factories/discussion_factory.rb
|
1030
1112
|
- spec/factories/exam_factory.rb
|
1031
1113
|
- spec/factories/exercise_factory.rb
|
1032
1114
|
- spec/factories/guide_factory.rb
|
@@ -1070,6 +1152,7 @@ test_files:
|
|
1070
1152
|
- spec/models/book_import_spec.rb
|
1071
1153
|
- spec/models/book_spec.rb
|
1072
1154
|
- spec/models/course_spec.rb
|
1155
|
+
- spec/models/discussion_spec.rb
|
1073
1156
|
- spec/models/event_generation_spec.rb
|
1074
1157
|
- spec/models/event_publishing_spec.rb
|
1075
1158
|
- spec/models/exam_spec.rb
|
@@ -1086,7 +1169,6 @@ test_files:
|
|
1086
1169
|
- spec/models/problem_spec.rb
|
1087
1170
|
- spec/models/query_spec.rb
|
1088
1171
|
- spec/models/question_spec.rb
|
1089
|
-
- spec/models/randomizer_spec.rb
|
1090
1172
|
- spec/models/reading_spec.rb
|
1091
1173
|
- spec/models/solution_spec.rb
|
1092
1174
|
- spec/models/stats_spec.rb
|
@@ -1095,6 +1177,5 @@ test_files:
|
|
1095
1177
|
- spec/models/usage_spec.rb
|
1096
1178
|
- spec/models/user_changed_spec.rb
|
1097
1179
|
- spec/models/user_spec.rb
|
1098
|
-
- spec/models/verbosity_spec.rb
|
1099
1180
|
- spec/models/with_expectations_spec.rb
|
1100
1181
|
- spec/spec_helper.rb
|