mumuki-laboratory 8.1.0 → 8.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +1 -1
  3. data/app/assets/javascripts/mumuki_laboratory/application/button.js +4 -4
  4. data/app/assets/javascripts/mumuki_laboratory/application/codemirror-builder.js +3 -3
  5. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +6 -6
  6. data/app/assets/javascripts/mumuki_laboratory/application/console.js +2 -2
  7. data/app/assets/javascripts/mumuki_laboratory/application/discussions.js +7 -7
  8. data/app/assets/javascripts/mumuki_laboratory/application/editors.js +1 -1
  9. data/app/assets/javascripts/mumuki_laboratory/application/elipsis.js +1 -1
  10. data/app/assets/javascripts/mumuki_laboratory/application/events.js +2 -2
  11. data/app/assets/javascripts/mumuki_laboratory/application/exercise.js +2 -2
  12. data/app/assets/javascripts/mumuki_laboratory/application/gamification.js +13 -3
  13. data/app/assets/javascripts/mumuki_laboratory/application/inputs.js +1 -1
  14. data/app/assets/javascripts/mumuki_laboratory/application/kids.js +4 -4
  15. data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +7 -7
  16. data/app/assets/javascripts/mumuki_laboratory/application/messages.js +6 -6
  17. data/app/assets/javascripts/mumuki_laboratory/application/mu-modal-carrousel.js +1 -1
  18. data/app/assets/javascripts/mumuki_laboratory/application/multiple-choice.js +1 -1
  19. data/app/assets/javascripts/mumuki_laboratory/application/multiple-files.js +3 -3
  20. data/app/assets/javascripts/mumuki_laboratory/application/multiple-scenarios.js +1 -1
  21. data/app/assets/javascripts/mumuki_laboratory/application/pin.js +1 -1
  22. data/app/assets/javascripts/mumuki_laboratory/application/primary.js +1 -1
  23. data/app/assets/javascripts/mumuki_laboratory/application/progress.js +1 -1
  24. data/app/assets/javascripts/mumuki_laboratory/application/results-renderer.js +1 -1
  25. data/app/assets/javascripts/mumuki_laboratory/application/speech-bubble-renderer.js +4 -4
  26. data/app/assets/javascripts/mumuki_laboratory/application/submission.js +2 -2
  27. data/app/assets/javascripts/mumuki_laboratory/application/submissions-store.js +3 -3
  28. data/app/assets/javascripts/mumuki_laboratory/application/sync-mode.js +2 -2
  29. data/app/assets/javascripts/mumuki_laboratory/application/timer.js +1 -1
  30. data/app/assets/stylesheets/mumuki_laboratory/application/_layout.scss +7 -7
  31. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_overlap.scss +0 -4
  32. data/app/controllers/application_controller.rb +1 -0
  33. data/app/controllers/concerns/with_user_discussion_validation.rb +6 -0
  34. data/app/controllers/discussions_controller.rb +0 -6
  35. data/app/controllers/users_controller.rb +2 -1
  36. data/app/helpers/assignment_result_helper.rb +1 -1
  37. data/app/helpers/discussions_helper.rb +4 -4
  38. data/app/helpers/editor_tabs_helper.rb +1 -1
  39. data/app/helpers/icons_helper.rb +1 -1
  40. data/app/helpers/links_helper.rb +3 -3
  41. data/app/helpers/menu_bar_helper.rb +5 -1
  42. data/app/helpers/overlapped_buttons_helper.rb +6 -2
  43. data/app/views/book/show.html.erb +2 -2
  44. data/app/views/discussions/_message.html.erb +2 -2
  45. data/app/views/exercise_solutions/_kids_level_up.html.erb +1 -1
  46. data/app/views/exercises/_exercise_assignment.html.erb +1 -1
  47. data/app/views/exercises/_read_only.html.erb +1 -1
  48. data/app/views/exercises/show.html.erb +1 -1
  49. data/app/views/layouts/_copyright.html.erb +1 -1
  50. data/app/views/layouts/_guide.html.erb +8 -6
  51. data/app/views/layouts/_kids.html.erb +4 -4
  52. data/app/views/layouts/_kindergarten.html.erb +5 -5
  53. data/app/views/layouts/_social_media.html.erb +4 -4
  54. data/app/views/layouts/_timer.html.erb +1 -1
  55. data/app/views/layouts/application.html.erb +28 -26
  56. data/app/views/layouts/embedded.html.erb +14 -11
  57. data/app/views/layouts/exercise_inputs/editors/_code.html.erb +1 -6
  58. data/app/views/layouts/exercise_inputs/editors/_multiple_files.html.erb +4 -9
  59. data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +1 -1
  60. data/app/views/layouts/modals/_guide_corollary.html.erb +13 -3
  61. data/app/views/layouts/modals/_kids_results.html.erb +2 -2
  62. data/app/views/layouts/modals/_kindergarten_context.html.erb +3 -3
  63. data/app/views/layouts/modals/_kindergarten_results.html.erb +3 -3
  64. data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +1 -1
  65. data/app/views/layouts/modals/_level_up.html.erb +1 -1
  66. data/app/views/users/_edit_user_form.html.erb +1 -1
  67. data/app/views/users/_user_form.html.erb +1 -1
  68. data/lib/mumuki/laboratory.rb +1 -1
  69. data/lib/mumuki/laboratory/engine.rb +1 -1
  70. data/lib/mumuki/laboratory/locales/en.yml +3 -1
  71. data/lib/mumuki/laboratory/locales/es-CL.yml +4 -2
  72. data/lib/mumuki/laboratory/locales/es.yml +6 -3
  73. data/lib/mumuki/laboratory/locales/pt.yml +4 -2
  74. data/lib/mumuki/laboratory/version.rb +1 -1
  75. data/spec/controllers/discussions_controller_spec.rb +19 -0
  76. data/spec/dummy/db/schema.rb +2 -1
  77. data/spec/features/terms_flow_spec.rb +14 -8
  78. data/spec/helpers/icons_helper_spec.rb +3 -3
  79. data/spec/helpers/test_results_rendering_spec.rb +8 -8
  80. data/spec/helpers/with_navigation_spec.rb +14 -14
  81. data/spec/javascripts/gamification-spec.js +2 -2
  82. metadata +109 -104
  83. data/spec/dummy/config/database.travis.yml +0 -4
@@ -89,7 +89,6 @@ pt:
89
89
  gone: Opa! O conteúdo expirou
90
90
  internal_server_error: Opa! Algo não estava certo
91
91
  not_found: Opa! A página que você pesquisou não existe
92
- exam_number: 'Revise %{number}:'
93
92
  exams: Examesca
94
93
  exercise: Exercício
95
94
  exercise_count: exercícios
@@ -108,7 +107,7 @@ pt:
108
107
  first_name: Nome
109
108
  forbidden_explanation: Você poderia ter entrado com uma conta incorreta?
110
109
  format: Formato
111
- forum_terms: Regras do fórum
110
+ forum_terms: Regras do espaço de consulta
112
111
  forum_terms_link: Se você tiver alguma dúvida, consulte as %{terms_link}
113
112
  fullscreen: Tela completa
114
113
  gender: Gênero
@@ -152,6 +151,7 @@ pt:
152
151
  let_us_know: Por favor, avise-nos!
153
152
  level: Nível
154
153
  level_up: Você sobe de nível!
154
+ listen_statement: Ouça a declaração
155
155
  loading: Carregando
156
156
  load_solution_into_console: Carregue a solução no console
157
157
  locked_content: 'Este conteúdo será desbloqueado quando você terminar os capítulos anteriores'
@@ -185,6 +185,7 @@ pt:
185
185
  no_exercises: Não encontramos exercícios que correspondam à sua pesquisa.
186
186
  no_guides: Não encontramos lições que correspondam à sua pesquisa.
187
187
  no_messages: Parece que você ainda não tem uma mensagem!
188
+ no_need_hint: Este exercício não tem dica
188
189
  no_questions: Parece que ainda não há dúvida.
189
190
  no_submissions: Parece que você ainda não tentou resolver este exercício!
190
191
  no_useful_result: Não encontrou o que estava buscando?
@@ -229,6 +230,7 @@ pt:
229
230
  retry_exercise: Tentar novamente
230
231
  running: processamento
231
232
  save: Salvar
233
+ see_context: Veja a animação desde o início
232
234
  send: Enviar
233
235
  sending_solution: Solução de envio
234
236
  show: Mostrar
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Laboratory
3
- VERSION = '8.1.0'
3
+ VERSION = '8.2.1'
4
4
  end
5
5
  end
@@ -26,6 +26,25 @@ describe DiscussionsController, organization_workspace: :test do
26
26
  end
27
27
  end
28
28
 
29
+ describe 'index' do
30
+ context 'when user is banned from forum' do
31
+ before { user.update! banned_from_forum: true }
32
+ before { get :index, params: exercise_params }
33
+
34
+ it { expect(response.status).to eq 404 }
35
+ end
36
+
37
+ context 'when user has exam in progress' do
38
+ let!(:exam) { create(:exam) }
39
+ before { exam.authorize! user }
40
+ before { exam.start! user }
41
+
42
+ before { get :index, params: exercise_params }
43
+
44
+ it { expect(response.status).to eq 403 }
45
+ end
46
+ end
47
+
29
48
  describe 'post' do
30
49
  before { allow_any_instance_of(DiscussionsController).to receive(:discussion_params).and_return title: 'A title' }
31
50
  before { post :create, params: exercise_params }
@@ -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: 20201027152806) do
13
+ ActiveRecord::Schema.define(version: 20201130163114) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -433,6 +433,7 @@ ActiveRecord::Schema.define(version: 20201027152806) do
433
433
  t.datetime "privacy_terms_accepted_at"
434
434
  t.datetime "legal_terms_accepted_at"
435
435
  t.datetime "forum_terms_accepted_at"
436
+ t.boolean "banned_from_forum"
436
437
  t.index ["avatar_type", "avatar_id"], name: "index_users_on_avatar_type_and_avatar_id"
437
438
  t.index ["disabled_at"], name: "index_users_on_disabled_at"
438
439
  t.index ["last_organization_id"], name: "index_users_on_last_organization_id"
@@ -14,6 +14,10 @@ feature 'Terms Flow', organization_workspace: :test do
14
14
  let(:expected_terms) { [] }
15
15
  let(:unexpected_terms) { all_terms_scopes - expected_terms }
16
16
 
17
+ let(:student) { create(:user, uid: 'user.student@mumuki.org', permissions: {student: 'test/*'}) }
18
+
19
+ let(:janitor) { create(:user, uid: 'user.janitor@mumuki.org', permissions: {student: 'test/*', janitor: 'other/*'}) }
20
+
17
21
  before { reindex_current_organization! }
18
22
 
19
23
  shared_context 'has expected terms' do
@@ -31,8 +35,6 @@ feature 'Terms Flow', organization_workspace: :test do
31
35
  end
32
36
 
33
37
  context 'with student logged in' do
34
- let(:student) { create(:user, uid: 'test@mumuki.org', permissions: {student: 'test/*'}) }
35
-
36
38
  before { set_current_user! student }
37
39
 
38
40
  describe 'visit user terms path' do
@@ -60,8 +62,6 @@ feature 'Terms Flow', organization_workspace: :test do
60
62
  end
61
63
 
62
64
  context 'with janitor logged in' do
63
- let(:janitor) { create(:user, uid: 'test@mumuki.org', permissions: {student: 'test/*', janitor: 'other/*'}) }
64
-
65
65
  before { set_current_user! janitor }
66
66
 
67
67
  describe 'visit user terms path' do
@@ -92,23 +92,29 @@ feature 'Terms Flow', organization_workspace: :test do
92
92
  end
93
93
  end
94
94
 
95
- context 'with unaccepted general terms' do
95
+ context 'with unaccepted role terms' do
96
96
 
97
97
  context 'visit forum' do
98
98
  let(:terms_path) { '/discussions/terms' }
99
99
  before { test_organization.update! forum_enabled: true }
100
100
 
101
101
  scenario 'with enabled forum' do
102
- visit '/'
103
-
102
+ visit '/discussions'
104
103
  expect(page).to have_text('Accept terms')
104
+
105
+ check :user_terms_of_service
106
+ click_on 'Accept'
107
+ expect(page).to have_text('Discussions')
105
108
  end
106
109
  end
107
110
 
108
111
  scenario 'visit any other path' do
109
112
  visit '/'
110
-
111
113
  expect(page).to have_text('Accept terms')
114
+
115
+ check :user_terms_of_service
116
+ click_on 'Accept'
117
+ expect(page).to have_text(test_organization.book.name)
112
118
  end
113
119
 
114
120
  scenario 'visit user path' do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe IconsHelper, organization_workspace: :test do
4
4
  helper IconsHelper
5
- helper FontAwesome::Rails::IconHelper
5
+ helper FontAwesome5::Rails::IconHelper
6
6
 
7
7
  describe '#language_icon' do
8
8
  let(:haskell) { create(:language, name: 'Haskell') }
@@ -16,7 +16,7 @@ describe IconsHelper, organization_workspace: :test do
16
16
  }
17
17
  let(:failed_submission) { create(:assignment, status: :failed) }
18
18
 
19
- it { expect(status_icon(passed_submission)).to eq '<i class="fa fa-check-circle text-success status-icon"></i>' }
20
- it { expect(status_icon(failed_submission)).to eq '<i class="fa fa-times-circle text-danger status-icon"></i>' }
19
+ it { expect(status_icon(passed_submission)).to eq '<i class="fas fa-check-circle text-success status-icon"></i>' }
20
+ it { expect(status_icon(failed_submission)).to eq '<i class="fas fa-times-circle text-danger status-icon"></i>' }
21
21
  end
22
22
  end
@@ -3,7 +3,7 @@ require 'ostruct'
3
3
 
4
4
  describe ContextualizationResultHelper do
5
5
  helper IconsHelper
6
- helper FontAwesome::Rails::IconHelper
6
+ helper FontAwesome5::Rails::IconHelper
7
7
  helper ContextualizationResultHelper
8
8
 
9
9
 
@@ -13,13 +13,13 @@ describe ContextualizationResultHelper do
13
13
  context 'plain explanation' do
14
14
  let(:expectation_result) { {result: :failed, explanation: 'you must delegate'} }
15
15
 
16
- it { expect(html).to eq '<i class="fa fa-times-circle text-danger status-icon"></i> you must delegate' }
16
+ it { expect(html).to eq '<i class="fas fa-times-circle text-danger status-icon"></i> you must delegate' }
17
17
  end
18
18
 
19
19
  context 'html explanation' do
20
20
  let(:expectation_result) { {result: :failed, explanation: 'you must use <strong>if</strong>'} }
21
21
 
22
- it { expect(html).to eq '<i class="fa fa-times-circle text-danger status-icon"></i> you must use <strong>if</strong>' }
22
+ it { expect(html).to eq '<i class="fas fa-times-circle text-danger status-icon"></i> you must use <strong>if</strong>' }
23
23
  end
24
24
  end
25
25
 
@@ -35,7 +35,7 @@ describe ContextualizationResultHelper do
35
35
  test_results: [{title: '2 is 2', status: :passed, result: ''}]) }
36
36
 
37
37
  it { expect(html).to be_html_safe }
38
- it { expect(html).to include "<i class=\"fa fa-check-circle text-success status-icon\"></i>" }
38
+ it { expect(html).to include "<i class=\"fas fa-check-circle text-success status-icon\"></i>" }
39
39
  it { expect(html).to include "2 is 2" }
40
40
  end
41
41
 
@@ -47,7 +47,7 @@ describe ContextualizationResultHelper do
47
47
  exercise: problem,
48
48
  test_results: [{title: '2 is 2', status: :failed, result: 'something _went_ wrong'}]) }
49
49
 
50
- it { expect(html).to include "<i class=\"fa fa-times-circle text-danger status-icon\"></i>" }
50
+ it { expect(html).to include "<i class=\"fas fa-times-circle text-danger status-icon\"></i>" }
51
51
  it { expect(html).to include "2 is 2" }
52
52
  it { expect(html).to include "<pre>something _went_ wrong</pre>" }
53
53
  end
@@ -59,7 +59,7 @@ describe ContextualizationResultHelper do
59
59
  exercise: problem,
60
60
  test_results: [{title: '2 is 2', status: :failed, result: 'something went _really_ wrong'}]) }
61
61
 
62
- it { expect(html).to include "<i class=\"fa fa-times-circle text-danger status-icon\"></i>" }
62
+ it { expect(html).to include "<i class=\"fas fa-times-circle text-danger status-icon\"></i>" }
63
63
  it { expect(html).to include "2 is 2" }
64
64
  it { expect(html).to include "<p>something went <em>really</em> wrong</p>" }
65
65
  end
@@ -72,7 +72,7 @@ describe ContextualizationResultHelper do
72
72
  test_results: [{title: 'foo is 2', status: :failed, result: 'foo is undefined', summary: {type: 'undefined_variable', message: 'you are using things that are _not defined_'}}]) }
73
73
 
74
74
  it { expect(html).to include 'foo is 2: you are using things that are <em>not defined</em>' }
75
- it { expect(html).to include "<i class=\"fa fa-times-circle text-danger status-icon\"></i>" }
75
+ it { expect(html).to include "<i class=\"fas fa-times-circle text-danger status-icon\"></i>" }
76
76
  it { expect(html).to include '<p>foo is undefined</p>' }
77
77
  end
78
78
 
@@ -84,7 +84,7 @@ describe ContextualizationResultHelper do
84
84
  test_results: [{title: '', status: :failed, result: 'foo is undefined', summary: {type: 'undefined_variable', message: 'you are using things that are _not defined_'}}]) }
85
85
 
86
86
  it { expect(html).to include 'you are using things that are <em>not defined</em>' }
87
- it { expect(html).to include "<i class=\"fa fa-times-circle text-danger status-icon\"></i>" }
87
+ it { expect(html).to include "<i class=\"fas fa-times-circle text-danger status-icon\"></i>" }
88
88
  it { expect(html).to include '<p>foo is undefined</p>' }
89
89
  end
90
90
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe WithStudentPathNavigation, organization_workspace: :test do
4
4
  helper WithStudentPathNavigation
5
- helper FontAwesome::Rails::IconHelper
5
+ helper FontAwesome5::Rails::IconHelper
6
6
 
7
7
  describe '#next_button' do
8
8
  let(:current_user) { create(:user) }
@@ -14,9 +14,9 @@ describe WithStudentPathNavigation, organization_workspace: :test do
14
14
  let!(:exercise_3) { create(:exercise, id: 13, name: 'exercise 3', guide: guide) }
15
15
 
16
16
  context 'when user did not submit any solution' do
17
- it { expect(next_button(exercise_1)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\">Next: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
18
- it { expect(next_button(exercise_2)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_3.friendly_name}\">Next: exercise 3 <i class=\"fa fa-chevron-right\"></i></a>" }
19
- it { expect(next_button(exercise_3)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{exercise_1.friendly_name}\">Next pending: exercise 1 <i class=\"fa fa-chevron-right\"></i></a>" }
17
+ it { expect(next_button(exercise_1)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
18
+ it { expect(next_button(exercise_2)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_3.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 3</span><i class=\"fas fa-chevron-right\"></i></a>" }
19
+ it { expect(next_button(exercise_3)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{exercise_1.friendly_name}\"><span class=\"fa5-text-r\">Next pending: exercise 1</span><i class=\"fas fa-chevron-right\"></i></a>" }
20
20
  end
21
21
 
22
22
  context 'when on last unresolved exercise' do
@@ -25,9 +25,9 @@ describe WithStudentPathNavigation, organization_workspace: :test do
25
25
  exercise_3.submit_solution!(current_user).passed!
26
26
  end
27
27
 
28
- it { expect(next_button(exercise_1)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\">Next: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
28
+ it { expect(next_button(exercise_1)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
29
29
  it { expect(next_button(exercise_2)).to be nil }
30
- it { expect(next_button(exercise_3)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\">Next pending: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
30
+ it { expect(next_button(exercise_3)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\"><span class=\"fa5-text-r\">Next pending: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
31
31
  end
32
32
 
33
33
  context 'when user did submit a solution' do
@@ -35,9 +35,9 @@ describe WithStudentPathNavigation, organization_workspace: :test do
35
35
  exercise_1.submit_solution!(current_user).passed!
36
36
  end
37
37
 
38
- it { expect(next_button(exercise_1)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\">Next: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
39
- it { expect(next_button(exercise_2)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_3.friendly_name}\">Next: exercise 3 <i class=\"fa fa-chevron-right\"></i></a>" }
40
- it { expect(next_button(exercise_3)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\">Next pending: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
38
+ it { expect(next_button(exercise_1)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
39
+ it { expect(next_button(exercise_2)).to eq "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/exercises/#{exercise_3.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 3</span><i class=\"fas fa-chevron-right\"></i></a>" }
40
+ it { expect(next_button(exercise_3)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{exercise_2.friendly_name}\"><span class=\"fa5-text-r\">Next pending: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
41
41
  end
42
42
  end
43
43
 
@@ -46,8 +46,8 @@ describe WithStudentPathNavigation, organization_workspace: :test do
46
46
  let!(:exercise) { create(:exercise, id: 12, name: 'exercise 2', guide: guide) }
47
47
 
48
48
  context 'when user did not submit any exercise' do
49
- it { expect(next_button(reading)).to eq "<a class=\"btn-confirmation btn btn-success btn-block\" data-confirmation-url=\"/exercises/#{reading.friendly_name}/confirmations\" role=\"button\" href=\"/exercises/#{exercise.friendly_name}\">Next: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
50
- it { expect(next_button(exercise)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{reading.friendly_name}\">Next pending: exercise 1 <i class=\"fa fa-chevron-right\"></i></a>" }
49
+ it { expect(next_button(reading)).to eq "<a class=\"btn-confirmation btn btn-success btn-block\" data-confirmation-url=\"/exercises/#{reading.friendly_name}/confirmations\" role=\"button\" href=\"/exercises/#{exercise.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
50
+ it { expect(next_button(exercise)).to eq "<a class=\"btn btn-warning btn-block\" role=\"button\" href=\"/exercises/#{reading.friendly_name}\"><span class=\"fa5-text-r\">Next pending: exercise 1</span><i class=\"fas fa-chevron-right\"></i></a>" }
51
51
  end
52
52
 
53
53
  context 'when user finished just reading' do
@@ -55,7 +55,7 @@ describe WithStudentPathNavigation, organization_workspace: :test do
55
55
  reading.submit_confirmation!(current_user)
56
56
  end
57
57
 
58
- it { expect(next_button(reading)).to eq "<a class=\"btn-confirmation btn btn-success btn-block\" data-confirmation-url=\"/exercises/#{reading.friendly_name}/confirmations\" role=\"button\" href=\"/exercises/#{exercise.friendly_name}\">Next: exercise 2 <i class=\"fa fa-chevron-right\"></i></a>" }
58
+ it { expect(next_button(reading)).to eq "<a class=\"btn-confirmation btn btn-success btn-block\" data-confirmation-url=\"/exercises/#{reading.friendly_name}/confirmations\" role=\"button\" href=\"/exercises/#{exercise.friendly_name}\"><span class=\"fa5-text-r\">Next: exercise 2</span><i class=\"fas fa-chevron-right\"></i></a>" }
59
59
  it { expect(next_button(exercise)).to eq nil }
60
60
  end
61
61
  end
@@ -83,12 +83,12 @@ describe WithStudentPathNavigation, organization_workspace: :test do
83
83
  let(:lessons) { [lesson_1, lesson_2, lesson_3] }
84
84
 
85
85
  context 'one suggestion' do
86
- it { expect(next_button(lesson_2)).to include "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/lessons/#{lesson_3.friendly_name}\">Next: #{lesson_3.name} <i class=\"fa fa-chevron-right\"></i></a>" }
86
+ it { expect(next_button(lesson_2)).to include "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/lessons/#{lesson_3.friendly_name}\"><span class=\"fa5-text-r\">Next: #{lesson_3.name}</span><i class=\"fas fa-chevron-right\"></i></a>" }
87
87
  it { expect(next_button(lesson_1)).to be_html_safe }
88
88
  end
89
89
 
90
90
  context 'many suggestions' do
91
- it { expect(next_button(lesson_1)).to include "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/lessons/#{lesson_2.friendly_name}\">Next: #{lesson_2.name} <i class=\"fa fa-chevron-right\"></i></a>" }
91
+ it { expect(next_button(lesson_1)).to include "<a class=\"btn btn-success btn-block\" role=\"button\" href=\"/lessons/#{lesson_2.friendly_name}\"><span class=\"fa5-text-r\">Next: #{lesson_2.name}</span><i class=\"fas fa-chevron-right\"></i></a>" }
92
92
  it { expect(next_button(lesson_1)).to be_html_safe }
93
93
  end
94
94
  end
@@ -33,11 +33,11 @@ describe('gamification', () => {
33
33
 
34
34
  describe('triggers level change', () => {
35
35
  it('does not trigger when small exp difference', () => {
36
- expect(new mumuki.gamification.LevelProgression(1000).triggersLevelChange(1050)).toBe(false);
36
+ expect(new mumuki.gamification.LevelProgression(1000).triggersLevelChange(50)).toBe(false);
37
37
  });
38
38
 
39
39
  it('does trigger when big exp difference', () => {
40
- expect(new mumuki.gamification.LevelProgression(1000).triggersLevelChange(1500)).toBe(true);
40
+ expect(new mumuki.gamification.LevelProgression(1000).triggersLevelChange(500)).toBe(true);
41
41
  });
42
42
  });
43
43
 
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: 8.1.0
4
+ version: 8.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-03 00:00:00.000000000 Z
11
+ date: 2021-01-08 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: 8.1.0
33
+ version: 8.2.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: 8.1.0
40
+ version: 8.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mumukit-bridge
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.23'
117
+ version: '2.0'
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: '1.23'
124
+ version: '2.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: muvment
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -193,19 +193,19 @@ dependencies:
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: font-awesome-rails
196
+ name: font_awesome5_rails
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '4.7'
201
+ version: '1.3'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '4.7'
208
+ version: '1.3'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: momentjs-rails
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -311,6 +311,9 @@ dependencies:
311
311
  - - "~>"
312
312
  - !ruby/object:Gem::Version
313
313
  version: '2.0'
314
+ - - "<"
315
+ - !ruby/object:Gem::Version
316
+ version: '2.2'
314
317
  type: :development
315
318
  prerelease: false
316
319
  version_requirements: !ruby/object:Gem::Requirement
@@ -318,6 +321,9 @@ dependencies:
318
321
  - - "~>"
319
322
  - !ruby/object:Gem::Version
320
323
  version: '2.0'
324
+ - - "<"
325
+ - !ruby/object:Gem::Version
326
+ version: '2.2'
321
327
  - !ruby/object:Gem::Dependency
322
328
  name: webdrivers
323
329
  requirement: !ruby/object:Gem::Requirement
@@ -704,7 +710,6 @@ files:
704
710
  - spec/dummy/config/application.rb
705
711
  - spec/dummy/config/boot.rb
706
712
  - spec/dummy/config/cable.yml
707
- - spec/dummy/config/database.travis.yml
708
713
  - spec/dummy/config/database.yml
709
714
  - spec/dummy/config/environment.rb
710
715
  - spec/dummy/config/environments/development.rb
@@ -849,121 +854,121 @@ required_rubygems_version: !ruby/object:Gem::Requirement
849
854
  - !ruby/object:Gem::Version
850
855
  version: '0'
851
856
  requirements: []
852
- rubygems_version: 3.0.3
857
+ rubyforge_project:
858
+ rubygems_version: 2.7.6
853
859
  signing_key:
854
860
  specification_version: 4
855
861
  summary: Code assement web application for the Mumuki Platform.
856
862
  test_files:
857
- - spec/controllers/guide_progress_controller_spec.rb
858
- - spec/controllers/discussions_controller_spec.rb
859
- - spec/controllers/organizations_api_controller_spec.rb
860
- - spec/controllers/chapters_controller_spec.rb
861
- - spec/controllers/invitations_controller_spec.rb
862
- - spec/controllers/messages_controller_spec.rb
863
- - spec/controllers/courses_api_controller_spec.rb
864
- - spec/controllers/confirmations_controller_spec.rb
865
- - spec/controllers/students_api_controller_spec.rb
866
- - spec/controllers/api_clients_controller.rb
867
- - spec/controllers/exercise_solutions_controller_spec.rb
868
- - spec/controllers/discussions_messages_controller_spec.rb
869
- - spec/controllers/users_api_controller_spec.rb
870
- - spec/controllers/users_controller_spec.rb
871
863
  - spec/spec_helper.rb
872
- - spec/api_helper.rb
873
- - spec/mailers/user_mailer_spec.rb
874
- - spec/mailers/previews/user_mailer_preview.rb
875
- - spec/javascripts/elipsis-spec.js
876
- - spec/javascripts/csrf-token-spec.js
877
- - spec/javascripts/global-spec.js
878
- - spec/javascripts/events-spec.js
879
- - spec/javascripts/gamification-spec.js
880
- - spec/javascripts/sync-mode-spec.js
881
- - spec/javascripts/exercise-spec.js
882
- - spec/javascripts/timer-spec.js
883
- - spec/javascripts/editors-spec.js
884
- - spec/javascripts/spec-helper.js
885
- - spec/javascripts/speech-bubble-renderer-spec.js
886
- - spec/javascripts/submissions-store-spec.js
887
- - spec/javascripts/results-renderers-spec.js
888
- - spec/javascripts/bridge-spec.js
889
- - spec/javascripts/timeout-spec.js
890
- - spec/helpers/avatar_helper_spec.rb
891
- - spec/helpers/with_navigation_spec.rb
892
- - spec/helpers/exercise_input_helper_spec.rb
893
- - spec/helpers/authors_helper_spec.rb
894
- - spec/helpers/with_choices_spec.rb
895
- - spec/helpers/application_helper_spec.rb
896
- - spec/helpers/breadcrumbs_helper_spec.rb
897
- - spec/helpers/email_helper_spec.rb
898
- - spec/helpers/page_title_helper_spec.rb
899
- - spec/helpers/test_results_rendering_spec.rb
900
- - spec/helpers/icons_helper_spec.rb
901
- - spec/features/complements_flow_spec.rb
902
- - spec/features/progressive_tips_spec.rb
903
- - spec/features/runner_assets_spec.rb
904
- - spec/features/disable_user_flow_spec.rb
905
- - spec/features/links_flow_spec.rb
906
- - spec/features/not_found_public_flow_spec.rb
907
- - spec/features/standard_flow_spec.rb
908
- - spec/features/exercise_flow_spec.rb
909
- - spec/features/disabled_organization_flow_spec.rb
910
- - spec/features/immersive_redirection_spec.rb
911
- - spec/features/topic_flow_spec.rb
912
- - spec/features/home_private_flow_spec.rb
913
- - spec/features/profile_flow_spec.rb
914
- - spec/features/home_public_flow_spec.rb
915
- - spec/features/menu_bar_spec.rb
916
- - spec/features/not_found_private_flow_spec.rb
917
- - spec/features/chapter_spec.rb
918
- - spec/features/discussion_flow_spec.rb
919
- - spec/features/invitations_flow_spec.rb
920
- - spec/features/exams_flow_spec.rb
921
- - spec/features/guides_flow_spec.rb
922
- - spec/features/dynamic_exam_spec.rb
923
- - spec/features/terms_flow_spec.rb
924
- - spec/features/lessons_flow_spec.rb
925
- - spec/features/login_flow_spec.rb
926
- - spec/features/guide_reset_spec.rb
927
- - spec/evaluation_helper.rb
928
- - spec/login_helper.rb
864
+ - spec/teaspoon_env.rb
865
+ - spec/dummy/package.json
866
+ - spec/dummy/config.ru
929
867
  - spec/dummy/db/seeds.rb
930
868
  - spec/dummy/db/schema.rb
931
- - spec/dummy/public/character/animations.json
869
+ - spec/dummy/public/medal/outline.svg
870
+ - spec/dummy/public/error/404.svg
932
871
  - spec/dummy/public/error/500.svg
933
872
  - spec/dummy/public/error/timeout_2.svg
934
873
  - spec/dummy/public/error/401.svg
935
- - spec/dummy/public/error/timeout_3.svg
936
- - spec/dummy/public/error/410.svg
937
- - spec/dummy/public/error/404.svg
938
874
  - spec/dummy/public/error/timeout_1.svg
875
+ - spec/dummy/public/error/timeout_3.svg
939
876
  - spec/dummy/public/error/403.svg
940
- - spec/dummy/public/medal/outline.svg
941
- - spec/dummy/package.json
942
- - spec/dummy/config/initializers/filter_parameter_logging.rb
943
- - spec/dummy/config/initializers/wrap_parameters.rb
877
+ - spec/dummy/public/error/410.svg
878
+ - spec/dummy/public/character/animations.json
879
+ - spec/dummy/config/environment.rb
880
+ - spec/dummy/config/secrets.yml
881
+ - spec/dummy/config/puma.rb
882
+ - spec/dummy/config/application.rb
944
883
  - spec/dummy/config/initializers/cookies_serializer.rb
884
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
945
885
  - spec/dummy/config/initializers/assets.rb
946
- - spec/dummy/config/database.yml
947
- - spec/dummy/config/routes.rb
886
+ - spec/dummy/config/initializers/wrap_parameters.rb
948
887
  - spec/dummy/config/cable.yml
888
+ - spec/dummy/config/routes.rb
889
+ - spec/dummy/config/database.yml
949
890
  - spec/dummy/config/spring.rb
950
- - spec/dummy/config/boot.rb
951
- - spec/dummy/config/puma.rb
952
- - spec/dummy/config/environments/development.rb
953
891
  - spec/dummy/config/environments/test.rb
954
- - spec/dummy/config/database.travis.yml
892
+ - spec/dummy/config/environments/development.rb
893
+ - spec/dummy/config/boot.rb
955
894
  - spec/dummy/config/rabbit.yml
956
- - spec/dummy/config/secrets.yml
957
895
  - spec/dummy/config/locales/en.yml
958
- - spec/dummy/config/application.rb
959
- - spec/dummy/config/environment.rb
960
896
  - spec/dummy/Rakefile
961
- - spec/dummy/bin/setup
962
897
  - spec/dummy/bin/rake
898
+ - spec/dummy/bin/setup
963
899
  - spec/dummy/bin/bundle
964
- - spec/dummy/bin/update
965
- - spec/dummy/bin/yarn
966
900
  - spec/dummy/bin/rails
967
- - spec/dummy/config.ru
968
- - spec/teaspoon_env.rb
901
+ - spec/dummy/bin/yarn
902
+ - spec/dummy/bin/update
903
+ - spec/mailers/user_mailer_spec.rb
904
+ - spec/mailers/previews/user_mailer_preview.rb
905
+ - spec/api_helper.rb
906
+ - spec/features/runner_assets_spec.rb
907
+ - spec/features/links_flow_spec.rb
908
+ - spec/features/not_found_private_flow_spec.rb
909
+ - spec/features/progressive_tips_spec.rb
910
+ - spec/features/disabled_organization_flow_spec.rb
911
+ - spec/features/complements_flow_spec.rb
912
+ - spec/features/profile_flow_spec.rb
913
+ - spec/features/guide_reset_spec.rb
914
+ - spec/features/menu_bar_spec.rb
915
+ - spec/features/guides_flow_spec.rb
916
+ - spec/features/exams_flow_spec.rb
917
+ - spec/features/dynamic_exam_spec.rb
918
+ - spec/features/discussion_flow_spec.rb
919
+ - spec/features/login_flow_spec.rb
920
+ - spec/features/disable_user_flow_spec.rb
921
+ - spec/features/home_public_flow_spec.rb
922
+ - spec/features/home_private_flow_spec.rb
923
+ - spec/features/terms_flow_spec.rb
924
+ - spec/features/lessons_flow_spec.rb
925
+ - spec/features/topic_flow_spec.rb
926
+ - spec/features/standard_flow_spec.rb
927
+ - spec/features/immersive_redirection_spec.rb
928
+ - spec/features/not_found_public_flow_spec.rb
929
+ - spec/features/exercise_flow_spec.rb
930
+ - spec/features/invitations_flow_spec.rb
931
+ - spec/features/chapter_spec.rb
969
932
  - spec/capybara_helper.rb
933
+ - spec/evaluation_helper.rb
934
+ - spec/javascripts/submissions-store-spec.js
935
+ - spec/javascripts/exercise-spec.js
936
+ - spec/javascripts/spec-helper.js
937
+ - spec/javascripts/results-renderers-spec.js
938
+ - spec/javascripts/timer-spec.js
939
+ - spec/javascripts/elipsis-spec.js
940
+ - spec/javascripts/gamification-spec.js
941
+ - spec/javascripts/bridge-spec.js
942
+ - spec/javascripts/timeout-spec.js
943
+ - spec/javascripts/events-spec.js
944
+ - spec/javascripts/editors-spec.js
945
+ - spec/javascripts/sync-mode-spec.js
946
+ - spec/javascripts/speech-bubble-renderer-spec.js
947
+ - spec/javascripts/global-spec.js
948
+ - spec/javascripts/csrf-token-spec.js
949
+ - spec/controllers/users_controller_spec.rb
950
+ - spec/controllers/messages_controller_spec.rb
951
+ - spec/controllers/students_api_controller_spec.rb
952
+ - spec/controllers/chapters_controller_spec.rb
953
+ - spec/controllers/confirmations_controller_spec.rb
954
+ - spec/controllers/courses_api_controller_spec.rb
955
+ - spec/controllers/api_clients_controller.rb
956
+ - spec/controllers/discussions_controller_spec.rb
957
+ - spec/controllers/invitations_controller_spec.rb
958
+ - spec/controllers/users_api_controller_spec.rb
959
+ - spec/controllers/discussions_messages_controller_spec.rb
960
+ - spec/controllers/exercise_solutions_controller_spec.rb
961
+ - spec/controllers/organizations_api_controller_spec.rb
962
+ - spec/controllers/guide_progress_controller_spec.rb
963
+ - spec/login_helper.rb
964
+ - spec/helpers/page_title_helper_spec.rb
965
+ - spec/helpers/icons_helper_spec.rb
966
+ - spec/helpers/breadcrumbs_helper_spec.rb
967
+ - spec/helpers/test_results_rendering_spec.rb
968
+ - spec/helpers/application_helper_spec.rb
969
+ - spec/helpers/avatar_helper_spec.rb
970
+ - spec/helpers/authors_helper_spec.rb
971
+ - spec/helpers/with_choices_spec.rb
972
+ - spec/helpers/exercise_input_helper_spec.rb
973
+ - spec/helpers/with_navigation_spec.rb
974
+ - spec/helpers/email_helper_spec.rb