mumuki-laboratory 7.6.1 → 7.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +193 -2
  3. data/Rakefile +3 -0
  4. data/app/assets/javascripts/mumuki_laboratory/application.js +0 -1
  5. data/app/assets/javascripts/mumuki_laboratory/application/assets-loader.js +1 -1
  6. data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +36 -10
  7. data/app/assets/javascripts/mumuki_laboratory/application/button.js +90 -1
  8. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +1 -0
  9. data/app/assets/javascripts/mumuki_laboratory/application/custom-editor.js +46 -4
  10. data/app/assets/javascripts/mumuki_laboratory/application/discussions.js +14 -13
  11. data/app/assets/javascripts/mumuki_laboratory/application/kids.js +73 -36
  12. data/app/assets/javascripts/mumuki_laboratory/application/progress.js +3 -0
  13. data/app/assets/javascripts/mumuki_laboratory/application/results-renderer.js +51 -0
  14. data/app/assets/javascripts/mumuki_laboratory/application/submission.js +184 -35
  15. data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +1 -0
  16. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +43 -5
  17. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +3 -3
  18. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +55 -0
  19. data/app/controllers/assets_controller.rb +2 -0
  20. data/app/controllers/concerns/with_authorization.rb +4 -0
  21. data/app/controllers/concerns/with_user_discussion_validation.rb +14 -0
  22. data/app/controllers/discussions_controller.rb +6 -14
  23. data/app/controllers/discussions_messages_controller.rb +10 -1
  24. data/app/controllers/exercise_solutions_controller.rb +4 -2
  25. data/app/helpers/application_helper.rb +9 -5
  26. data/app/helpers/discussions_helper.rb +37 -23
  27. data/app/helpers/exercise_input_helper.rb +1 -1
  28. data/app/helpers/icons_helper.rb +3 -3
  29. data/app/views/book_discussions/index.html.erb +3 -3
  30. data/app/views/discussions/_message.html.erb +20 -8
  31. data/app/views/discussions/index.html.erb +0 -1
  32. data/app/views/discussions/new.html.erb +33 -0
  33. data/app/views/discussions/show.html.erb +18 -46
  34. data/app/views/exercise_solutions/_contextualization_results_container.html.erb +1 -1
  35. data/app/views/exercise_solutions/_results_title.html.erb +2 -2
  36. data/app/views/exercises/_read_only.html.erb +33 -6
  37. data/app/views/layouts/_copyright.html.erb +1 -1
  38. data/app/views/layouts/_discussions.html.erb +21 -3
  39. data/app/views/layouts/_social_media.html.erb +3 -3
  40. data/app/views/layouts/_test_results.html.erb +1 -1
  41. data/app/views/layouts/exercise_inputs/editors/_custom.html.erb +1 -1
  42. data/app/views/layouts/exercise_inputs/forms/_kids_form.html.erb +1 -1
  43. data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +1 -1
  44. data/app/views/layouts/exercise_inputs/layouts/_input_bottom.html.erb +1 -1
  45. data/app/views/layouts/exercise_inputs/layouts/_input_kindergarten.html.erb +40 -0
  46. data/app/views/layouts/exercise_inputs/layouts/{_input_kids.html.erb → _input_primary.html.erb} +1 -1
  47. data/app/views/layouts/exercise_inputs/layouts/_input_right.html.erb +1 -1
  48. data/app/views/layouts/modals/_kids_context.html.erb +1 -8
  49. data/app/views/user_mailer/1st_reminder.html.erb +3 -3
  50. data/app/views/user_mailer/1st_reminder.text.erb +1 -1
  51. data/app/views/user_mailer/2nd_reminder.html.erb +3 -3
  52. data/app/views/user_mailer/2nd_reminder.text.erb +1 -1
  53. data/app/views/user_mailer/3rd_reminder.html.erb +3 -3
  54. data/app/views/user_mailer/3rd_reminder.text.erb +1 -1
  55. data/app/views/user_mailer/no_submissions_reminder.html.erb +3 -3
  56. data/app/views/user_mailer/no_submissions_reminder.text.erb +1 -1
  57. data/config/routes.rb +2 -1
  58. data/lib/mumuki/laboratory/controllers/results_rendering.rb +1 -2
  59. data/lib/mumuki/laboratory/locales/en.yml +8 -2
  60. data/lib/mumuki/laboratory/locales/es.yml +7 -1
  61. data/lib/mumuki/laboratory/locales/pt.yml +8 -4
  62. data/lib/mumuki/laboratory/version.rb +1 -1
  63. data/spec/controllers/confirmations_controller_spec.rb +1 -1
  64. data/spec/controllers/discussions_messages_controller_spec.rb +73 -0
  65. data/spec/controllers/exercise_solutions_controller_spec.rb +41 -6
  66. data/spec/dummy/db/schema.rb +12 -1
  67. data/spec/features/discussion_flow_spec.rb +190 -0
  68. data/spec/features/exercise_flow_spec.rb +1 -1
  69. data/spec/features/menu_bar_spec.rb +88 -7
  70. data/spec/helpers/breadcrumbs_helper_spec.rb +1 -1
  71. data/spec/javascripts/bridge-spec.js +5 -0
  72. data/spec/javascripts/csrf-token-spec.js +7 -0
  73. data/spec/javascripts/elipsis-spec.js +25 -0
  74. data/spec/javascripts/results-renderers-spec.js +17 -0
  75. data/spec/javascripts/spec-helper.js +30 -0
  76. data/spec/javascripts/speech-bubble-renderer-spec.js +11 -0
  77. data/spec/javascripts/timeout-spec.js +5 -0
  78. data/spec/javascripts/timer-spec.js +5 -0
  79. data/spec/teaspoon_env.rb +187 -0
  80. metadata +33 -9
  81. data/app/views/layouts/modals/_new_discussion.html.erb +0 -27
  82. data/vendor/assets/javascripts/hotjar.js +0 -8
@@ -75,7 +75,7 @@ module ExerciseInputHelper
75
75
 
76
76
  def render_custom_editor(exercise, read_only=false)
77
77
  custom_editor_tag = "mu-#{exercise.language}-custom-editor"
78
- "<#{custom_editor_tag} class='#{custom_editor_tag}' #{custom_editor_read_only if read_only}> </#{custom_editor_tag}>".html_safe
78
+ "<#{custom_editor_tag} id='#{custom_editor_tag}' class='#{custom_editor_tag}' #{custom_editor_read_only if read_only}> </#{custom_editor_tag}>".html_safe
79
79
  end
80
80
 
81
81
  def custom_editor_read_only
@@ -3,7 +3,7 @@ module IconsHelper
3
3
  fa_icon *icon_for(status_like.to_submission_status)
4
4
  end
5
5
 
6
- def fixed_fa_icon(name, options={})
6
+ def fixed_fa_icon(name, options = {})
7
7
  fa_icon name, options.merge(class: 'fa-fw fixed-icon')
8
8
  end
9
9
 
@@ -47,12 +47,12 @@ module IconsHelper
47
47
  iconizable.iconize[:type].to_s
48
48
  end
49
49
 
50
- def label_for_contextualization(contextualization)
50
+ def label_for_contextualization(contextualization, **options)
51
51
  iconized = contextualization.iconize
52
52
  %Q{
53
53
  <span class="text-#{iconized[:class]} status-label">
54
54
  #{fa_icon "#{iconized[:type]}"}
55
- <span>#{t contextualization.visible_status}</span>
55
+ <span class="#{options[:class]}">#{t contextualization.visible_status}</span>
56
56
  </span>
57
57
  }.html_safe
58
58
  end
@@ -1,9 +1,9 @@
1
1
  <%= content_for :breadcrumbs do %>
2
- <%= home_breadcrumb %>
2
+ <%= header_breadcrumbs %> <%= breadcrumb_list_item(t(:discussions), 'last') %>
3
3
  <% end %>
4
4
 
5
5
  <%= content_for :extra_filters do %>
6
- <%= discussion_dropdown_filter :language, discussions_languages(@discussions) do |language_filter| %>
6
+ <%= discussion_dropdown_filter :language, discussions_languages(@discussions), true do |language_filter| %>
7
7
  <%= language_filter.capitalize %>
8
8
  <% end %>
9
9
  <% end %>
@@ -18,6 +18,6 @@
18
18
  <% if @discussions.empty? %>
19
19
  <h4><%= t :no_questions %></h4>
20
20
  <% else %>
21
- <%= render partial: 'layouts/discussions' %>
21
+ <%= render partial: 'layouts/discussions' %>
22
22
  <% end %>
23
23
  </div>
@@ -7,16 +7,28 @@
7
7
  <%= t(:time_since, time: time_ago_in_words(message.created_at)) %>
8
8
  </span>
9
9
  <% if user.moderator_here? %>
10
- <%= fa_icon(:star, {'data-toggle': 'tooltip', title: (t :moderator), class: 'moderator-star'}) %>
10
+ <%= fa_icon(:star, 'data-toggle': 'tooltip', title: (t :moderator), class: 'moderator-star') %>
11
11
  <% end %>
12
- <% if message.authorized? current_user %>
13
- <span class="actions">
14
- <a class="discussion-message-approved <%= 'selected' if message.approved? %>" onclick="mumuki.Forum.discussionMessageToggleApprove('<%= approve_discussion_message_url(@discussion, message) %>', $(this))">
15
- <%= fa_icon(:check, class: 'fa-xs') %>
16
- </a>
12
+ <span class="actions">
13
+ <% if message.authorized? current_user %>
14
+ <% if current_user&.moderator_here? %>
15
+ <a class="discussion-message-approved <%= 'selected' if message.approved? %>" onclick="mumuki.Forum.discussionMessageToggleApprove('<%= approve_discussion_message_url(@discussion, message) %>', $(this))">
16
+ <%= fa_icon(:check, class: 'fa-xs') %>
17
+ </a>
18
+ <% if message.from_initiator? %>
19
+ <a class="discussion-message-not-actually-a-question <%= 'selected' if message.not_actually_a_question? %>" onclick="mumuki.Forum.discussionMessageToggleNotActuallyAQuestion('<%= question_discussion_message_url(@discussion, message) %>', $(this))">
20
+ <%= fa_icon('question-circle-o', class: 'fa-xs') %>
21
+ </a>
22
+ <% end %>
23
+ <% end %>
17
24
  <%= link_to fa_icon('trash-o'), discussion_message_path(@discussion, message), method: :delete, data: { confirm: t(:are_you_sure, action: t(:destroy_message)) } %>
18
- </span>
19
- <% end %>
25
+ <% end %>
26
+ <% if should_show_approved_for?(current_user, message) %>
27
+ <span class="discussion-message-approved selected">
28
+ <%= fa_icon(:check, class: 'fa-xs', 'data-toggle': 'tooltip', title: (t :approved_message)) %>
29
+ </span>
30
+ <% end %>
31
+ </span>
20
32
  </div>
21
33
  </div>
22
34
  <div class="discussion-message-bubble-content">
@@ -24,7 +24,6 @@
24
24
  <% end %>
25
25
 
26
26
  <%= content_for :no_container do %>
27
- <%= render partial: 'layouts/modals/new_discussion', locals: {debatable: @debatable} %>
28
27
  <% end if current_user? %>
29
28
 
30
29
 
@@ -0,0 +1,33 @@
1
+ <%= content_for :breadcrumbs do %>
2
+ <%= breadcrumbs_for_discussion @discussion, @debatable %>
3
+ <% end %>
4
+
5
+ <%= form_for [@debatable, @discussion] do |f| %>
6
+ <div>
7
+ <div class="discussion-context">
8
+ <%= render partial: 'exercises/read_only', locals: {exercise: @debatable} %>
9
+ </div>
10
+ </div>
11
+
12
+ <hr class="message-divider">
13
+
14
+ <%= render layout: 'discussions/message_container', locals: {user: @discussion.initiator} do %>
15
+ <div class="discussion-message-bubble" id="new-discussion-description-container">
16
+ <div class="discussion-message-bubble-header">
17
+ <div class="discussion-message-bubble-title">
18
+ <%= @discussion.initiator.name %>
19
+ </div>
20
+ </div>
21
+ <div class="discussion-message-bubble-content">
22
+ <div class="container-fluid">
23
+ <div class="row">
24
+ <div class="discussion-new-message-content">
25
+ <%= f.editor :description, '', {id: 'new-discussion-message', class: 'form-control', placeholder: t(:discussion_description_placeholder)} %>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <%= f.submit t(:save), class: 'btn btn-success btn-block discussion-new-message-button' %>
32
+ <% end %>
33
+ <% end %>
@@ -3,55 +3,25 @@
3
3
  <% end %>
4
4
 
5
5
  <div>
6
- <div class="row">
7
- <% if current_user %>
8
- <div class="mu-inline-block-right hidden-xs discussion-user-menu">
9
- <h3>
10
- <% if @discussion.subscribable? %>
11
- <a class="discussion-subscription" onclick="mumuki.Forum.discussionSubscription('<%= subscription_discussion_url(@discussion) %>')">
12
- <%= fa_icon(:eye, class: 'fa-xs') %>
13
- <%= span_toggle t(:subscribe), t(:unsubscribe), current_user.subscribed_to?(@discussion) %>
14
- </a>
15
- <% end %>
16
- <% if @discussion.solved? %>
17
- <a class="discussion-upvote" onclick="mumuki.Forum.discussionUpvote('<%= upvote_discussion_url(@discussion) %>')">
18
- <%= fa_icon(:star, class: 'fa-xs') %>
19
- <%= span_toggle t(:upvote), t(:undo_upvote), current_user.upvoted?(@discussion) %>
20
- </a>
21
- <% end %>
22
- </h3>
23
- </div>
24
- <% end %>
25
- <div class="mu-inline-block-left">
26
- <div class="discussion-header">
27
- <h3 class="discussion-title">
28
- <%= @discussion.title %>
29
- </h3>
30
- </div>
31
- <div class="discussion-description">
32
- <%= label_for_contextualization(@discussion) %> ·
33
- <span class="discussion-info">
34
- <span class="discussion-initiator-name">
35
- <%= @discussion.initiator.name %>
36
- </span>
37
- <%= discussion_info(@discussion) %>
38
- </span>
39
- </div>
40
- </div>
41
- </div>
42
-
43
6
  <div class="discussion-context">
44
7
  <%= render partial: 'exercises/read_only', locals: {exercise: @debatable} %>
45
8
  </div>
46
-
47
9
  </div>
48
10
 
49
11
  <% if @discussion.has_messages? || @discussion.commentable_by?(current_user) %>
50
12
  <hr class="message-divider">
51
13
 
52
- <h3>
53
- <%= t :messages %>
54
- </h3>
14
+ <div>
15
+ <h3>
16
+ <%= t :messages %>
17
+ <% if @discussion.last_moderator_access_visible_for?(current_user) %>
18
+ <small class="pull-right">
19
+ <span><%= t :last_seen, name: @discussion.last_moderator_access_by.full_name %></span>
20
+ <span><%= t :time_since, time: time_ago_in_words(@discussion.last_moderator_access_at) %></span>
21
+ </small>
22
+ <% end %>
23
+ </h3>
24
+ </div>
55
25
 
56
26
  <% if @discussion.has_messages? %>
57
27
  <div class="discussion-messages">
@@ -71,8 +41,10 @@
71
41
 
72
42
  <% end %>
73
43
 
74
- <div class="discussion-actions">
75
- <% @discussion.reachable_statuses_for(current_user).each do |status| %>
76
- <%= discussion_update_status_button(status) %>
77
- <% end if current_user %>
78
- </div>
44
+ <% if current_user&.moderator_here? %>
45
+ <div class="discussion-actions">
46
+ <% @discussion.reachable_statuses_for(current_user).each do |status| %>
47
+ <%= discussion_update_status_button(status) %>
48
+ <% end %>
49
+ </div>
50
+ <% end %>
@@ -1,4 +1,4 @@
1
- <div class="<%= "bs-callout bs-callout-#{icon_class_for contextualization}" %>">
1
+ <div class="<%= "bs-callout bs-callout-#{icon_class_for contextualization.submission_status}" %>">
2
2
  <%= render partial: 'exercise_solutions/results_title', locals: {contextualization: contextualization} %>
3
3
  <%= yield %>
4
4
  </div>
@@ -1,3 +1,3 @@
1
- <h4 class="text-<%= icon_class_for(contextualization) %>">
2
- <strong><%= fa_icon icon_type_for(contextualization) %> <%= t_contextualization_status contextualization %></strong>
1
+ <h4 class="text-<%= icon_class_for(contextualization.submission_status) %>">
2
+ <strong><%= fa_icon icon_type_for(contextualization.submission_status) %> <%= t_contextualization_status contextualization %></strong>
3
3
  </h4>
@@ -9,13 +9,40 @@
9
9
 
10
10
  <details open>
11
11
  <summary class="discussion-summary">
12
- <div class="mu-inline-block-right hidden-xs">
13
- <h1><%= language_icon @debatable.language %></h1>
14
- </div>
15
12
  <h3 class="discussion-exercise-title">
16
- <span class="hidden-xs"><%= t(:exercise_number, number: exercise.number) %>:&nbsp;</span>
17
- <span><%= @debatable.name %></span>
13
+ <span>
14
+ <span class="hidden-xs"><%= t(:exercise_number, number: exercise.number) %>:&nbsp;</span>
15
+ <span><%= exercise.name %></span>
16
+ </span>
17
+ <span class="mu-inline-block-right hidden-xs">
18
+ <h1 class="no-margin"><%= language_icon exercise.language %></h1>
19
+ </span>
18
20
  </h3>
21
+ <div class="discussion-description">
22
+ <%= label_for_contextualization(@discussion, class: 'hidden-xs') %> ·
23
+ <span class="discussion-info">
24
+ <span class="discussion-initiator-name">
25
+ <%= @discussion.initiator.name %>
26
+ </span>
27
+ <span class="hidden-xs"><%= discussion_info(@discussion) unless @discussion.new_record? %></span>
28
+ </span>
29
+ <% if current_user && @discussion.persisted? %>
30
+ <span class="mu-inline-block-right discussion-user-menu no-margin">
31
+ <% if @discussion.subscribable? %>
32
+ <a class="discussion-subscription" onclick="mumuki.Forum.discussionSubscription('<%= subscription_discussion_url(@discussion) %>')">
33
+ <%= fa_icon(:eye, class: 'fa-xs') %>
34
+ <%= span_toggle t(:subscribe), t(:unsubscribe), current_user.subscribed_to?(@discussion), class: 'hidden-sm hidden-xs' %>
35
+ </a>
36
+ <% end %>
37
+ <% if @discussion.solved? %>
38
+ <a class="discussion-upvote" onclick="mumuki.Forum.discussionUpvote('<%= upvote_discussion_url(@discussion) %>')">
39
+ <%= fa_icon('thumbs-o-up', class: 'fa-xs') %>
40
+ <%= span_toggle t(:upvote), t(:undo_upvote), current_user.upvoted?(@discussion), class: 'hidden-sm hidden-xs' %>
41
+ </a>
42
+ <% end %>
43
+ </span>
44
+ <% end %>
45
+ </div>
19
46
  </summary>
20
47
 
21
48
  <% if should_render_read_only_exercise_tabs?(@discussion) %>
@@ -64,7 +91,7 @@
64
91
 
65
92
  <div role="tabpanel" class="tab-pane" id="results">
66
93
  <div class="mu-tab-body">
67
- <%= render layout: 'exercise_solutions/contextualization_results_container', locals: {contextualization: @discussion } do %>
94
+ <%= render layout: 'exercise_solutions/contextualization_results_container', locals: {contextualization: @discussion} do %>
68
95
  <div class="row">
69
96
  <div class="col-md-12 submission-results">
70
97
  <%= render partial: 'exercise_solutions/contextualization_results_body',
@@ -1,2 +1,2 @@
1
1
  &copy; Copyright 2015-<%= DateTime.now.year %>
2
- <a href="http://mumuki.org/" class="mu-org-link"><span class="da da-mumuki-circle"></span> Mumuki Project</a>
2
+ <a href="http://mumuki.org/" class="mu-org-link"><span class="da da-mumuki-circle"></span> Mumuki</a>
@@ -20,6 +20,14 @@
20
20
  <%= discussion_dropdown_filter :sort, Discussion.sorting_filters do |sorting_filter| %>
21
21
  <%= t sorting_filter %>
22
22
  <% end %>
23
+
24
+ <% if current_user&.moderator_here? %>
25
+ <div class="discussion-requires-attention pull-right">
26
+ <%= label_tag :requires_moderator_response, t(:requires_attention) %>
27
+ <%= check_box_tag :requires_moderator_response, true, discussion_filter_params[:requires_moderator_response], class: 'form-input', onclick: 'mumuki.Forum.discussionsToggleCheckbox($(this))' %>
28
+ </div>
29
+ <% end %>
30
+
23
31
  </div>
24
32
  </div>
25
33
  <% if @filtered_discussions.empty? %>
@@ -34,13 +42,13 @@
34
42
  <% else %>
35
43
  <div class="discussions">
36
44
  <% @filtered_discussions.each do |discussion| %>
37
- <%= link_to item_discussion_path(discussion) do %>
45
+ <%= link_to exercise_discussion_path(discussion.exercise.id, discussion) do %>
38
46
  <div class="discussion">
39
47
  <div class="discussion-row">
40
48
  <%= discussion_messages_icon(discussion) %>
41
49
  <% unless @debatable.respond_to? :language %>
42
50
  <div class="discussion-language-icon">
43
- <%= language_icon(discussion.language) %>
51
+ <%= language_icon(discussion.exercise.language) %>
44
52
  </div>
45
53
  <% end %>
46
54
  <div>
@@ -48,7 +56,17 @@
48
56
  <span class="discussion-status-icon">
49
57
  <%= discussion_status_fa_icon(discussion) %>
50
58
  </span>
51
- <%= discussion.title %>
59
+ <span class="hidden-sm hidden-xs"><%= discussion.exercise.guide.name %> -</span>
60
+ <span><%= discussion.exercise.name %></span>
61
+ <% if discussion.last_moderator_access_visible_for?(current_user) %>
62
+ <div class="pull-right discussion-moderator-access" >
63
+ <%= profile_picture_for(discussion.last_moderator_access_by, 32) %>
64
+ <span class="moderator-initials">
65
+ <%= discussion.last_moderator_access_by.name_initials %>
66
+ </span>
67
+ </div>
68
+ <% end %>
69
+
52
70
  </div>
53
71
  <span class="discussion-description">
54
72
  <%= discussion.description %>
@@ -1,4 +1,4 @@
1
- <a class="fa fa-facebook social-icon" aria-label="Facebook" href="https://www.facebook.com/MumukiProject" target="_blank"></a>
2
- <a class="fa fa-twitter social-icon" aria-label="Twitter" href="https://twitter.com/MumukiProject" target="_blank"></a>
1
+ <a class="fa fa-facebook social-icon" aria-label="Facebook" href="https://www.facebook.com/MumukiOrg" target="_blank"></a>
2
+ <a class="fa fa-twitter social-icon" aria-label="Twitter" href="https://twitter.com/MumukiOrg" target="_blank"></a>
3
3
  <a class="fa fa-github social-icon" aria-label="Github" href="https://github.com/mumuki" target="_blank"></a>
4
- <a class="fa fa-linkedin social-icon" aria-label="LinkedIn" href="https://www.linkedin.com/company/mumuki-project" target="_blank"></a>
4
+ <a class="fa fa-linkedin social-icon" aria-label="LinkedIn" href="https://www.linkedin.com/company/mumukiorg" target="_blank"></a>
@@ -19,7 +19,7 @@
19
19
  <% else %>
20
20
  <span class="text-success mu-test-result-header">
21
21
  <%= status_icon(test_result[:status]) %>
22
- <%= test_result[:title] %>
22
+ <%= render_test_result_header test_result %>
23
23
  </span>
24
24
  <% end %>
25
25
 
@@ -4,4 +4,4 @@
4
4
 
5
5
  <%= form.hidden_field :content, id: "mu-custom-editor-value", value: @current_content %>
6
6
  <%= form.hidden_field :content_extra, id: "mu-custom-editor-extra", value: @exercise.extra %>
7
- <%= form.hidden_field :content, id: "mu-custom-editor-test", value: @exercise.test %>
7
+ <%= form.hidden_field :content_test, id: "mu-custom-editor-test", value: @exercise.test %>
@@ -3,7 +3,7 @@
3
3
  html: {role: 'form', class: 'new_solution mu-editor mu-editor-overlap'}) do |f| %>
4
4
  <%= render_exercise_input_editor f, exercise %>
5
5
 
6
- <div class="actions mu-kids-submit-button">
6
+ <div class="actions mu-submit-button mu-kids-submit-button">
7
7
  <%= render_submit_button(@assignment) %>
8
8
  </div>
9
9
  <div class="actions mu-kids-reset-button"></div>
@@ -33,7 +33,7 @@
33
33
  html: {role: 'form', class: "new_solution mu-editor mu-editor-overlap #{pending_messages_filter(@assignment)}"}) do |f| %>
34
34
  <%= render_exercise_input_editor f, exercise %>
35
35
 
36
- <div class="actions">
36
+ <div class="actions mu-submit-button">
37
37
  <%= render_submit_button(@assignment) %>
38
38
  </div>
39
39
  <% end %>
@@ -4,7 +4,7 @@
4
4
  </div>
5
5
  </div>
6
6
  <div class="row">
7
- <div class="col-md-12 ace-editor-col">
7
+ <div class="mu-exercise-content col-md-12 ace-editor-col">
8
8
  <%= yield :exercise_content %>
9
9
  </div>
10
10
  </div>
@@ -0,0 +1,40 @@
1
+ <% content_for :no_container do %>
2
+
3
+ <div <%= turbolinks_enable_for exercise %>>
4
+
5
+ <div class="mu-kids-landscape-support container-fluid">
6
+ <img class="mu-kids-character-animation"/>
7
+ <h3><%= t :only_landscape_support %></h3>
8
+ </div>
9
+
10
+ <div class="mu-kids-exercise mu-kindergarten container-fluid">
11
+
12
+ <div class="mu-kids-exercise-description mu-kids-exercise-description-fixed">
13
+ <div class="mu-kids-character">
14
+ <%= render partial: 'layouts/kids', locals: {exercise: exercise} %>
15
+ </div>
16
+ </div>
17
+ <div class="mu-kids-exercise-workspace">
18
+ <div class="mu-exercise-content mu-kids-blocks">
19
+ <%= yield :exercise_content %>
20
+ </div>
21
+ <div class="mu-kids-states mu-kids-single-state mu-multiple-scenarios">
22
+ <div class="mu-scenarios">
23
+ <div class="mu-kids-state mu-state-initial mu-kids-gbs-board-initial mu-initial-state">
24
+ <div class="mu-kids-state-image"><%= exercise.initial_state&.html_safe %></div>
25
+ </div>
26
+ <div class="mu-kids-state mu-state-final mu-final-state">
27
+ <div class="mu-kids-state-image"><%= exercise.final_state&.html_safe %></div>
28
+ </div>
29
+ </div>
30
+ <ol class="indicators"></ol>
31
+ </div>
32
+ </div>
33
+ </div>
34
+
35
+ <%= render partial: 'layouts/modals/kids_results', locals: {exercise: exercise, assignment: @assignment} %>
36
+ <%= render partial: 'layouts/modals/kids_results_aborted' %>
37
+ <%= render partial: 'layouts/modals/kids_context', locals: {exercise: exercise, assignment: @assignment} %>
38
+
39
+ </div>
40
+ <% end %>
@@ -13,7 +13,7 @@
13
13
  <div class="mu-kids-character">
14
14
  <%= render partial: 'layouts/kids', locals: {exercise: exercise} %>
15
15
  </div>
16
- <div class="mu-kids-blocks">
16
+ <div class="mu-exercise-content mu-kids-blocks">
17
17
  <%= yield :exercise_content %>
18
18
  </div>
19
19
  </div>