mumuki-laboratory 6.0.4 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/helpers/contextualization_result_helper.rb +2 -1
- data/app/views/layouts/_mixed_results.erb +3 -0
- data/app/views/layouts/_test_results.html.erb +0 -3
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/dummy/db/schema.rb +2 -3
- data/spec/features/exercise_flow_spec.rb +1 -1
- data/spec/helpers/with_choices_spec.rb +1 -1
- data/spec/models/exercise_spec.rb +0 -24
- data/spec/models/guide_import_spec.rb +2 -3
- data/spec/models/organization_spec.rb +0 -14
- metadata +98 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 566868e1e5423d1fd2d9bd006e4ae9cd17d906c24bec539ac115b110efb75c2e
|
4
|
+
data.tar.gz: b3b31c4378ea180eb9d7ebedcf5cacec76a8f7b950ce616074ae802b19b24476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffbddab158e201f582d2715d2f24a68a1b791681e442adaa1c9c6858b187fea461f8b9491e887a6e163fc99ce66dd8d6a33c3a20b5c31b7275e3c17063ebe639
|
7
|
+
data.tar.gz: e5f07c1b06529ecd159327988886dff962bb7dcd4afa6984bf6474de21fa687cd63745676b0b117bd87eb8fd3df2bd0294a12eb89dda88df3a2faa1ec4d98a71
|
@@ -23,7 +23,8 @@ module ContextualizationResultHelper
|
|
23
23
|
|
24
24
|
def render_test_results(contextualization)
|
25
25
|
if contextualization.test_results.present?
|
26
|
-
|
26
|
+
template = contextualization.result.present? ? 'layouts/mixed_results' : 'layouts/test_results'
|
27
|
+
render partial: template, locals: { contextualization: contextualization }
|
27
28
|
else
|
28
29
|
render partial: 'layouts/result', locals: { contextualization: contextualization }
|
29
30
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20181117190241) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
16
|
enable_extension "plpgsql"
|
@@ -158,7 +158,7 @@ ActiveRecord::Schema.define(version: 20181121165956) do
|
|
158
158
|
t.boolean "new_expectations", default: false
|
159
159
|
t.boolean "manual_evaluation", default: false
|
160
160
|
t.integer "editor", default: 0, null: false
|
161
|
-
t.string "
|
161
|
+
t.string "choices", default: [], null: false, array: true
|
162
162
|
t.text "goal"
|
163
163
|
t.string "initial_state"
|
164
164
|
t.string "final_state"
|
@@ -166,7 +166,6 @@ ActiveRecord::Schema.define(version: 20181121165956) do
|
|
166
166
|
t.text "randomizations"
|
167
167
|
t.text "free_form_editor_source"
|
168
168
|
t.text "teacher_info"
|
169
|
-
t.text "choices"
|
170
169
|
t.index ["guide_id"], name: "index_exercises_on_guide_id"
|
171
170
|
t.index ["language_id"], name: "index_exercises_on_language_id"
|
172
171
|
end
|
@@ -12,7 +12,7 @@ feature 'Exercise Flow', organization_workspace: :test do
|
|
12
12
|
let!(:problem_4) { build(:problem, name: 'Succ4', description: 'Description of Succ4', layout: :input_bottom, extra: 'x = 2') }
|
13
13
|
let!(:problem_5) { build(:problem, name: 'Succ5', description: 'Description of Succ5', layout: :input_right, editor: :upload, hint: 'lele', language: gobstones) }
|
14
14
|
let!(:problem_6) { build(:problem, name: 'Succ6', description: 'Description of Succ6', layout: :input_right, editor: :hidden, language: haskell) }
|
15
|
-
let!(:problem_7) { build(:problem, name: 'Succ7', description: 'Description of Succ7', choices: [
|
15
|
+
let!(:problem_7) { build(:problem, name: 'Succ7', description: 'Description of Succ7', choices: ['some choice']) }
|
16
16
|
let!(:playground_1) { build(:playground, name: 'Succ5', description: 'Description of Succ4', layout: :input_right) }
|
17
17
|
let!(:playground_2) { build(:playground, name: 'Succ6', description: 'Description of Succ4', layout: :input_right, extra: 'x = 4') }
|
18
18
|
let!(:reading) { build(:reading, name: 'Reading about Succ', description: 'Lets understand succ history') }
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe ChoicesHelper do
|
4
4
|
helper ChoicesHelper
|
5
5
|
|
6
|
-
context 'exercise
|
6
|
+
context 'exercise width choices' do
|
7
7
|
let(:checked_content) { struct id: '1', index: 0, value: 'foo', text: 'bar' }
|
8
8
|
let(:unchecked_content) { struct id: '3', index: 2, value: 'baz', text: 'lorem' }
|
9
9
|
let(:content) { '0:1' }
|
@@ -4,30 +4,6 @@ describe Exercise, organization_workspace: :test do
|
|
4
4
|
let(:exercise) { create(:exercise) }
|
5
5
|
let(:user) { create(:user, first_name: 'Orlo') }
|
6
6
|
|
7
|
-
describe '#choice_values' do
|
8
|
-
context 'when choices are in 5.0 format' do
|
9
|
-
let(:choice_values) { %w(1492 1453 1773) }
|
10
|
-
let(:exercise) { build(:exercise, description: 'when did byzantine empire fall?', choice_values: choice_values) }
|
11
|
-
|
12
|
-
it { expect(exercise.choices).to be_blank }
|
13
|
-
it { expect(exercise[:choice_values]).to eq choice_values }
|
14
|
-
it { expect(exercise.choice_values).to eq choice_values }
|
15
|
-
it { expect(exercise.choice_index_for '1492').to eq 0 }
|
16
|
-
it { expect(exercise.choice_index_for '1773').to eq 2 }
|
17
|
-
end
|
18
|
-
|
19
|
-
context 'when choices are in 6.0 format' do
|
20
|
-
let(:choices) { [{value: '1492', checked: false}, {value: '1453', checked: true}, {value: '1773', checked: false}] }
|
21
|
-
let(:exercise) { build(:exercise, description: 'when did byzantine empire fall?', choices: choices) }
|
22
|
-
|
23
|
-
it { expect(exercise.choices).to eq choices }
|
24
|
-
it { expect(exercise[:choice_values]).to be_blank }
|
25
|
-
it { expect(exercise.choice_values).to eq %w(1492 1453 1773) }
|
26
|
-
it { expect(exercise.choice_index_for '1492').to eq 0 }
|
27
|
-
it { expect(exercise.choice_index_for '1773').to eq 2 }
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
7
|
describe '#slug' do
|
32
8
|
let(:guide) { create(:guide, slug: 'foo/bar') }
|
33
9
|
let(:exercise) { create(:exercise, guide: guide, bibliotheca_id: 4) }
|
@@ -55,7 +55,7 @@ describe Guide do
|
|
55
55
|
extra: '',
|
56
56
|
language: { name: 'text' },
|
57
57
|
test: "---\nequal: '1'\n",
|
58
|
-
choices: [{value: 'foo', checked: false}, {value: 'bar',
|
58
|
+
choices: [{value: 'foo', checked: false}, {value: 'bar', chekced: true}],
|
59
59
|
extra_visible: false,
|
60
60
|
id: 8},
|
61
61
|
{type: 'reading',
|
@@ -148,8 +148,7 @@ describe Guide do
|
|
148
148
|
it { expect(guide.exercises.second.language).to eq haskell }
|
149
149
|
it { expect(guide.exercises.second.default_content).to eq 'a default content' }
|
150
150
|
it { expect(guide.exercises.second.extra_visible).to be true }
|
151
|
-
it { expect(guide.exercises.fourth.choices).to eq [
|
152
|
-
it { expect(guide.exercises.fourth.choice_values).to eq ['foo', 'bar'] }
|
151
|
+
it { expect(guide.exercises.fourth.choices).to eq ['foo', 'bar'] }
|
153
152
|
|
154
153
|
it { expect(guide.exercises.third.expectations.first['binding']).to eq 'foo' }
|
155
154
|
|
@@ -4,20 +4,6 @@ describe Organization, organization_workspace: :test do
|
|
4
4
|
let(:user) { create(:user) }
|
5
5
|
let(:central) { create(:organization, name: 'central') }
|
6
6
|
|
7
|
-
describe '.import_from_resource_h!' do
|
8
|
-
let(:book) { create(:book) }
|
9
|
-
let(:resource_h) { {
|
10
|
-
name: 'zulema',
|
11
|
-
book: book.slug,
|
12
|
-
profile: { locale: 'es', contact_email: 'contact@email.com' }
|
13
|
-
} }
|
14
|
-
let!(:imported) { Organization.import_from_resource_h! resource_h }
|
15
|
-
let(:found) { Organization.find_by(name: 'zulema').to_resource_h }
|
16
|
-
|
17
|
-
it { expect(imported).to_not be nil }
|
18
|
-
it { expect(found).to json_eq resource_h, except: [:theme, :settings] }
|
19
|
-
end
|
20
|
-
|
21
7
|
describe '.current' do
|
22
8
|
let(:organization) { Organization.find_by(name: 'test') }
|
23
9
|
it { expect(organization).to_not be nil }
|
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: 6.0
|
4
|
+
version: 6.1.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-11-
|
11
|
+
date: 2018-11-22 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: 6.0
|
33
|
+
version: 6.1.0
|
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: 6.0
|
40
|
+
version: 6.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mumukit-login
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -308,6 +308,7 @@ files:
|
|
308
308
|
- app/views/layouts/_kids.html.erb
|
309
309
|
- app/views/layouts/_main.html.erb
|
310
310
|
- app/views/layouts/_messages.html.erb
|
311
|
+
- app/views/layouts/_mixed_results.erb
|
311
312
|
- app/views/layouts/_organization_chooser.html.erb
|
312
313
|
- app/views/layouts/_organizations_listing.html.erb
|
313
314
|
- app/views/layouts/_progress_bar.html.erb
|
@@ -594,130 +595,130 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
594
595
|
version: '0'
|
595
596
|
requirements: []
|
596
597
|
rubyforge_project:
|
597
|
-
rubygems_version: 2.
|
598
|
+
rubygems_version: 2.7.8
|
598
599
|
signing_key:
|
599
600
|
specification_version: 4
|
600
601
|
summary: Code assement web application for the Mumuki Platform.
|
601
602
|
test_files:
|
602
|
-
- spec/spec_helper.rb
|
603
603
|
- spec/api_helper.rb
|
604
|
-
- spec/
|
605
|
-
- spec/
|
606
|
-
- spec/
|
607
|
-
- spec/
|
608
|
-
- spec/
|
609
|
-
- spec/
|
610
|
-
- spec/
|
611
|
-
- spec/
|
612
|
-
- spec/
|
613
|
-
- spec/
|
614
|
-
- spec/
|
615
|
-
- spec/
|
616
|
-
- spec/
|
617
|
-
- spec/
|
618
|
-
- spec/
|
619
|
-
- spec/
|
620
|
-
- spec/
|
621
|
-
- spec/
|
622
|
-
- spec/
|
623
|
-
- spec/
|
624
|
-
- spec/models/guide_import_spec.rb
|
625
|
-
- spec/models/playground_spec.rb
|
626
|
-
- spec/models/string_spec.rb
|
627
|
-
- spec/models/event_generation_spec.rb
|
628
|
-
- spec/models/solution_spec.rb
|
629
|
-
- spec/models/lesson_spec.rb
|
630
|
-
- spec/models/question_spec.rb
|
631
|
-
- spec/models/navigation_spec.rb
|
632
|
-
- spec/models/exam_spec.rb
|
633
|
-
- spec/models/topic_import_spec.rb
|
634
|
-
- spec/models/message_spec.rb
|
635
|
-
- spec/models/book_spec.rb
|
636
|
-
- spec/models/with_expectations_spec.rb
|
637
|
-
- spec/dummy/config/secrets.yml
|
604
|
+
- spec/capybara_helper.rb
|
605
|
+
- spec/controllers/api_clients_controller.rb
|
606
|
+
- spec/controllers/chapters_controller_spec.rb
|
607
|
+
- spec/controllers/confirmations_controller_spec.rb
|
608
|
+
- spec/controllers/courses_api_controller_spec.rb
|
609
|
+
- spec/controllers/discussions_controller_spec.rb
|
610
|
+
- spec/controllers/exercise_solutions_controller_spec.rb
|
611
|
+
- spec/controllers/guide_progress_controller_spec.rb
|
612
|
+
- spec/controllers/messages_controller_spec.rb
|
613
|
+
- spec/controllers/organizations_api_controller_spec.rb
|
614
|
+
- spec/controllers/students_api_controller_spec.rb
|
615
|
+
- spec/controllers/users_api_controller_spec.rb
|
616
|
+
- spec/dummy/Rakefile
|
617
|
+
- spec/dummy/bin/bundle
|
618
|
+
- spec/dummy/bin/rails
|
619
|
+
- spec/dummy/bin/rake
|
620
|
+
- spec/dummy/bin/setup
|
621
|
+
- spec/dummy/bin/update
|
622
|
+
- spec/dummy/bin/yarn
|
623
|
+
- spec/dummy/config.ru
|
638
624
|
- spec/dummy/config/application.rb
|
639
|
-
- spec/dummy/config/rabbit.yml
|
640
|
-
- spec/dummy/config/puma.rb
|
641
|
-
- spec/dummy/config/cable.yml
|
642
|
-
- spec/dummy/config/environments/test.rb
|
643
|
-
- spec/dummy/config/environments/development.rb
|
644
625
|
- spec/dummy/config/boot.rb
|
645
|
-
- spec/dummy/config/
|
626
|
+
- spec/dummy/config/cable.yml
|
646
627
|
- spec/dummy/config/database.travis.yml
|
647
|
-
- spec/dummy/config/spring.rb
|
648
628
|
- spec/dummy/config/environment.rb
|
649
|
-
- spec/dummy/config/
|
629
|
+
- spec/dummy/config/environments/development.rb
|
630
|
+
- spec/dummy/config/environments/test.rb
|
650
631
|
- spec/dummy/config/initializers/assets.rb
|
651
|
-
- spec/dummy/config/initializers/
|
632
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
652
633
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
634
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
635
|
+
- spec/dummy/config/locales/en.yml
|
636
|
+
- spec/dummy/config/puma.rb
|
637
|
+
- spec/dummy/config/rabbit.yml
|
653
638
|
- spec/dummy/config/routes.rb
|
639
|
+
- spec/dummy/config/secrets.yml
|
640
|
+
- spec/dummy/config/spring.rb
|
654
641
|
- spec/dummy/config/database.yml
|
655
|
-
- spec/dummy/bin/bundle
|
656
|
-
- spec/dummy/bin/yarn
|
657
|
-
- spec/dummy/bin/rails
|
658
|
-
- spec/dummy/bin/setup
|
659
|
-
- spec/dummy/bin/rake
|
660
|
-
- spec/dummy/bin/update
|
661
|
-
- spec/dummy/config.ru
|
662
642
|
- spec/dummy/db/schema.rb
|
663
643
|
- spec/dummy/db/seeds.rb
|
664
644
|
- spec/dummy/package.json
|
665
|
-
- spec/
|
666
|
-
- spec/login_helper.rb
|
645
|
+
- spec/evaluation_helper.rb
|
667
646
|
- spec/factories/api_client_factory.rb
|
668
|
-
- spec/factories/topic_factory.rb
|
669
647
|
- spec/factories/assignments_factory.rb
|
670
|
-
- spec/factories/exercise_factory.rb
|
671
|
-
- spec/factories/login_settings_factory.rb
|
672
|
-
- spec/factories/exam_factory.rb
|
673
|
-
- spec/factories/course_factory.rb
|
674
648
|
- spec/factories/book_factory.rb
|
675
649
|
- spec/factories/chapter_factory.rb
|
676
|
-
- spec/factories/
|
650
|
+
- spec/factories/complement_factory.rb
|
651
|
+
- spec/factories/course_factory.rb
|
652
|
+
- spec/factories/discussion_factory.rb
|
653
|
+
- spec/factories/exam_factory.rb
|
654
|
+
- spec/factories/exercise_factory.rb
|
677
655
|
- spec/factories/guide_factory.rb
|
678
|
-
- spec/factories/message_factory.rb
|
679
656
|
- spec/factories/invitation_factory.rb
|
680
657
|
- spec/factories/lesson_factory.rb
|
681
|
-
- spec/factories/
|
658
|
+
- spec/factories/login_settings_factory.rb
|
659
|
+
- spec/factories/message_factory.rb
|
660
|
+
- spec/factories/organization_factory.rb
|
661
|
+
- spec/factories/topic_factory.rb
|
682
662
|
- spec/factories/user_factory.rb
|
683
|
-
- spec/
|
663
|
+
- spec/features/chapter_spec.rb
|
664
|
+
- spec/features/choose_organization_spec.rb
|
665
|
+
- spec/features/complements_flow_spec.rb
|
666
|
+
- spec/features/dynamic_exam_spec.rb
|
684
667
|
- spec/features/exams_flow_spec.rb
|
685
668
|
- spec/features/exercise_flow_spec.rb
|
686
|
-
- spec/features/
|
669
|
+
- spec/features/guide_reset_spec.rb
|
687
670
|
- spec/features/guides_flow_spec.rb
|
688
|
-
- spec/features/dynamic_exam_spec.rb
|
689
|
-
- spec/features/not_found_private_flow_spec.rb
|
690
|
-
- spec/features/chapter_spec.rb
|
691
|
-
- spec/features/complements_flow_spec.rb
|
692
|
-
- spec/features/lessons_flow_spec.rb
|
693
|
-
- spec/features/login_flow_spec.rb
|
694
|
-
- spec/features/profile_flow_spec.rb
|
695
671
|
- spec/features/home_private_flow_spec.rb
|
696
672
|
- spec/features/home_public_flow_spec.rb
|
697
|
-
- spec/features/
|
698
|
-
- spec/features/standard_flow_spec.rb
|
699
|
-
- spec/features/choose_organization_spec.rb
|
673
|
+
- spec/features/lessons_flow_spec.rb
|
700
674
|
- spec/features/links_flow_spec.rb
|
675
|
+
- spec/features/login_flow_spec.rb
|
676
|
+
- spec/features/menu_bar_spec.rb
|
677
|
+
- spec/features/not_found_private_flow_spec.rb
|
678
|
+
- spec/features/not_found_public_flow_spec.rb
|
679
|
+
- spec/features/profile_flow_spec.rb
|
701
680
|
- spec/features/progressive_tips_spec.rb
|
702
|
-
- spec/features/
|
703
|
-
- spec/
|
681
|
+
- spec/features/standard_flow_spec.rb
|
682
|
+
- spec/helpers/application_helper_spec.rb
|
704
683
|
- spec/helpers/breadcrumbs_helper_spec.rb
|
705
|
-
- spec/helpers/with_navigation_spec.rb
|
706
|
-
- spec/helpers/icons_helper_spec.rb
|
707
|
-
- spec/helpers/exercise_input_helper_spec.rb
|
708
684
|
- spec/helpers/email_helper_spec.rb
|
709
|
-
- spec/helpers/
|
710
|
-
- spec/helpers/
|
685
|
+
- spec/helpers/exercise_input_helper_spec.rb
|
686
|
+
- spec/helpers/icons_helper_spec.rb
|
711
687
|
- spec/helpers/test_results_rendering_spec.rb
|
712
|
-
- spec/
|
713
|
-
- spec/
|
714
|
-
- spec/
|
715
|
-
- spec/
|
716
|
-
- spec/
|
717
|
-
- spec/
|
718
|
-
- spec/
|
719
|
-
- spec/
|
720
|
-
- spec/
|
721
|
-
- spec/
|
722
|
-
- spec/
|
723
|
-
- spec/
|
688
|
+
- spec/helpers/with_choices_spec.rb
|
689
|
+
- spec/helpers/with_navigation_spec.rb
|
690
|
+
- spec/login_helper.rb
|
691
|
+
- spec/mailers/previews/user_mailer_preview.rb
|
692
|
+
- spec/mailers/user_mailer_spec.rb
|
693
|
+
- spec/models/api_client_spec.rb
|
694
|
+
- spec/models/assignment_spec.rb
|
695
|
+
- spec/models/book_import_spec.rb
|
696
|
+
- spec/models/book_spec.rb
|
697
|
+
- spec/models/course_spec.rb
|
698
|
+
- spec/models/discussion_spec.rb
|
699
|
+
- spec/models/event_generation_spec.rb
|
700
|
+
- spec/models/event_publishing_spec.rb
|
701
|
+
- spec/models/exam_spec.rb
|
702
|
+
- spec/models/exercise_spec.rb
|
703
|
+
- spec/models/guide_import_spec.rb
|
704
|
+
- spec/models/guide_spec.rb
|
705
|
+
- spec/models/interactive_spec.rb
|
706
|
+
- spec/models/language_spec.rb
|
707
|
+
- spec/models/lesson_spec.rb
|
708
|
+
- spec/models/message_spec.rb
|
709
|
+
- spec/models/navigation_spec.rb
|
710
|
+
- spec/models/organization_spec.rb
|
711
|
+
- spec/models/playground_spec.rb
|
712
|
+
- spec/models/problem_spec.rb
|
713
|
+
- spec/models/query_spec.rb
|
714
|
+
- spec/models/question_spec.rb
|
715
|
+
- spec/models/reading_spec.rb
|
716
|
+
- spec/models/solution_spec.rb
|
717
|
+
- spec/models/stats_spec.rb
|
718
|
+
- spec/models/string_spec.rb
|
719
|
+
- spec/models/topic_import_spec.rb
|
720
|
+
- spec/models/usage_spec.rb
|
721
|
+
- spec/models/user_changed_spec.rb
|
722
|
+
- spec/models/user_spec.rb
|
723
|
+
- spec/models/with_expectations_spec.rb
|
724
|
+
- spec/spec_helper.rb
|