mumuki-laboratory 9.0.3 → 9.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +10 -2
  3. data/app/assets/javascripts/mumuki_laboratory/application/discussions.js +49 -8
  4. data/app/assets/javascripts/mumuki_laboratory/application/gamification.js +3 -3
  5. data/app/assets/javascripts/mumuki_laboratory/application/kids.js +11 -7
  6. data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +3 -3
  7. data/app/assets/javascripts/mumuki_laboratory/application/messages.js +3 -3
  8. data/app/assets/javascripts/mumuki_laboratory/application/mu-modal-carrousel.js +4 -4
  9. data/app/assets/javascripts/mumuki_laboratory/application/multiple-files.js +18 -5
  10. data/app/assets/javascripts/mumuki_laboratory/application/multiple-scenarios.js +1 -1
  11. data/app/assets/javascripts/mumuki_laboratory/application/organization.js +32 -0
  12. data/app/assets/javascripts/mumuki_laboratory/application/primary.js +4 -4
  13. data/app/assets/javascripts/mumuki_laboratory/application/profile.js +0 -6
  14. data/app/assets/javascripts/mumuki_laboratory/application/progress.js +1 -1
  15. data/app/assets/javascripts/mumuki_laboratory/application/speech-bubble-renderer.js +1 -1
  16. data/app/assets/javascripts/mumuki_laboratory/application/submission.js +4 -3
  17. data/app/assets/javascripts/mumuki_laboratory/application/submissions-store.js +1 -1
  18. data/app/assets/javascripts/mumuki_laboratory/application/toast.js +3 -0
  19. data/app/assets/javascripts/mumuki_laboratory/application/tooltip.js +1 -1
  20. data/app/assets/javascripts/mumuki_laboratory/application/upload.js +2 -2
  21. data/app/assets/javascripts/mumuki_laboratory/application/user.js +34 -1
  22. data/app/assets/stylesheets/mumuki_laboratory/application.scss +0 -1
  23. data/app/assets/stylesheets/mumuki_laboratory/application/_errors.scss +1 -1
  24. data/app/assets/stylesheets/mumuki_laboratory/application/_layout.scss +1 -27
  25. data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +1 -2
  26. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_activity.scss +14 -0
  27. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_avatar.scss +5 -0
  28. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_breadcrumb.scss +2 -2
  29. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_datepicker.scss +0 -4
  30. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +49 -59
  31. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_editor.scss +16 -18
  32. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_exercise_assignment.scss +2 -11
  33. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_exercise_results.scss +1 -7
  34. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_faqs.scss +3 -3
  35. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_flash.scss +7 -46
  36. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +19 -4
  37. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids_results.scss +18 -23
  38. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +1 -9
  39. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_overlap.scss +1 -1
  40. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_progress_bar.scss +5 -5
  41. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_terms.scss +3 -2
  42. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_timer.scss +1 -3
  43. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_menu.scss +14 -7
  44. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +1 -2
  45. data/app/controllers/application_controller.rb +4 -2
  46. data/app/controllers/discussions_messages_controller.rb +9 -3
  47. data/app/controllers/users_controller.rb +13 -0
  48. data/app/helpers/application_helper.rb +5 -5
  49. data/app/helpers/assignment_result_helper.rb +3 -2
  50. data/app/helpers/assistance_box_helper.rb +1 -1
  51. data/app/helpers/concerns/with_student_path_navigation.rb +8 -3
  52. data/app/helpers/concerns/with_student_path_navigation/continue_navigation.rb +1 -1
  53. data/app/helpers/concerns/with_student_path_navigation/finish_navigation.rb +1 -1
  54. data/app/helpers/concerns/with_student_path_navigation/next_parent_navigation.rb +7 -0
  55. data/app/helpers/concerns/with_student_path_navigation/revisit_navigation.rb +1 -1
  56. data/app/helpers/discussions_helper.rb +64 -23
  57. data/app/helpers/editor_tabs_helper.rb +10 -6
  58. data/app/helpers/email_helper.rb +2 -2
  59. data/app/helpers/exercise_input_helper.rb +2 -3
  60. data/app/helpers/links_helper.rb +12 -9
  61. data/app/helpers/menu_bar_helper.rb +1 -1
  62. data/app/helpers/messages_helper.rb +1 -1
  63. data/app/helpers/multiple_file_editor_helper.rb +2 -1
  64. data/app/helpers/overlapped_buttons_helper.rb +22 -12
  65. data/app/helpers/profile_helper.rb +3 -3
  66. data/app/helpers/toast_helper.rb +27 -0
  67. data/app/helpers/user_activity_helper.rb +48 -0
  68. data/app/helpers/user_menu_helper.rb +4 -0
  69. data/app/views/book/show.html.erb +2 -2
  70. data/app/views/certificates/verify.html.erb +1 -1
  71. data/app/views/chapters/show.html.erb +2 -2
  72. data/app/views/discussions/_description_message.html.erb +1 -1
  73. data/app/views/discussions/_message.html.erb +32 -7
  74. data/app/views/discussions/_new_message.html.erb +13 -2
  75. data/app/views/discussions/index.html.erb +8 -10
  76. data/app/views/discussions/new.html.erb +2 -2
  77. data/app/views/discussions/show.html.erb +20 -12
  78. data/app/views/exam_registrations/show.html.erb +10 -11
  79. data/app/views/exercise_solutions/_assistant_rules_box.html.erb +1 -1
  80. data/app/views/exercise_solutions/_contextualization_results_body.html.erb +1 -1
  81. data/app/views/exercise_solutions/_contextualization_results_container.html.erb +1 -1
  82. data/app/views/exercise_solutions/_kids_results_button.html.erb +2 -2
  83. data/app/views/exercise_solutions/_results.html.erb +1 -1
  84. data/app/views/exercises/_exercise_assignment.html.erb +2 -2
  85. data/app/views/exercises/_exercise_skipped.html.erb +1 -1
  86. data/app/views/exercises/_read_only.html.erb +108 -105
  87. data/app/views/exercises/show.html.erb +7 -7
  88. data/app/views/guides/_guide.html.erb +1 -1
  89. data/app/views/guides/_guide_container.html.erb +4 -4
  90. data/app/views/invitations/_invitation_form.html.erb +5 -4
  91. data/app/views/layouts/_authoring.html.erb +1 -1
  92. data/app/views/layouts/_discussions.html.erb +7 -7
  93. data/app/views/layouts/_kids.html.erb +5 -5
  94. data/app/views/layouts/_kindergarten.html.erb +10 -6
  95. data/app/views/layouts/_main.html.erb +10 -10
  96. data/app/views/layouts/_organizations_listing.html.erb +2 -2
  97. data/app/views/layouts/_progress_bar.html.erb +2 -0
  98. data/app/views/layouts/_submission_result_error.html.erb +1 -1
  99. data/app/views/layouts/_test_results.html.erb +1 -1
  100. data/app/views/layouts/_timer.html.erb +1 -1
  101. data/app/views/layouts/_user_menu.html.erb +4 -3
  102. data/app/views/layouts/application.html.erb +39 -42
  103. data/app/views/layouts/exercise_inputs/editors/_code.html.erb +4 -4
  104. data/app/views/layouts/exercise_inputs/editors/_free_form.html.erb +1 -1
  105. data/app/views/layouts/exercise_inputs/editors/_multiple_choice.html.erb +7 -9
  106. data/app/views/layouts/exercise_inputs/editors/_multiple_files.html.erb +10 -10
  107. data/app/views/layouts/exercise_inputs/editors/_single_choice.html.erb +6 -8
  108. data/app/views/layouts/exercise_inputs/editors/_text.html.erb +2 -3
  109. data/app/views/layouts/exercise_inputs/editors/_upload.html.erb +5 -5
  110. data/app/views/layouts/exercise_inputs/forms/_form.html.erb +1 -1
  111. data/app/views/layouts/exercise_inputs/forms/_interactive_form.html.erb +2 -2
  112. data/app/views/layouts/exercise_inputs/forms/_kids_form.html.erb +1 -1
  113. data/app/views/layouts/exercise_inputs/forms/_playground_form.html.erb +2 -2
  114. data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +13 -9
  115. data/app/views/layouts/exercise_inputs/layouts/_input_primary.html.erb +2 -2
  116. data/app/views/layouts/exercise_inputs/layouts/_input_right.html.erb +2 -2
  117. data/app/views/layouts/exercise_inputs/read_only_editors/_code.html.erb +1 -1
  118. data/app/views/layouts/exercise_inputs/read_only_editors/_free_form.html.erb +1 -1
  119. data/app/views/layouts/exercise_inputs/read_only_editors/_multiple_choice.html.erb +4 -4
  120. data/app/views/layouts/exercise_inputs/read_only_editors/_multiple_files.html.erb +2 -2
  121. data/app/views/layouts/exercise_inputs/read_only_editors/_single_choice.html.erb +4 -4
  122. data/app/views/layouts/exercise_inputs/read_only_editors/_text.erb +1 -1
  123. data/app/views/layouts/modals/_avatar_picker.html.erb +2 -5
  124. data/app/views/layouts/modals/_guide_corollary.html.erb +4 -8
  125. data/app/views/layouts/modals/_kids_context.html.erb +7 -5
  126. data/app/views/layouts/modals/_kids_results.html.erb +2 -2
  127. data/app/views/layouts/modals/_kids_results_aborted.html.erb +2 -2
  128. data/app/views/layouts/modals/_kindergarten_context.html.erb +3 -3
  129. data/app/views/layouts/modals/_kindergarten_results.html.erb +3 -3
  130. data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +2 -2
  131. data/app/views/layouts/modals/_level_up.html.erb +2 -5
  132. data/app/views/layouts/modals/_new_message.html.erb +5 -5
  133. data/app/views/notifications/_dropdown.html.erb +3 -3
  134. data/app/views/users/_activity_indicator.html.erb +17 -0
  135. data/app/views/users/_edit_user_form.html.erb +6 -6
  136. data/app/views/users/_profile_fields.html.erb +6 -6
  137. data/app/views/users/_user_form.html.erb +2 -2
  138. data/app/views/users/activity.html.erb +37 -0
  139. data/app/views/users/certificates.html.erb +26 -24
  140. data/app/views/users/discussions.html.erb +23 -21
  141. data/app/views/users/messages.html.erb +22 -20
  142. data/app/views/users/show.html.erb +5 -3
  143. data/app/views/users/terms.html.erb +4 -2
  144. data/config/initializers/inflections.rb +3 -0
  145. data/config/routes.rb +3 -0
  146. data/lib/mumuki/laboratory.rb +1 -1
  147. data/lib/mumuki/laboratory/extensions.rb +1 -0
  148. data/lib/mumuki/laboratory/extensions/date_and_time.rb +11 -0
  149. data/lib/mumuki/laboratory/locales/en.yml +28 -2
  150. data/lib/mumuki/laboratory/locales/es-CL.yml +33 -4
  151. data/lib/mumuki/laboratory/locales/es.yml +33 -4
  152. data/lib/mumuki/laboratory/locales/pt.yml +34 -3
  153. data/lib/mumuki/laboratory/version.rb +1 -1
  154. data/spec/capybara_helper.rb +1 -0
  155. data/spec/controllers/discussions_messages_controller_spec.rb +84 -3
  156. data/spec/dummy/db/schema.rb +23 -3
  157. data/spec/features/discussion_flow_spec.rb +22 -2
  158. data/spec/features/exercise_flow_spec.rb +1 -1
  159. data/spec/features/guide_reset_spec.rb +1 -1
  160. data/spec/features/terms_flow_spec.rb +1 -2
  161. data/spec/features/user_activity_flow_spec.rb +65 -0
  162. data/spec/helpers/breadcrumbs_helper_spec.rb +2 -2
  163. data/spec/helpers/user_activity_helper_spec.rb +32 -0
  164. data/spec/helpers/with_navigation_spec.rb +36 -13
  165. data/spec/javascripts/editors-spec.js +3 -3
  166. data/spec/javascripts/kids-button-spec.js +2 -2
  167. data/spec/javascripts/upload-spec.js +8 -8
  168. metadata +133 -123
  169. data/app/assets/stylesheets/mumuki_laboratory/application/hovers.scss +0 -12
  170. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_checkboxes.scss +0 -34
  171. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_guide_corollary.scss +0 -9
@@ -2,11 +2,11 @@
2
2
  <div class="mu-kids-character-speech-bubble <%= 'no-tabs' unless exercise.hint? %>">
3
3
  <% if exercise.hint? %>
4
4
  <ul class="mu-kids-character-speech-bubble-tabs">
5
- <li class="mu-kids-description active" data-target="description" title="<%= t :task %>">
5
+ <li class="mu-kids-description active" data-bs-toggle="tooltip" data-bs-target="description" title="<%= t :task %>">
6
6
  <i class="far fa-fw fa-file-alt"></i>
7
7
  </li>
8
8
  <li class="separator"></li>
9
- <li class="mu-kids-hint blink" data-target="hint" title="<%= t :need_a_hint %>">
9
+ <li class="mu-kids-hint blink" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-target="hint" title="<%= t :need_a_hint %>">
10
10
  <i class="far fa-fw fa-lightbulb"></i>
11
11
  </li>
12
12
  </ul>
@@ -15,10 +15,10 @@
15
15
  <i class="mu-kids-prev-speech fas fa-fw fa-caret-up"></i>
16
16
  <i class="mu-kids-next-speech fas fa-fw fa-caret-down"></i>
17
17
  <div class="description"><%= exercise.description_task %></div>
18
- <div class="hint" style="display: none"><%= exercise.hint_html %></div>
18
+ <div class="hint"><%= exercise.hint_html %></div>
19
19
  </div>
20
- <div class="mu-kids-character-speech-bubble-failed <%= current_user? && @assignment.status %>" style="display: none"></div>
20
+ <div class="mu-kids-character-speech-bubble-failed <%= current_user? && @assignment.status %> d-none"></div>
21
21
  </div>
22
- <div id="mu-kids-discussion-link-html" class="hidden">
22
+ <div id="mu-kids-discussion-link-html" class="d-none">
23
23
  <%= kids_read_discussions_link(exercise) %>
24
24
  </div>
@@ -5,11 +5,13 @@
5
5
  <span class="mu-kindergarten-exercise-description"><%= exercise.description_task %></span>
6
6
  <div class="mu-kindergarten-buttons">
7
7
  <button class="mu-kindergarten-show-context" onclick="mumuki.kids.context.show()">
8
- <img class="mu-kindergarten-button-image" src="https://mumuki.io/static/show-context.svg" alt="" title="<%= t :see_context %>">
8
+ <img class="mu-kindergarten-button-image" src="https://mumuki.io/static/show-context.svg"
9
+ alt="" data-bs-toggle="tooltip" title="<%= t :see_context %>">
9
10
  </button>
10
11
  <button class="mu-kindergarten-play-description" onclick="mumuki.kids.speech.click('.mu-kindergarten-exercise-description', '<%= exercise.locale %>')">
11
- <img class="mu-kindergarten-button-image mu-kindergarten-play" src="https://mumuki.io/static/audio-play.svg" alt="" title="<%= t :listen_statement %>">
12
- <img class="mu-kindergarten-button-image mu-kindergarten-stop hidden" src="https://mumuki.io/static/audio-stop.svg" alt="">
12
+ <img class="mu-kindergarten-button-image mu-kindergarten-play" src="https://mumuki.io/static/audio-play.svg"
13
+ alt="" data-bs-toggle="tooltip" data-bs-placement="bottom" title="<%= t :listen_statement %>">
14
+ <img class="mu-kindergarten-button-image mu-kindergarten-stop d-none" src="https://mumuki.io/static/audio-stop.svg" alt="">
13
15
  </button>
14
16
  </div>
15
17
  </div>
@@ -17,7 +19,8 @@
17
19
  <div class="mu-kindergarten-hint">
18
20
  <% if exercise.hint? %>
19
21
  <button class="mu-hint-light" onclick="mumuki.kids.hint.toggle()">
20
- <img class="mu-hint-light on" src="https://mumuki.io/static/lamparita_on.svg" alt="" title="<%= t :need_a_hint %>">
22
+ <img class="mu-hint-light on" src="https://mumuki.io/static/lamparita_on.svg"
23
+ alt="" data-bs-toggle="tooltip" data-bs-placement="top" title="<%= t :need_a_hint %>">
21
24
  </button>
22
25
  <div class="mu-kindergarten-light-speech-bubble">
23
26
  <span class="mu-kindergarten-exercise-hint">
@@ -28,11 +31,12 @@
28
31
  </button>
29
32
  </div>
30
33
  <% else %>
31
- <img class="mu-hint-light off" src="https://mumuki.io/static/lamparita_off.svg" alt="" title="<%= t :no_need_hint %>">
34
+ <img class="mu-hint-light off" src="https://mumuki.io/static/lamparita_off.svg"
35
+ alt="" data-bs-toggle="tooltip" data-bs-placement="left" title="<%= t :no_need_hint %>">
32
36
  <% end %>
33
37
  </div>
34
38
  </div>
35
39
 
36
- <div id="mu-kids-discussion-link-html" class="hidden">
40
+ <div id="mu-kids-discussion-link-html" class="d-none">
37
41
  <%= kids_read_discussions_link(exercise) %>
38
42
  </div>
@@ -18,24 +18,24 @@
18
18
  <%= login_form.header_html %>
19
19
  </head>
20
20
  <body>
21
+
22
+ <%= hidden_field_tag "mu-user-id", current_user&.id %>
23
+ <%= hidden_field_tag "mu-organization-id", Organization.current.id %>
24
+
21
25
  <% if should_choose_organization? %>
22
26
  <%= render partial: 'layouts/organization_chooser' %>
23
27
  <% end %>
24
28
 
25
29
  <%= yield :navbar %>
26
30
 
27
- <div class="<%= exercise_container_type %><%= @kids ? '-fluid' : '' %>" id="wrap">
28
- <div id="toast-container" class="toast-bottom-left">
31
+ <div class="<%= exercise_container_type %><%= ' mb-5' unless input_kids? %>" id="wrap">
32
+ <div class="toast-container bottom-0 start-0 p-3">
29
33
  <% if notice %>
30
- <div class="alert toast toast-success" role="alert">
31
- <%= notice.html_safe %>
32
- <button type="button" class="close" data-dismiss="alert">&times;</button>
33
- </div>
34
+ <%= toast_notice(notice) %>
34
35
  <% elsif alert %>
35
- <div class="alert toast toast-error" role="alert">
36
- <%= alert.html_safe %>
37
- <button type="button" class="close" data-dismiss="alert">&times;</button>
38
- </div>
36
+ <%= toast_alert(alert) %>
37
+ <% elsif info %>
38
+ <%= toast_info(info) %>
39
39
  <% end %>
40
40
  </div>
41
41
 
@@ -1,10 +1,10 @@
1
1
  <% current_immersive_organizations.each do |organization| %>
2
2
  <div class="row">
3
3
  <div class="col-md-6 organization-row">
4
- <%= image_tag(organization.banner_url, height: 50, class: 'pull-left') %>
4
+ <%= image_tag(organization.banner_url, height: 50, class: 'float-start') %>
5
5
  </div>
6
6
  <div class="col-md-6 organization-row">
7
- <%= link_to(t(:go_to, organization: organization.name), current_immersive_path(organization), class: 'btn btn-success pull-right') %>
7
+ <%= link_to(t(:go_to, organization: organization.name), current_immersive_path(organization), class: 'btn btn-complementary float-end') %>
8
8
  </div>
9
9
  </div>
10
10
  <% end %>
@@ -6,6 +6,8 @@
6
6
  <%= turbolinks_enable_for exercise %>
7
7
  href="<%= exercise_path(exercise)%>"
8
8
  aria-label="<%= exercise.navigable_name %>"
9
+ data-bs-toggle="tooltip"
10
+ data-bs-placement="bottom"
9
11
  title="<%= exercise.navigable_name %>"
10
12
  data-mu-exercise-id="<%= exercise.id %>"
11
13
  class="<%= class_for_progress_list_item(assignment, exercise == actual)%>">
@@ -1,4 +1,4 @@
1
- <div class="bs-callout bs-callout-broken submission-result-error" style="display: none;">
1
+ <div class="bs-callout bs-callout-broken submission-result-error d-none">
2
2
  <h4>
3
3
  <strong><%= t :errored %></strong>
4
4
  </h4>
@@ -13,7 +13,7 @@
13
13
  <%= status_icon(test_result[:status]) %>
14
14
  <%= render_test_result_header test_result %>
15
15
  <% unless contextualization.visible_success_output? %>
16
- <a data-toggle="collapse" href="#example-result-<%= index %>" class="example-see-more"><%= t :view_details %></a>
16
+ <a data-bs-toggle="collapse" href="#example-result-<%= index %>" class="badge bg-light text-dark mu-view-details"><%= t :view_details %></a>
17
17
  <% end %>
18
18
  </span>
19
19
  <% else %>
@@ -1,5 +1,5 @@
1
1
  <div class="row">
2
- <div class="col-md-3 col-md-offset-5">
2
+ <div class="text-center">
3
3
  <i class="timer text-center far fa-clock"></i>
4
4
  <i class="timer timer-text text-center"><%= t :time_left %></i>
5
5
  <i id="timer" class="timer timer-text text-center"></i>
@@ -2,16 +2,17 @@
2
2
  <div class="mu-user-menu">
3
3
  <div class="mu-user-menu-content">
4
4
  <%= user_menu_header %>
5
- <div class="col-xs-12 mu-user-menu-items hidden-sm-screen">
5
+ <div class="mu-user-menu-items mu-hidden-sm-screen">
6
6
  <%= profile_user_menu_link %>
7
7
  <%= user_menu_divider %>
8
8
  <%= messages_user_menu_link %>
9
9
  <%= discussions_user_menu_link %>
10
10
  <%= user_menu_divider %>
11
+ <%= activity_user_menu_link %>
11
12
  <%= certificates_user_menu_link %>
12
13
  </div>
13
14
  </div>
14
- <div class="mu-user-menu-divider vertical hidden-sm hidden-xs"></div>
15
+ <div class="mu-user-menu-divider vertical d-none d-md-block"></div>
15
16
  </div>
17
+ <div class="mu-user-menu-divider horizontal d-block d-md-none"></div>
16
18
  </div>
17
- <div class="mu-user-menu-divider horizontal visible-sm visible-xs"></div>
@@ -1,54 +1,51 @@
1
1
  <%= content_for :navbar do %>
2
2
  <%= hidden_field_tag("mu-current-exp", UserStats.exp_for(@current_user)) if in_gamified_context? %>
3
- <div class="<%= exercise_container_type %>">
4
- <nav class="mu-navbar">
5
- <div class="mu-navbar-breadcrumb hidden-xs">
6
- <ul class="mu-breadcrumb-list">
7
- <%= yield :breadcrumbs %>
8
- </ul>
9
- </div>
10
- <div class="dropdown hamburguer-breadcrumb hidden-sm hidden-md hidden-lg">
11
- <% if content_for? :breadcrumbs %>
12
- <span class="hamburguer" id="profileDropdown" data-toggle="dropdown">
13
- <i class="fas fa-bars"></i>
14
- </span>
15
- <ul class="dropdown-menu dropdown-menu-left" aria-labelledby="profileDropdown">
16
- <%= yield :breadcrumbs %>
17
- </ul>
18
- <% end %>
19
- </div>
20
- <div class="mu-navbar-avatar">
21
- <% if current_logged_user? %>
22
- <% if in_gamified_context? %>
23
- <div class="mu-navbar-element">
24
- <i class="fas fa-star fa-fw fa-2x mu-navbar-icon mu-level-tooltip" data-toggle="tooltip" data-placement="bottom" level="<%= t(:level) %>"></i>
25
- <span class="mu-level-number"></span>
3
+ <div class="<%= exercise_container_type %> px-0">
4
+ <nav class="navbar navbar-light navbar-expand-lg mu-navbar">
5
+ <div class="container-fluid">
6
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#muNavbar" aria-controls="muNavbar" aria-expanded="false" aria-label="Toggle navigation">
7
+ <span class="navbar-toggler-icon"></span>
8
+ </button>
9
+ <div class="mu-navbar-avatar order-lg-2">
10
+ <% if current_logged_user? %>
11
+ <% if in_gamified_context? %>
12
+ <div class="mu-navbar-element">
13
+ <i class="fas fa-star fa-fw fa-2x mu-navbar-icon mu-level-tooltip" data-bs-toggle="tooltip" data-bs-placement="bottom" level="<%= t(:level) %>"></i>
14
+ <span class="mu-level-number"></span>
15
+ </div>
16
+ <% end %>
17
+ <%= render partial: 'notifications/dropdown' %>
18
+ <div class="dropdown mu-navbar-element">
19
+ <div id="profileDropdown" class="profile-dropdown dropdown-toggle" data-bs-toggle="dropdown" aria-label="<%= t(:user) %>" role="menu" tabindex="0">
20
+ <%= profile_picture_for current_user %>
21
+ </div>
22
+ <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="profileDropdown">
23
+ <%= menu_bar_list_items %>
24
+ <% if any_menu_bar_links? %>
25
+ <li class="dropdown-divider"></li>
26
+ <% end %>
27
+ <% if faqs_enabled_here? %>
28
+ <%= menu_link_to_faqs %>
29
+ <li class="dropdown-divider"></li>
30
+ <% end %>
31
+ <%= logout_menu_link %>
32
+ </ul>
26
33
  </div>
34
+ <% else %>
35
+ <%= login_button %>
27
36
  <% end %>
28
- <%= render partial: 'notifications/dropdown' %>
29
- <div class="dropdown mu-navbar-element">
30
- <div id="profileDropdown" class="profile-dropdown" data-toggle="dropdown" aria-label="<%= t(:user) %>" role="menu" tabindex="0">
31
- <%= profile_picture_for current_user %>
32
- <span class="caret"></span>
33
- </div>
34
- <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="profileDropdown">
35
- <%= menu_bar_list_items %>
36
- <% if any_menu_bar_links? %>
37
- <li class="divider"></li>
38
- <% end %>
39
- <% if faqs_enabled_here? %>
40
- <%= menu_link_to_faqs %>
41
- <li class="divider"></li>
42
- <% end %>
43
- <%= logout_menu_link %>
37
+ </div>
38
+ <div class="collapse navbar-collapse mu-navbar-breadcrumb-container" id="muNavbar">
39
+ <div class="mu-navbar-breadcrumb order-lg-1">
40
+ <ul class="navbar-nav mu-breadcrumb-list">
41
+ <%= yield :breadcrumbs %>
44
42
  </ul>
45
43
  </div>
46
- <% else %>
47
- <%= login_button %>
48
- <% end %>
44
+ </div>
49
45
  </div>
50
46
  </nav>
51
47
  </div>
48
+
52
49
  <% end %>
53
50
 
54
51
  <% content_for :footer do %>
@@ -1,4 +1,4 @@
1
- <div class="field form-group editor-code">
1
+ <div class="editor-code">
2
2
  <%= form.editor :content, 'dynamic',
3
3
  placeholder: t(:editor_placeholder),
4
4
  class: 'form-control editor',
@@ -6,8 +6,8 @@
6
6
  data: {lines: 17},
7
7
  autocomplete: 'off' %>
8
8
  <div class="mu-overlapped">
9
- <a class="editor-resize"> <%= expand_icon %></a>
10
- <a class="editor-format"><%= format_icon %></a>
11
- <a class="editor-reset submission-reset" data-confirm="<%= t(:confirm_reset) %>"><%= restart_icon %></a>
9
+ <%= expand_icon %>
10
+ <%= format_icon %>
11
+ <%= restart_icon 'editor', {'data-confirm': t(:confirm_reset)} %>
12
12
  </div>
13
13
  </div>
@@ -1,4 +1,4 @@
1
- <div class="form-group">
1
+ <div>
2
2
  <%= form.hidden_field :content, value: @current_content %>
3
3
  <%= raw @exercise.free_form_editor_source %>
4
4
  </div>
@@ -1,10 +1,8 @@
1
- <div class="form-group">
2
- <input id="solution_content" type="text" name="solution[content]" style="display: none">
3
- <% @exercise.pretty_choices.each do |choice| %>
4
- <div class="field checkbox complementary complementary-checkbox">
5
- <%= check_box_tag(choice.id, '1', checked?(choice, @current_content), class: 'solution-choice', 'data-index' => choice.index) %>
6
- <%= label_tag(choice.id, choice.text) %>
7
- </div>
8
- <% end %>
9
- </div>
1
+ <input class="d-none" id="solution_content" type="text" name="solution[content]">
2
+ <% @exercise.pretty_choices.each do |choice| %>
3
+ <div class="form-check">
4
+ <%= check_box_tag(choice.id, '1', checked?(choice, @current_content), class: 'solution-choice form-check-input', 'data-index' => choice.index) %>
5
+ <%= label_tag(choice.id, choice.text, class: 'form-check-label') %>
6
+ </div>
7
+ <% end %>
10
8
 
@@ -1,22 +1,22 @@
1
- <div class="field form-group editor-code">
2
-
1
+ <div class="editor-code">
3
2
  <div class="editor-files">
4
3
  <span class="files-tabs">
5
- <ul class="nav nav-tabs">
4
+ <ul class="nav nav-tabs" role="tablist">
6
5
  <% @files.each_with_index do |file, index| %>
7
- <li role="presentation" class="file-tab <%= 'active' if index == 0 %>" data-target="#editor-file-<%= index %>" tabindex='0' data-toggle='tab'>
8
- <a class="file-name" href="#"><%= file.name %></a> <i class="delete-file-button fas fa-times"></i>
6
+ <li class="nav-item file-tab" role="presentation">
7
+ <a class="file-name nav-link <%= 'active' if index == 0 %>" href="#" role="tab" data-bs-target="#editor-file-<%= index %>"
8
+ tabindex='0' data-bs-toggle='tab'><%= file.name %></a> <i class="delete-file-button fas fa-times"></i>
9
9
  </li>
10
10
  <% end %>
11
11
  </ul>
12
- <i class="add-file-button fas fa-plus"></i>
12
+ <%= fa_icon :plus, class: 'add-file-button' %>
13
13
  </span>
14
14
 
15
15
  <%= multifile_hidden_inputs %>
16
16
 
17
17
  <div class="tab-content">
18
18
  <% @files.each_with_index do |file, index| %>
19
- <div role="tabpanel" class="file-editor tab-pane mu-input-panel <%= 'fade in active' if index == 0 %>" id="editor-file-<%= index %>">
19
+ <div role="tabpanel" class="file-editor tab-pane mu-input-panel <%= 'fade show active' if index == 0 %>" id="editor-file-<%= index %>">
20
20
  <%= form.editor "content[#{file.name}]", file.highlight_mode,
21
21
  placeholder: t(:editor_placeholder),
22
22
  class: 'form-control editor',
@@ -27,9 +27,9 @@
27
27
  </div>
28
28
 
29
29
  <div class="mu-overlapped multiple-files">
30
- <a class="editor-resize"> <%= expand_icon %></a>
31
- <a class="editor-format"><%= format_icon %></a>
32
- <!--<a class="editor-reset submission-reset" data-confirm="<%= t(:confirm_reset) %>"><%= restart_icon %></a> -->
30
+ <%= expand_icon %>
31
+ <%= format_icon %>
32
+ <%= restart_icon 'editor', {'data-confirm': t(:confirm_reset), 'data-multiple-files': 'true'} %>
33
33
  </div>
34
34
  </div>
35
35
  </div>
@@ -1,8 +1,6 @@
1
- <div class="form-group">
2
- <% @exercise.pretty_choices.each do |choice| %>
3
- <div class="field radio complementary complementary-radio">
4
- <%= form.radio_button(:content, choice.value, checked: checked?(choice, @current_content), id: choice.id, required: true) %>
5
- <%= label_tag(choice.id, choice.text) %>
6
- </div>
7
- <% end %>
8
- </div>
1
+ <% @exercise.pretty_choices.each do |choice| %>
2
+ <div class="form-check">
3
+ <%= form.radio_button(:content, choice.value, checked: checked?(choice, @current_content), id: choice.id, required: true, class: 'form-check-input') %>
4
+ <%= label_tag(choice.id, choice.text, class: 'form-check-label' ) %>
5
+ </div>
6
+ <% end %>
@@ -1,7 +1,6 @@
1
- <div class="field form-group mu-editor-one-liner">
1
+ <div class="mu-editor-one-liner">
2
2
  <%= form.editor :content, 'dynamic',
3
- class: 'form-control editor',
3
+ class: 'form-control editor d-none',
4
4
  value: @current_content,
5
- style: 'display: none',
6
5
  data: {lines: 1} %>
7
6
  </div>
@@ -1,13 +1,13 @@
1
- <div class="form-group">
1
+ <div>
2
2
  <% @max_file_size = 256000 %>
3
3
 
4
- <textarea id="solution_content" type="text" name="solution[content]" class="hidden"></textarea>
5
- <input id="mu-upload-input" type="file" class="upload submission-control hidden" mu-upload-file-limit=<%= @max_file_size %> accept=".<%= @exercise.language.extension %>" />
4
+ <textarea id="solution_content" type="text" name="solution[content]" class="d-none"></textarea>
5
+ <input id="mu-upload-input" type="file" class="upload submission-control d-none" mu-upload-file-limit=<%= @max_file_size %> accept=".<%= @exercise.language.extension %>" />
6
6
  <div>
7
- <label id="mu-upload-label" for="mu-upload-input" class="btn btn-success">
7
+ <label id="mu-upload-label" for="mu-upload-input" class="btn btn-complementary">
8
8
  <%= fa_icon(:upload, text: t(:select_file), id: "mu-upload-icon") %>
9
9
  </label>
10
- <div id="mu-upload-file-limit-exceeded" class="hidden">
10
+ <div id="mu-upload-file-limit-exceeded" class="d-none">
11
11
  <%= fa_icon("exclamation-triangle", text: t(:file_exceeds_max_size, size_kb: (@max_file_size / 1000))) %></div>
12
12
  </div>
13
13
  </div>
@@ -9,6 +9,6 @@
9
9
  <p><%= t :you_must_sign_in_before_submitting %></p>
10
10
 
11
11
  <div class="actions">
12
- <%= login_button class: 'btn btn-success btn-block' %>
12
+ <%= login_button class: 'btn btn-complementary w-100' %>
13
13
  </div>
14
14
  <% end %>
@@ -11,7 +11,7 @@
11
11
  <% end %>
12
12
 
13
13
  <div class="tab-content">
14
- <div role="tabpanel" class="tab-pane mu-input-panel fade in active <%= pending_messages_filter(@assignment) %>" id="console">
14
+ <div role="tabpanel" class="tab-pane mu-input-panel fade show active <%= pending_messages_filter(@assignment) %>" id="console">
15
15
  <% if @assignment.pending_messages? %>
16
16
  <span class="pending-messages-text"> <%= t :pending_messages_explanation %>
17
17
  <a href="javascript:{}"
@@ -25,7 +25,7 @@
25
25
  <div class="console">
26
26
  </div>
27
27
  <div class="mu-overlapped">
28
- <a class="console-reset submission-reset"><%= restart_icon %></a>
28
+ <%= restart_icon %>
29
29
  </div>
30
30
  </div>
31
31
  <div role="tabpanel" class="tab-pane mu-input-panel fade mu-elipsis" id="visible-extra">
@@ -8,5 +8,5 @@
8
8
  </div>
9
9
  <div class="actions mu-kids-reset-button"></div>
10
10
  <img class="mu-kids-compass-rose" src="/compass_rose.svg">
11
- <div class="mu-kids-overlay" style="display: none"></div>
11
+ <div class="mu-kids-overlay d-none"></div>
12
12
  <% end %>
@@ -10,11 +10,11 @@
10
10
  <% end %>
11
11
 
12
12
  <div class="tab-content">
13
- <div role="tabpanel" class="tab-pane mu-input-panel in active fade" id="console">
13
+ <div role="tabpanel" class="tab-pane mu-input-panel show active fade" id="console">
14
14
  <div class="console">
15
15
  </div>
16
16
  <div class="mu-overlapped">
17
- <a class="console-reset submission-reset"><%= restart_icon %></a>
17
+ <%= restart_icon %>
18
18
  </div>
19
19
  </div>
20
20
  <div role="tabpanel" class="tab-pane mu-input-panel fade mu-elipsis" id="visible-extra">