mumuki-laboratory 8.0.0 → 8.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/button.js +4 -4
- data/app/assets/javascripts/mumuki_laboratory/application/codemirror-builder.js +3 -3
- data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +6 -6
- data/app/assets/javascripts/mumuki_laboratory/application/console.js +2 -2
- data/app/assets/javascripts/mumuki_laboratory/application/discussions.js +7 -7
- data/app/assets/javascripts/mumuki_laboratory/application/editors.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/elipsis.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/events.js +2 -2
- data/app/assets/javascripts/mumuki_laboratory/application/exercise.js +2 -2
- data/app/assets/javascripts/mumuki_laboratory/application/gamification.js +99 -11
- data/app/assets/javascripts/mumuki_laboratory/application/inputs.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +20 -8
- data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +16 -57
- data/app/assets/javascripts/mumuki_laboratory/application/messages.js +6 -6
- data/app/assets/javascripts/mumuki_laboratory/application/mu-modal-carrousel.js +63 -0
- data/app/assets/javascripts/mumuki_laboratory/application/multiple-choice.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/multiple-files.js +3 -3
- data/app/assets/javascripts/mumuki_laboratory/application/multiple-scenarios.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/number-counter.js +18 -0
- data/app/assets/javascripts/mumuki_laboratory/application/pin.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/primary.js +3 -2
- data/app/assets/javascripts/mumuki_laboratory/application/progress.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/results-renderer.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/speech-bubble-renderer.js +4 -4
- data/app/assets/javascripts/mumuki_laboratory/application/submission.js +3 -3
- data/app/assets/javascripts/mumuki_laboratory/application/submissions-store.js +3 -3
- data/app/assets/javascripts/mumuki_laboratory/application/sync-mode.js +2 -2
- data/app/assets/javascripts/mumuki_laboratory/application/timer.js +1 -1
- data/app/assets/stylesheets/mumuki_laboratory/application/_layout.scss +7 -7
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +5 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids_results.scss +117 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +45 -131
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_overlap.scss +0 -4
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_terms.scss +9 -12
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +31 -3
- data/app/controllers/application_controller.rb +41 -8
- data/app/controllers/assets_controller.rb +1 -0
- data/app/controllers/book_discussions_controller.rb +1 -1
- data/app/controllers/chapters_controller.rb +1 -0
- data/app/controllers/concerns/with_user_discussion_validation.rb +6 -0
- data/app/controllers/discussions_controller.rb +4 -6
- data/app/controllers/exercises_controller.rb +1 -0
- data/app/controllers/guides_controller.rb +2 -0
- data/app/controllers/invitations_controller.rb +1 -0
- data/app/controllers/lessons_controller.rb +1 -0
- data/app/controllers/login_controller.rb +1 -0
- data/app/controllers/users_controller.rb +9 -1
- data/app/helpers/assignment_result_helper.rb +1 -1
- data/app/helpers/assistance_box_helper.rb +7 -5
- data/app/helpers/discussions_helper.rb +4 -4
- data/app/helpers/editor_tabs_helper.rb +1 -1
- data/app/helpers/gamification_helper.rb +5 -0
- data/app/helpers/icons_helper.rb +1 -1
- data/app/helpers/links_helper.rb +3 -3
- data/app/helpers/menu_bar_helper.rb +5 -1
- data/app/helpers/overlapped_buttons_helper.rb +6 -2
- data/app/views/book/show.html.erb +2 -2
- data/app/views/discussions/_message.html.erb +2 -2
- data/app/views/exercise_solutions/_assistant_rules_box.html.erb +13 -0
- data/app/views/exercise_solutions/_contextualization_results_container.html.erb +9 -0
- data/app/views/exercise_solutions/_kids_level_up.html.erb +11 -0
- data/app/views/exercise_solutions/_results.html.erb +19 -19
- data/app/views/exercise_solutions/_results_title.html.erb +5 -0
- data/app/views/exercises/_exercise_assignment.html.erb +1 -1
- data/app/views/exercises/_read_only.html.erb +1 -1
- data/app/views/exercises/show.html.erb +5 -2
- data/app/views/layouts/_copyright.html.erb +1 -1
- data/app/views/layouts/_guide.html.erb +8 -6
- data/app/views/layouts/_kids.html.erb +4 -4
- data/app/views/layouts/_kindergarten.html.erb +6 -6
- data/app/views/layouts/_organizations_listing.html.erb +8 -12
- data/app/views/layouts/_social_media.html.erb +4 -4
- data/app/views/layouts/_timer.html.erb +1 -1
- data/app/views/layouts/application.html.erb +31 -23
- data/app/views/layouts/embedded.html.erb +14 -11
- data/app/views/layouts/exercise_inputs/editors/_code.html.erb +1 -6
- data/app/views/layouts/exercise_inputs/editors/_multiple_files.html.erb +4 -9
- data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +1 -1
- data/app/views/layouts/modals/_guide_corollary.html.erb +13 -3
- data/app/views/layouts/modals/_kids_context.html.erb +1 -1
- data/app/views/layouts/modals/_kids_results.html.erb +16 -6
- data/app/views/layouts/modals/_kindergarten_context.html.erb +15 -15
- data/app/views/layouts/modals/_kindergarten_results.html.erb +20 -7
- data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +5 -5
- data/app/views/layouts/modals/_level_up.html.erb +27 -0
- data/app/views/users/_edit_user_form.html.erb +2 -2
- data/app/views/users/_user_form.html.erb +12 -2
- data/app/views/users/terms.html.erb +12 -0
- data/config/routes.rb +8 -8
- data/lib/mumuki/laboratory.rb +18 -5
- data/lib/mumuki/laboratory/controllers.rb +2 -0
- data/lib/mumuki/laboratory/controllers/action_redirector.rb +21 -0
- data/lib/mumuki/laboratory/controllers/immersive_navigation.rb +7 -0
- data/lib/mumuki/laboratory/controllers/results_rendering.rb +1 -0
- data/lib/mumuki/laboratory/engine.rb +1 -1
- data/lib/mumuki/laboratory/events/events.rb +0 -9
- data/lib/mumuki/laboratory/locales/en.yml +8 -1
- data/lib/mumuki/laboratory/locales/es-CL.yml +9 -2
- data/lib/mumuki/laboratory/locales/es.yml +11 -3
- data/lib/mumuki/laboratory/locales/pt.yml +9 -2
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/capybara_helper.rb +5 -1
- data/spec/controllers/discussions_controller_spec.rb +19 -0
- data/spec/controllers/exercise_solutions_controller_spec.rb +1 -1
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/features/immersive_redirection_spec.rb +181 -0
- data/spec/features/profile_flow_spec.rb +35 -3
- data/spec/features/terms_flow_spec.rb +157 -0
- data/spec/helpers/icons_helper_spec.rb +3 -3
- data/spec/helpers/test_results_rendering_spec.rb +8 -8
- data/spec/helpers/with_navigation_spec.rb +14 -14
- data/spec/javascripts/gamification-spec.js +2 -2
- metadata +112 -98
- data/app/helpers/organization_list_helper.rb +0 -5
- data/spec/dummy/config/database.travis.yml +0 -4
- data/spec/features/choose_organization_spec.rb +0 -74
@@ -3,6 +3,7 @@ class AssetsController < ApplicationController
|
|
3
3
|
protect_from_forgery except: [:theme_stylesheet, :extension_javascript]
|
4
4
|
skip_before_action :authorize_if_private!
|
5
5
|
skip_before_action :validate_user_profile!
|
6
|
+
skip_before_action :validate_accepted_role_terms!
|
6
7
|
skip_before_action :validate_active_organization!
|
7
8
|
|
8
9
|
def theme_stylesheet
|
@@ -2,12 +2,18 @@ module WithUserDiscussionValidation
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
4
|
included do
|
5
|
+
# users are not allowed to access discussions during exams
|
6
|
+
before_action :validate_not_blocked_in_forum!
|
5
7
|
# discussions are not enabled for all organizations nor all users
|
6
8
|
before_action :validate_user_can_discuss!
|
7
9
|
end
|
8
10
|
|
9
11
|
private
|
10
12
|
|
13
|
+
def validate_not_blocked_in_forum!
|
14
|
+
raise Mumuki::Domain::BlockedForumError if current_user&.currently_in_exam?
|
15
|
+
end
|
16
|
+
|
11
17
|
def validate_user_can_discuss!
|
12
18
|
raise Mumuki::Domain::NotFoundError unless current_user&.can_discuss_here?
|
13
19
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
class DiscussionsController < ApplicationController
|
2
2
|
include Mumuki::Laboratory::Controllers::Content
|
3
3
|
include WithUserDiscussionValidation
|
4
|
-
# users are not allowed to access discussions during exams
|
5
|
-
before_action :validate_not_in_exam!
|
6
4
|
|
7
5
|
before_action :set_debatable, except: [:subscription]
|
8
6
|
before_action :authenticate!, only: [:update, :create]
|
@@ -46,6 +44,10 @@ class DiscussionsController < ApplicationController
|
|
46
44
|
|
47
45
|
private
|
48
46
|
|
47
|
+
def default_immersive_path_for(context)
|
48
|
+
context.forum_enabled? ? discussions_path : root_path
|
49
|
+
end
|
50
|
+
|
49
51
|
def current_content_discussions
|
50
52
|
@debatable.discussions_in_organization
|
51
53
|
end
|
@@ -70,8 +72,4 @@ class DiscussionsController < ApplicationController
|
|
70
72
|
def discussion_filter_params
|
71
73
|
@filter_params ||= params.permit(Discussion.permitted_query_params)
|
72
74
|
end
|
73
|
-
|
74
|
-
def validate_not_in_exam!
|
75
|
-
raise Mumuki::Domain::BlockedForumError if current_user&.currently_in_exam?
|
76
|
-
end
|
77
75
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class ExercisesController < ApplicationController
|
2
2
|
include Mumuki::Laboratory::Controllers::Content
|
3
3
|
include Mumuki::Laboratory::Controllers::ExerciseSeed
|
4
|
+
include Mumuki::Laboratory::Controllers::ImmersiveNavigation
|
4
5
|
|
5
6
|
before_action :set_guide!, only: :show
|
6
7
|
before_action :set_assignment!, only: :show, if: :current_user?
|
@@ -6,6 +6,7 @@ class InvitationsController < ApplicationController
|
|
6
6
|
before_action :set_user!
|
7
7
|
|
8
8
|
skip_before_action :validate_user_profile!
|
9
|
+
skip_before_action :validate_accepted_role_terms!
|
9
10
|
skip_before_action :authorize_if_private!
|
10
11
|
skip_before_action :validate_active_organization!
|
11
12
|
|
@@ -3,6 +3,7 @@ class LoginController < ApplicationController
|
|
3
3
|
|
4
4
|
skip_before_action :verify_authenticity_token, if: lambda { Rails.env.development? }
|
5
5
|
skip_before_action :validate_user_profile!
|
6
|
+
skip_before_action :validate_accepted_role_terms!
|
6
7
|
skip_before_action :validate_active_organization!
|
7
8
|
|
8
9
|
private
|
@@ -3,6 +3,7 @@ class UsersController < ApplicationController
|
|
3
3
|
|
4
4
|
before_action :authenticate!, except: :terms
|
5
5
|
before_action :set_user!
|
6
|
+
skip_before_action :validate_accepted_role_terms!
|
6
7
|
|
7
8
|
def show
|
8
9
|
@messages = current_user.messages.to_a
|
@@ -12,7 +13,14 @@ class UsersController < ApplicationController
|
|
12
13
|
def update
|
13
14
|
current_user.update_and_notify! user_params
|
14
15
|
current_user.accept_profile_terms!
|
15
|
-
|
16
|
+
flash.notice = I18n.t(:user_data_updated)
|
17
|
+
redirect_after! :profile_completion, fallback_location: user_path
|
18
|
+
end
|
19
|
+
|
20
|
+
def accept_profile_terms
|
21
|
+
current_user.accept_profile_terms!
|
22
|
+
flash.notice = I18n.t(:terms_accepted)
|
23
|
+
redirect_after! :terms_acceptance, fallback_location: root_path
|
16
24
|
end
|
17
25
|
|
18
26
|
def terms
|
@@ -15,7 +15,7 @@ module AssignmentResultHelper
|
|
15
15
|
|
16
16
|
def render_community_link
|
17
17
|
if community_link?
|
18
|
-
link_to fa_icon(
|
18
|
+
link_to fa_icon('facebook-f', type: :brand, text: I18n.t(:ask_community), class: 'fa-fw'), community_link, target: '_blank'
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -1,9 +1,11 @@
|
|
1
1
|
module AssistanceBoxHelper
|
2
2
|
def assistance_box(assignment)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
%Q{<div class="mu-tips-box">
|
4
|
+
#{Mumukit::Assistant::Narrator.random.compose_explanation_html assignment.tips}
|
5
|
+
</div>}.html_safe
|
6
|
+
end
|
7
|
+
|
8
|
+
def should_display_assistance_box?(assignment)
|
9
|
+
assignment.tips.present? && !assignment.solved?
|
8
10
|
end
|
9
11
|
end
|
@@ -67,8 +67,8 @@ module DiscussionsHelper
|
|
67
67
|
def discussion_messages_icon(discussion)
|
68
68
|
%Q{
|
69
69
|
<span class="discussion-icon fa-stack fa-xs">
|
70
|
-
<i class="
|
71
|
-
<i class="
|
70
|
+
<i class="far fa-comment fa-stack-2x"></i>
|
71
|
+
<i class="fas fa-stack-1x">#{discussion.validated_messages_count}</i>
|
72
72
|
</span>
|
73
73
|
}.html_safe
|
74
74
|
end
|
@@ -77,8 +77,8 @@ module DiscussionsHelper
|
|
77
77
|
if discussion.upvotes_count > 0
|
78
78
|
%Q{
|
79
79
|
<span class="discussion-icon fa-stack fa-xs">
|
80
|
-
<i class="
|
81
|
-
<i class="
|
80
|
+
<i class="far fa-star fa-stack-2x"></i>
|
81
|
+
<i class="fas fa-stack-1x">#{discussion.upvotes_count}</i>
|
82
82
|
</span>
|
83
83
|
}.html_safe
|
84
84
|
end
|
@@ -14,7 +14,7 @@ module EditorTabsHelper
|
|
14
14
|
def messages_tab(exercise, organization = Organization.current)
|
15
15
|
"<li id='messages-tab' role='presentation'>
|
16
16
|
<a data-target='#messages' tabindex='0' aria-controls='console' role='tab' data-toggle='tab' class='editor-tab'>
|
17
|
-
#{fa_icon 'comments
|
17
|
+
#{fa_icon 'comments', type: :regular} #{t :messages }
|
18
18
|
</a>
|
19
19
|
</li>".html_safe if organization.raise_hand_enabled? && exercise.has_messages_for?(current_user)
|
20
20
|
end
|
data/app/helpers/icons_helper.rb
CHANGED
data/app/helpers/links_helper.rb
CHANGED
@@ -52,11 +52,11 @@ module LinksHelper
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def link_to_profile_terms
|
55
|
-
link_to t(:terms_and_conditions)
|
55
|
+
link_to t(:terms_and_conditions), terms_user_path, target: '_blank'
|
56
56
|
end
|
57
57
|
|
58
58
|
def link_to_forum_terms
|
59
|
-
link_to t(:forum_terms)
|
59
|
+
link_to t(:forum_terms), discussions_terms_path, target: '_blank'
|
60
60
|
end
|
61
61
|
|
62
62
|
def turbolinks_enable_for(exercise)
|
@@ -80,7 +80,7 @@ module LinksHelper
|
|
80
80
|
return unless current_user&.writer?
|
81
81
|
|
82
82
|
url = yield
|
83
|
-
link_to fixed_fa_icon(
|
83
|
+
link_to fixed_fa_icon('pencil-alt'), url, class: "mu-content-toolbar-item", target: "_blank", title: t(:edit)
|
84
84
|
end
|
85
85
|
|
86
86
|
def url_for_bibliotheca_guide(guide)
|
@@ -18,7 +18,7 @@ module MenuBarHelper
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def link_to_profile
|
21
|
-
|
21
|
+
menu_item('user', :profile, user_path)
|
22
22
|
end
|
23
23
|
|
24
24
|
def link_to_classroom
|
@@ -35,6 +35,10 @@ module MenuBarHelper
|
|
35
35
|
menu_item icon, app_name, url
|
36
36
|
end
|
37
37
|
|
38
|
+
def logout_link
|
39
|
+
li_tag menu_item('sign-out-alt', :sign_out, logout_path(origin: url_for))
|
40
|
+
end
|
41
|
+
|
38
42
|
def menu_item(icon, name, url)
|
39
43
|
link_to fixed_fa_icon(icon, text: t(name)), url, role: 'menuitem', tabindex: '-1'
|
40
44
|
end
|
@@ -1,4 +1,8 @@
|
|
1
1
|
module OverlappedButtonsHelper
|
2
|
+
def expand_icon
|
3
|
+
overlapped_button_icon :fullscreen, :expand, " (F11)"
|
4
|
+
end
|
5
|
+
|
2
6
|
def restart_icon
|
3
7
|
overlapped_button_icon :restart, :undo
|
4
8
|
end
|
@@ -11,7 +15,7 @@ module OverlappedButtonsHelper
|
|
11
15
|
link_to restart_icon, guide_progress_path(guide), class: 'mu-content-toolbar-item mu-restart-guide', data: {confirm: t(:confirm_restart)}, method: :delete
|
12
16
|
end
|
13
17
|
|
14
|
-
def overlapped_button_icon(key, icon)
|
15
|
-
fa_icon(icon, title: t(key), class: 'fa-fw', role: 'button', 'aria-label': t(key))
|
18
|
+
def overlapped_button_icon(key, icon, extra_title='')
|
19
|
+
fa_icon(icon, title: t(key) + extra_title, class: 'fa-fw', role: 'button', 'aria-label': t(key), 'data-placement': 'left')
|
16
20
|
end
|
17
21
|
end
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
<% unless enabled %>
|
28
28
|
<div class="text-center mu-lock">
|
29
|
-
<i class="
|
29
|
+
<i class="fas fa-lock fa-5x"></i>
|
30
30
|
<p><%= t :locked_content %></p>
|
31
31
|
</div>
|
32
32
|
<% end %>
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<h2><%= t(:exams) %></h2>
|
37
37
|
<% @exams.each_with_index do |it, index| %>
|
38
38
|
<div class="chapter">
|
39
|
-
<h3> <%=
|
39
|
+
<h3> <%= index + 1 %>. <%= link_to_path_element it, mode: :plain %></h3>
|
40
40
|
|
41
41
|
<div class="text-box">
|
42
42
|
<%= it.guide.description_teaser_html %>
|
@@ -17,11 +17,11 @@
|
|
17
17
|
</a>
|
18
18
|
<% if message.from_initiator? %>
|
19
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
|
20
|
+
<%= fa_icon('question-circle', type: 'regular', class: 'fa-xs') %>
|
21
21
|
</a>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
24
|
-
<%= link_to fa_icon('trash-
|
24
|
+
<%= link_to fa_icon('trash-alt', type: :regular), discussion_message_path(@discussion, message), method: :delete, data: { confirm: t(:are_you_sure, action: t(:destroy_message)) } %>
|
25
25
|
<% end %>
|
26
26
|
<% if should_show_approved_for?(current_user, message) %>
|
27
27
|
<span class="discussion-message-approved selected">
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if should_display_assistance_box? assignment %>
|
2
|
+
<hr>
|
3
|
+
<%= assistance_box assignment %>
|
4
|
+
<a data-toggle="collapse" href="#assistance-details-section" class="example-see-more">
|
5
|
+
<%= t :view_details %>
|
6
|
+
</a>
|
7
|
+
<div id="assistance-details-section" class="<%= 'collapse' if should_display_assistance_box?(assignment) %> in results-item">
|
8
|
+
<hr>
|
9
|
+
<%= yield %>
|
10
|
+
</div>
|
11
|
+
<% else %>
|
12
|
+
<%= yield %>
|
13
|
+
<% end %>
|
@@ -1,4 +1,13 @@
|
|
1
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
|
+
|
4
|
+
<% if in_gamified_context? %>
|
5
|
+
<div id="mu-exp-earned-message" class="hidden">
|
6
|
+
<span><%= t(:you_earned) %></span>
|
7
|
+
<strong><span id="mu-exp-points"></span></strong>
|
8
|
+
<span><%= t(:exp_points) %></span>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
3
12
|
<%= yield %>
|
4
13
|
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div>
|
2
|
+
<h3 class="text-center">
|
3
|
+
<%= t :level_up %>
|
4
|
+
</h3>
|
5
|
+
<div class="text-center mu-level">
|
6
|
+
<i class="fas fa-star fa-fw fa-4x"></i>
|
7
|
+
<span class="mu-level-number"></span>
|
8
|
+
<p></p>
|
9
|
+
<p id="mu-solve-more-exercises"> <%= (t :solve_more_exercises_to_level_up).html_safe %></p>
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -11,24 +11,26 @@
|
|
11
11
|
<%= render layout: 'exercise_solutions/contextualization_results_container', locals: {contextualization: assignment} do %>
|
12
12
|
<%= manual_evaluation_comment assignment %>
|
13
13
|
<% unless assignment.manual_evaluation_comment? %>
|
14
|
-
<%= render
|
15
|
-
|
16
|
-
|
17
|
-
<div class="
|
18
|
-
|
19
|
-
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
14
|
+
<%= render layout: 'exercise_solutions/assistant_rules_box', locals: {assignment: assignment } do %>
|
15
|
+
<%= render partial: 'exercise_solutions/contextualization_results_body', locals: {contextualization: assignment} %>
|
16
|
+
<% if should_render_need_help_dropdown?(assignment) %>
|
17
|
+
<div class="notify-problem-box">
|
18
|
+
<div class="dropdown">
|
19
|
+
<%= link_to fa_icon(:'question-circle', text: t(:need_help)), "", {'data-toggle': 'dropdown'} %>
|
20
|
+
<ul class="dropdown-menu" aria-labelledby="helpDropdown">
|
21
|
+
<li>
|
22
|
+
<%= read_discussions_link(@exercise) %>
|
23
|
+
</li>
|
24
|
+
<li>
|
25
|
+
<%= render_community_link %>
|
26
|
+
</li>
|
27
|
+
<li>
|
28
|
+
<%= report_bug_link(assignment) %>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
</div>
|
30
32
|
</div>
|
31
|
-
|
33
|
+
<% end %>
|
32
34
|
<% end %>
|
33
35
|
<% end %>
|
34
36
|
<%= solution_download_link assignment %>
|
@@ -36,8 +38,6 @@
|
|
36
38
|
|
37
39
|
<% if assignment.passed? %>
|
38
40
|
<%= corollary_box @exercise %>
|
39
|
-
<% else %>
|
40
|
-
<%= assistance_box assignment %>
|
41
41
|
<% end %>
|
42
42
|
<% end %>
|
43
43
|
|
@@ -1,3 +1,8 @@
|
|
1
1
|
<h4 class="text-<%= icon_class_for(contextualization.submission_status) %>">
|
2
2
|
<strong><%= fa_icon icon_type_for(contextualization.submission_status) %> <%= t_contextualization_status contextualization %></strong>
|
3
|
+
<% if in_gamified_context? %>
|
4
|
+
<strong><small class="text-success">
|
5
|
+
<span class="mu-experience"></span>
|
6
|
+
</small></strong>
|
7
|
+
<% end %>
|
3
8
|
</h4>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<div class="hint-box <%= 'hidden' if exercise.hint.blank? %>">
|
7
7
|
<% if exercise.hint.present? %>
|
8
8
|
<a data-toggle="collapse" href="#hint-section" class="text-info">
|
9
|
-
<%= fa_icon 'lightbulb
|
9
|
+
<%= fa_icon 'lightbulb', type: :regular %> <%= t :need_a_hint %>
|
10
10
|
</a>
|
11
11
|
|
12
12
|
<div id="hint-section" class="collapse">
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<% end %>
|
37
37
|
<% if @discussion.solved? %>
|
38
38
|
<a class="discussion-upvote" onclick="mumuki.Forum.discussionUpvote('<%= upvote_discussion_url(@discussion) %>')">
|
39
|
-
<%= fa_icon('thumbs-
|
39
|
+
<%= fa_icon('thumbs-up', type: :regular, class: 'fa-xs') %>
|
40
40
|
<%= span_toggle t(:upvote), t(:undo_upvote), current_user.upvoted?(@discussion), class: 'hidden-sm hidden-xs' %>
|
41
41
|
</a>
|
42
42
|
<% end %>
|
@@ -48,11 +48,10 @@
|
|
48
48
|
<%= hidden_field_tag "mu-exercise-id", @exercise.id %>
|
49
49
|
<%= hidden_field_tag "mu-exercise-layout", @exercise.layout %>
|
50
50
|
<%= hidden_field_tag "mu-exercise-settings", @exercise.settings.to_json %>
|
51
|
-
<%= hidden_field_tag "mu-current-exp", UserStats.exp_for(@current_user) %>
|
52
51
|
|
53
52
|
<div style="display: none" id="processing-template">
|
54
53
|
<div class="bs-callout bs-callout-info">
|
55
|
-
<h4><i class="
|
54
|
+
<h4><i class="fas fa-sync-alt fa-spin"></i> <strong><%= t :processing_your_solution %></strong></h4>
|
56
55
|
<%= t :refresh_or_wait %>
|
57
56
|
</div>
|
58
57
|
</div>
|
@@ -62,6 +61,10 @@
|
|
62
61
|
<%= render partial: 'layouts/exercise_skipped' %>
|
63
62
|
<% end %>
|
64
63
|
|
64
|
+
<% if in_gamified_context? %>
|
65
|
+
<%= render partial: 'layouts/modals/level_up' %>
|
66
|
+
<% end %>
|
67
|
+
|
65
68
|
<%= render partial: 'layouts/modals/guide_corollary', locals: {guide: @guide} %>
|
66
69
|
<%= render partial: 'layouts/modals/new_message', locals: {exercise: @exercise} if should_render_message_input?(@exercise) %>
|
67
70
|
<% end if current_user? %>
|