mumuki-laboratory 8.0.0 → 8.1.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/gamification.js +89 -11
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +16 -4
- data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +9 -50
- data/app/assets/javascripts/mumuki_laboratory/application/mu-modal-carrousel.js +63 -0
- data/app/assets/javascripts/mumuki_laboratory/application/number-counter.js +18 -0
- data/app/assets/javascripts/mumuki_laboratory/application/primary.js +2 -1
- data/app/assets/javascripts/mumuki_laboratory/application/submission.js +1 -1
- 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/_terms.scss +9 -12
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +31 -3
- data/app/controllers/application_controller.rb +40 -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/discussions_controller.rb +4 -0
- 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 +8 -1
- data/app/helpers/assistance_box_helper.rb +7 -5
- data/app/helpers/gamification_helper.rb +5 -0
- data/app/helpers/links_helper.rb +1 -1
- 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/show.html.erb +4 -1
- data/app/views/layouts/_kindergarten.html.erb +1 -1
- data/app/views/layouts/_organizations_listing.html.erb +8 -12
- data/app/views/layouts/application.html.erb +8 -2
- data/app/views/layouts/modals/_guide_corollary.html.erb +1 -1
- 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 +4 -4
- data/app/views/layouts/modals/_level_up.html.erb +27 -0
- data/app/views/users/_edit_user_form.html.erb +1 -1
- 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/events/events.rb +0 -9
- data/lib/mumuki/laboratory/locales/en.yml +5 -0
- data/lib/mumuki/laboratory/locales/es-CL.yml +5 -0
- data/lib/mumuki/laboratory/locales/es.yml +5 -0
- data/lib/mumuki/laboratory/locales/pt.yml +5 -0
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/capybara_helper.rb +5 -1
- data/spec/controllers/exercise_solutions_controller_spec.rb +1 -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 +151 -0
- metadata +110 -101
- data/app/helpers/organization_list_helper.rb +0 -5
- data/spec/features/choose_organization_spec.rb +0 -74
@@ -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,13 @@ 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
|
+
redirect_to root_path, notice: I18n.t(:terms_accepted)
|
16
23
|
end
|
17
24
|
|
18
25
|
def terms
|
@@ -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
|
data/app/helpers/links_helper.rb
CHANGED
@@ -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="fa 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>
|
@@ -48,7 +48,6 @@
|
|
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">
|
@@ -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? %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="mu-kindergarten-character-speech-bubble">
|
5
5
|
<span class="mu-kindergarten-exercise-description"><%= exercise.description_task %></span>
|
6
6
|
<div class="mu-kindergarten-buttons">
|
7
|
-
<button class="mu-kindergarten-show-context" onclick="mumuki.kids.context.
|
7
|
+
<button class="mu-kindergarten-show-context" onclick="mumuki.kids.context.show()">
|
8
8
|
<img class="mu-kindergarten-button-image" src="https://mumuki.io/static/show-context.svg" alt="">
|
9
9
|
</button>
|
10
10
|
<button class="mu-kindergarten-play-description" onclick="mumuki.kids.speech.click('.mu-kindergarten-exercise-description', '<%= exercise.locale %>')">
|
@@ -1,14 +1,10 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<div class="row">
|
6
|
-
<div class="col-md-6 organization-row">
|
7
|
-
<%= image_tag(org.banner_url, height: 50, class: 'pull-left') %>
|
8
|
-
</div>
|
9
|
-
<div class="col-md-6 organization-row">
|
10
|
-
<%= link_to(t(:go_to, organization: org.name), org.url, class: 'btn btn-success pull-right') %>
|
11
|
-
</div>
|
1
|
+
<% current_immersive_organizations.each do |organization| %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-6 organization-row">
|
4
|
+
<%= image_tag(organization.banner_url, height: 50, class: 'pull-left') %>
|
12
5
|
</div>
|
13
|
-
|
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') %>
|
8
|
+
</div>
|
9
|
+
</div>
|
14
10
|
<% end %>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= content_for :navbar do %>
|
2
|
+
<%= hidden_field_tag("mu-current-exp", UserStats.exp_for(@current_user)) if in_gamified_context? %>
|
2
3
|
<div class="<%= exercise_container_type %>">
|
3
4
|
<nav class="mu-navbar">
|
4
5
|
<div class="mu-navbar-breadcrumb hidden-xs">
|
@@ -18,16 +19,20 @@
|
|
18
19
|
</div>
|
19
20
|
<div class="mu-navbar-avatar">
|
20
21
|
<% if current_logged_user? %>
|
22
|
+
<% if in_gamified_context? %>
|
23
|
+
<i class="fa fa-star fa-fw fa-2x navbar-icon mu-level-tooltip" data-toggle="tooltip" data-placement="bottom" title="<%= t(:level) %>"></i>
|
24
|
+
<span class="mu-level-number"></span>
|
25
|
+
<% end %>
|
21
26
|
<div class="dropdown">
|
22
27
|
<span>
|
23
28
|
<a class="notifications-box <%= has_notifications? ? '' : 'notifications-box-empty' %>" href=<%= "#{user_notifications_path}" %>>
|
24
|
-
<i class="fa fa-bell fa-fw fa-
|
29
|
+
<i class="fa fa-bell fa-fw fa-2x navbar-icon"></i>
|
25
30
|
<span class="badge badge-notifications"><%= notifications_count %></span>
|
26
31
|
</a>
|
27
32
|
</span>
|
28
33
|
</div>
|
29
34
|
<div class="dropdown">
|
30
|
-
<div id="profileDropdown" class="profile-dropdown" data-toggle="dropdown" aria-label="<%= t(:user) %>" role="menu" tabindex="0">
|
35
|
+
<div id="profileDropdown" class="profile-dropdown navbar-icon" data-toggle="dropdown" aria-label="<%= t(:user) %>" role="menu" tabindex="0">
|
31
36
|
<%= profile_picture_for current_user %>
|
32
37
|
<span class="caret"></span>
|
33
38
|
</div>
|
@@ -76,3 +81,4 @@
|
|
76
81
|
<% end %>
|
77
82
|
|
78
83
|
<%= render partial: 'layouts/main' %>
|
84
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="modal fade guide-corollary" id="guide-done" tabindex="-1" role="dialog" aria-hidden="true">
|
1
|
+
<div class="modal fade guide-corollary mu-kids-modal-border" id="guide-done" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
3
|
<div class="modal-content">
|
4
4
|
<div class="modal-header">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="modal fade mu-kids-context" id="mu-kids-context" tabindex="-1" role="dialog" aria-hidden="true">
|
1
|
+
<div class="modal fade mu-kids-context mu-kids-modal-border" id="mu-kids-context" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
3
|
<div class="modal-content">
|
4
4
|
<div class="modal-header">
|
@@ -1,17 +1,27 @@
|
|
1
|
-
<div class="modal fade mu-kids-results" id="kids-results" tabindex="-1" role="dialog" aria-hidden="true">
|
1
|
+
<div class="modal fade mu-kids-results mu-kids-modal-border" id="kids-results" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
|
-
<div class="modal-content">
|
4
|
-
<
|
3
|
+
<div class="modal-content success">
|
4
|
+
<button type="button" class="mu-kids-modal-button mu-previous hidden" onclick="mumuki.kids.resultsCarrousel.prevSlide()" aria-label="Previous">
|
5
|
+
<span aria-hidden="true">
|
6
|
+
<i class="fa fa-fw fa-arrow-left fa-3x"></i>
|
7
|
+
</span>
|
8
|
+
</button>
|
9
|
+
<button type="button" class="mu-kids-modal-button mu-next" onclick="mumuki.kids.resultsCarrousel.nextSlide()" aria-label="Next">
|
10
|
+
<span aria-hidden="true">
|
11
|
+
<i class="fa fa-fw fa-arrow-right fa-3x"></i>
|
12
|
+
</span>
|
13
|
+
</button>
|
14
|
+
<div class="modal-header text-center">
|
5
15
|
</div>
|
6
16
|
<div class="modal-body">
|
7
17
|
<div class="container-fluid">
|
8
18
|
<div class="row">
|
9
19
|
<div class="col-md-12">
|
10
|
-
<div class="
|
11
|
-
<div class="
|
20
|
+
<div class="mu-kids-results-carrousel">
|
21
|
+
<div class="active submission-results">
|
12
22
|
<% if current_user? && @assignment.solved? %>
|
13
23
|
<%= render partial: 'exercise_solutions/kids_results',
|
14
|
-
|
24
|
+
locals: {assignment: @assignment, guide_finished_by_solution: false} %>
|
15
25
|
<% end %>
|
16
26
|
</div>
|
17
27
|
</div>
|
@@ -1,22 +1,22 @@
|
|
1
|
-
<div class="modal fade mu-
|
1
|
+
<div class="modal fade mu-kids-modal-border" id="mu-kids-context" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
|
-
<div class="modal-content">
|
4
|
-
<button type="button" class="mu-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
<div class="modal-content kindergarten">
|
4
|
+
<button type="button" class="mu-kids-modal-button mu-close" data-waiting="" data-dismiss="modal" aria-label="Close">
|
5
|
+
<span aria-hidden="true">
|
6
|
+
<i class="fa fa-fw fa-times fa-3x"></i>
|
7
|
+
</span>
|
8
8
|
</button>
|
9
|
-
<button type="button" class="mu-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
<button type="button" class="mu-kids-modal-button mu-previous hidden" onclick="mumuki.kids.context.prevSlide()" aria-label="Previous">
|
10
|
+
<span aria-hidden="true">
|
11
|
+
<i class="fa fa-fw fa-arrow-left fa-3x"></i>
|
12
|
+
</span>
|
13
13
|
</button>
|
14
|
-
<button type="button" class="mu-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
<button type="button" class="mu-kids-modal-button mu-next" onclick="mumuki.kids.context.nextSlide()" aria-label="Next">
|
15
|
+
<span aria-hidden="true">
|
16
|
+
<i class="fa fa-fw fa-arrow-right fa-3x"></i>
|
17
|
+
</span>
|
18
18
|
</button>
|
19
|
-
<div class="modal-body">
|
19
|
+
<div class="modal-body mu-kids-context-body">
|
20
20
|
<div class="container-fluid">
|
21
21
|
<div class="row">
|
22
22
|
<div class="col-md-12">
|
@@ -1,17 +1,30 @@
|
|
1
|
-
<div class="modal fade mu-kids-results mu-
|
1
|
+
<div class="modal fade mu-kids-results mu-kids-modal-border" id="kids-results" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
|
-
<div class="modal-content">
|
4
|
-
<button type="button" class="mu-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
<div class="modal-content kindergarten">
|
4
|
+
<button type="button" class="mu-kids-modal-button mu-close" data-waiting="" data-dismiss="modal" aria-label="Close">
|
5
|
+
<span aria-hidden="true">
|
6
|
+
<i class="fa fa-fw fa-times fa-3x"></i>
|
7
|
+
</span>
|
8
|
+
</button>
|
9
|
+
<button type="button" class="mu-kids-modal-button mu-previous hidden" onclick="mumuki.kids.resultsCarrousel.prevSlide()" aria-label="Previous">
|
10
|
+
<span aria-hidden="true">
|
11
|
+
<i class="fa fa-fw fa-arrow-left fa-3x"></i>
|
12
|
+
</span>
|
13
|
+
</button>
|
14
|
+
<button type="button" class="mu-kids-modal-button mu-next" onclick="mumuki.kids.resultsCarrousel.nextSlide()" aria-label="Next">
|
15
|
+
<span aria-hidden="true">
|
16
|
+
<i class="fa fa-fw fa-arrow-right fa-3x"></i>
|
17
|
+
</span>
|
8
18
|
</button>
|
9
19
|
<div class="modal-header">
|
10
20
|
</div>
|
11
21
|
<div class="modal-body">
|
12
22
|
<div class="container-fluid">
|
13
23
|
<div class="row">
|
14
|
-
<div class="col-md-12
|
24
|
+
<div class="col-md-12">
|
25
|
+
<div class="mu-kids-results-carrousel">
|
26
|
+
<div class="active submission-results kindergarten"></div>
|
27
|
+
</div>
|
15
28
|
</div>
|
16
29
|
</div>
|
17
30
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<div class="modal fade mu-kids-results-aborted mu-
|
1
|
+
<div class="modal fade mu-kids-results-aborted mu-kids-modal-border" id="kids-results-aborted" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
|
-
<div class="modal-content broken">
|
4
|
-
<button type="button" class="mu-
|
3
|
+
<div class="modal-content broken kindergarten">
|
4
|
+
<button type="button" class="mu-kids-modal-button mu-close" data-dismiss="modal" aria-label="Close" data-waiting="">
|
5
5
|
<span aria-hidden="true">
|
6
6
|
<i class="fa fa-fw fa-times fa-3x"></i>
|
7
7
|
</span>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<div class="container-fluid">
|
16
16
|
<div class="row">
|
17
17
|
<div class="col-md-12">
|
18
|
-
<div class="mu-kids-character">
|
18
|
+
<div class="mu-kids-character kindergarten">
|
19
19
|
<img class="mu-kids-character-result-aborted"/>
|
20
20
|
</div>
|
21
21
|
</div>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="modal fade mu-level-up" id="mu-level-up" tabindex="-1" role="dialog" aria-hidden="true">
|
2
|
+
<div class="modal-dialog">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="modal-header">
|
5
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
6
|
+
<span aria-hidden="true">×</span></button>
|
7
|
+
<div class="guide-corollary-title">
|
8
|
+
<h3 class="text-left" id="gridSystemModalLabel"><%= t :level_up %></h3>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div class="modal-body">
|
12
|
+
<div class="container-fluid">
|
13
|
+
<div class="row">
|
14
|
+
<div class="col-md-12">
|
15
|
+
<div class="text-center mu-level">
|
16
|
+
<i class="fa fa-star fa-fw fa-4x"></i>
|
17
|
+
<span class="mu-level-number"></span>
|
18
|
+
<p></p>
|
19
|
+
<p id="mu-solve-more-exercises"> <%= (t :solve_more_exercises_to_level_up).html_safe %></p>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for :user, url:
|
1
|
+
<%= form_for :user, url: user_path, :html => { id: 'mu-user-form' }, method: :put do |f| %>
|
2
2
|
<div class="mu-user-header">
|
3
3
|
<h1><%= t(:edit_profile) %></h1>
|
4
4
|
<div class="mu-profile-actions hidden-xs">
|
@@ -5,10 +5,20 @@
|
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
<div class="row mu-tab-body">
|
8
|
-
<div class="col-md-4
|
8
|
+
<div class="col-md-4 mu-profile-info-left">
|
9
9
|
<%= profile_picture_for(@user, id: 'mu-user-avatar', class: 'mu-user-avatar') %>
|
10
|
+
<% if in_gamified_context? %>
|
11
|
+
<svg class="mu-level-progress" width="300" height="300" viewBox="0 0 100 100">
|
12
|
+
<path id="mu-level-progress" stroke-linecap="round" stroke="#24b8aa" stroke-width="4" stroke-dasharray="0, 999" fill="none" d="M50 10 a 40 40 0 0 1 0 80 a 40 40 0 0 1 0 -80"></path>
|
13
|
+
</svg>
|
14
|
+
<div class="mu-level">
|
15
|
+
<i class="fa fa-star fa-fw fa-4x"></i>
|
16
|
+
<span class="mu-level-number"></span>
|
17
|
+
<p><%= t :level %></p>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
10
20
|
</div>
|
11
|
-
<div class="col-md-8 mu-profile-info">
|
21
|
+
<div class="col-md-8 mu-profile-info-right">
|
12
22
|
<% if @user.age.present? %>
|
13
23
|
<div>
|
14
24
|
<span> <strong><%= t :age %>:</strong> <%= "#{@user.age} #{t :years}" %> </span>
|