mumuki-laboratory 7.12.0 → 7.12.1
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/characters.js +3 -1
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +160 -334
- data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +185 -130
- data/app/assets/javascripts/mumuki_laboratory/application/primary.js +257 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +37 -17
- data/app/helpers/contextualization_result_helper.rb +9 -1
- data/app/views/exercise_solutions/_kids_results.html.erb +1 -1
- data/app/views/layouts/_kindergarten.html.erb +4 -4
- data/app/views/layouts/modals/_kindergarten_context.html.erb +3 -3
- data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +8 -5
- data/lib/mumuki/laboratory.rb +1 -1
- data/lib/mumuki/laboratory/locales/en.yml +6 -0
- data/lib/mumuki/laboratory/locales/es.yml +7 -1
- data/lib/mumuki/laboratory/locales/pt.yml +6 -0
- data/lib/mumuki/laboratory/version.rb +1 -1
- metadata +3 -2
@@ -14,15 +14,6 @@ $modal-footer-height: 95px;
|
|
14
14
|
height: calc(100% - #{$kids-characters-height} - 15px);
|
15
15
|
width: 100%;
|
16
16
|
|
17
|
-
.konvajs-content {
|
18
|
-
width: unset !important;
|
19
|
-
height: unset !important;
|
20
|
-
canvas {
|
21
|
-
width: unset !important;
|
22
|
-
height: unset !important;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
17
|
.mu-kids-single-state,
|
27
18
|
.mu-kids-blocks {
|
28
19
|
width: 50%;
|
@@ -30,7 +21,7 @@ $modal-footer-height: 95px;
|
|
30
21
|
}
|
31
22
|
|
32
23
|
.mu-kids-blocks {
|
33
|
-
|
24
|
+
margin-right: 15px;
|
34
25
|
}
|
35
26
|
|
36
27
|
&.mu-full-workspace {
|
@@ -78,7 +69,7 @@ $modal-footer-height: 95px;
|
|
78
69
|
padding: 30px;
|
79
70
|
img {
|
80
71
|
padding: 0;
|
81
|
-
border:
|
72
|
+
border: 3px solid black;
|
82
73
|
border-radius: 30px;
|
83
74
|
}
|
84
75
|
}
|
@@ -107,14 +98,36 @@ $modal-footer-height: 95px;
|
|
107
98
|
.modal-content {
|
108
99
|
position: absolute;
|
109
100
|
|
110
|
-
$width: 800px;
|
111
|
-
$height: $width * 0.625;
|
101
|
+
$width-lg: 800px;
|
102
|
+
$height-lg: $width-lg * 0.625;
|
103
|
+
|
104
|
+
width: $width-lg;
|
105
|
+
height: $height-lg;
|
106
|
+
|
107
|
+
top: calc(50vh - #{$height-lg} / 2);
|
108
|
+
left: calc(50vw - #{$width-lg} / 2);
|
109
|
+
|
110
|
+
@media (orientation: landscape) and (max-height: $height-lg + 50px) {
|
111
|
+
$height-sm: 85vh;
|
112
|
+
$width-sm: $height-sm / 0.625;
|
113
|
+
|
114
|
+
width: $width-sm;
|
115
|
+
height: $height-sm;
|
112
116
|
|
113
|
-
|
114
|
-
|
117
|
+
top: calc(50vh - #{$height-sm} / 2);
|
118
|
+
left: calc(50vw - #{$width-sm} / 2);
|
119
|
+
}
|
120
|
+
|
121
|
+
@media (orientation: portrait) {
|
122
|
+
$height-sm: 85vh;
|
123
|
+
$width-sm: 85vw;
|
115
124
|
|
116
|
-
|
117
|
-
|
125
|
+
width: $width-sm;
|
126
|
+
height: $height-sm;
|
127
|
+
|
128
|
+
top: calc(50vh - #{$height-sm} / 2);
|
129
|
+
left: calc(50vw - #{$width-sm} / 2);
|
130
|
+
}
|
118
131
|
|
119
132
|
$border-width: 16px;
|
120
133
|
border-width: $border-width;
|
@@ -123,6 +136,12 @@ $modal-footer-height: 95px;
|
|
123
136
|
border-radius: $border-width;
|
124
137
|
box-shadow: none;
|
125
138
|
|
139
|
+
.modal-header,
|
140
|
+
.modal-footer {
|
141
|
+
text-align: center;
|
142
|
+
text-transform: uppercase;
|
143
|
+
}
|
144
|
+
|
126
145
|
.modal-body {
|
127
146
|
height: 100%;
|
128
147
|
div, p {
|
@@ -171,6 +190,7 @@ $modal-footer-height: 95px;
|
|
171
190
|
'passed': $mu-color-success,
|
172
191
|
'passed-with-warnings': $mu-color-warning,
|
173
192
|
'failed': $mu-color-danger,
|
193
|
+
'errored': $mu-color-broken,
|
174
194
|
'aborted': $mu-color-broken,
|
175
195
|
'pending': $mu-color-info
|
176
196
|
);
|
@@ -8,7 +8,7 @@ module ContextualizationResultHelper
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def t_contextualization_status(contextualization)
|
11
|
-
t contextualization_status
|
11
|
+
t contextualization_status(contextualization)
|
12
12
|
end
|
13
13
|
|
14
14
|
def contextualization_status(contextualization)
|
@@ -16,6 +16,14 @@ module ContextualizationResultHelper
|
|
16
16
|
:hidden_done
|
17
17
|
elsif contextualization.exercise.choice?
|
18
18
|
contextualization.solved? ? :correct_answer : :wrong_answer
|
19
|
+
else
|
20
|
+
contextualization_status_translation_key contextualization
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def contextualization_status_translation_key(contextualization)
|
25
|
+
if contextualization.exercise.input_kindergarten?
|
26
|
+
"kindergarten_#{contextualization.submission_status}"
|
19
27
|
else
|
20
28
|
contextualization.submission_status
|
21
29
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= corollary_box @exercise %>
|
13
13
|
<% else %>
|
14
14
|
<div class="mu-kids-default-success">
|
15
|
-
<img class="capital-animation mu-kids-character-
|
15
|
+
<img class="capital-animation mu-kids-character-result"/>
|
16
16
|
<p><%= t :kids_default_success %></p>
|
17
17
|
</div>
|
18
18
|
<% end %>
|
@@ -4,10 +4,10 @@
|
|
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.
|
7
|
+
<button class="mu-kindergarten-show-context" onclick="mumuki.kids.context.showContext()">
|
8
8
|
<img class="mu-kindergarten-button-image" src="https://mumuki.io/static/show-context.svg" alt="">
|
9
9
|
</button>
|
10
|
-
<button class="mu-kindergarten-play-description" onclick="mumuki.
|
10
|
+
<button class="mu-kindergarten-play-description" onclick="mumuki.kids.speech.click('.mu-kindergarten-exercise-description', '<%= exercise.locale %>')">
|
11
11
|
<img class="mu-kindergarten-button-image mu-kindergarten-play" src="https://mumuki.io/static/audio-play.svg" alt="">
|
12
12
|
<img class="mu-kindergarten-button-image mu-kindergarten-stop hidden" src="https://mumuki.io/static/audio-stop.svg" alt="">
|
13
13
|
</button>
|
@@ -16,14 +16,14 @@
|
|
16
16
|
</div>
|
17
17
|
<div class="mu-kindergarten-hint">
|
18
18
|
<% if exercise.hint? %>
|
19
|
-
<button class="mu-hint-light" onclick="mumuki.
|
19
|
+
<button class="mu-hint-light" onclick="mumuki.kids.hint.toggle()">
|
20
20
|
<img class="mu-hint-light on" src="https://mumuki.io/static/lamparita_on.svg" alt="">
|
21
21
|
</button>
|
22
22
|
<div class="mu-kindergarten-light-speech-bubble">
|
23
23
|
<span class="mu-kindergarten-exercise-hint">
|
24
24
|
<%= exercise.hint.markdownified %>
|
25
25
|
</span>
|
26
|
-
<button class="expand-or-collapse-hint-media" onclick="mumuki.
|
26
|
+
<button class="expand-or-collapse-hint-media" onclick="mumuki.kids.hint.toggleMedia()">
|
27
27
|
<i class="fa fa-fw fa-2x fa-caret-up"></i>
|
28
28
|
</button>
|
29
29
|
</div>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<div class="modal fade mu-kindergarten-context" id="mu-kids-context" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
3
|
<div class="modal-content">
|
4
|
-
<button type="button" class="mu-kindergarten-modal-button mu-close" data-waiting="
|
4
|
+
<button type="button" class="mu-kindergarten-modal-button mu-close" data-waiting="" data-dismiss="modal" aria-label="Close">
|
5
5
|
<span aria-hidden="true">
|
6
6
|
<i class="fa fa-fw fa-times fa-3x"></i>
|
7
7
|
</span>
|
8
8
|
</button>
|
9
|
-
<button type="button" class="mu-kindergarten-modal-button mu-previous hidden" onclick="mumuki.
|
9
|
+
<button type="button" class="mu-kindergarten-modal-button mu-previous hidden" onclick="mumuki.kids.context.prevSlide()" aria-label="Previous">
|
10
10
|
<span aria-hidden="true">
|
11
11
|
<i class="fa fa-fw fa-arrow-left fa-3x"></i>
|
12
12
|
</span>
|
13
13
|
</button>
|
14
|
-
<button type="button" class="mu-kindergarten-modal-button mu-next" onclick="mumuki.
|
14
|
+
<button type="button" class="mu-kindergarten-modal-button mu-next" onclick="mumuki.kids.context.nextSlide()" aria-label="Next">
|
15
15
|
<span aria-hidden="true">
|
16
16
|
<i class="fa fa-fw fa-arrow-right fa-3x"></i>
|
17
17
|
</span>
|
@@ -1,19 +1,22 @@
|
|
1
1
|
<div class="modal fade mu-kids-results-aborted mu-kindergarten-context" id="kids-results-aborted" tabindex="-1" role="dialog" aria-hidden="true">
|
2
2
|
<div class="modal-dialog">
|
3
|
-
<div class="modal-content
|
4
|
-
<button type="button" class="mu-kindergarten-modal-button mu-close" data-dismiss="modal" aria-label="Close">
|
3
|
+
<div class="modal-content broken">
|
4
|
+
<button type="button" class="mu-kindergarten-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>
|
8
8
|
</button>
|
9
|
-
<
|
10
|
-
|
9
|
+
<div class="modal-header">
|
10
|
+
<h4 class="modal-title text-broken">
|
11
|
+
<strong><%= t :kindergarten_aborted %></strong>
|
12
|
+
</h4>
|
13
|
+
</div>
|
11
14
|
<div class="modal-body">
|
12
15
|
<div class="container-fluid">
|
13
16
|
<div class="row">
|
14
17
|
<div class="col-md-12">
|
15
18
|
<div class="mu-kids-character">
|
16
|
-
<img/>
|
19
|
+
<img class="mu-kids-character-result-aborted"/>
|
17
20
|
</div>
|
18
21
|
</div>
|
19
22
|
</div>
|
data/lib/mumuki/laboratory.rb
CHANGED
@@ -129,6 +129,12 @@ en:
|
|
129
129
|
joining_html: '¡Welcome to course <strong>%{course}</strong>!'
|
130
130
|
keep_learning: Keep learning!
|
131
131
|
kids_default_success: You did it great!
|
132
|
+
kindergarten_passed: "Your program worked great!"
|
133
|
+
kindergarten_passed_with_warnings: "Your program worked great!"
|
134
|
+
kindergarten_pending: "There's an error in your program. Try again!"
|
135
|
+
kindergarten_failed: "There's an error in your program. Try again!"
|
136
|
+
kindergarten_errored: "There's an error in your program. Try again!"
|
137
|
+
kindergarten_aborted: "Ups! Something went wrong"
|
132
138
|
language: Language
|
133
139
|
last_name: Last Name
|
134
140
|
last_seen: "Seen by %{name}"
|
@@ -137,7 +137,13 @@ es:
|
|
137
137
|
its_been_a_while: Hace un tiempo que no usás Mumuki.
|
138
138
|
joining_html: '¡Te damos la bienvenida al curso <strong>%{course}</strong>!'
|
139
139
|
keep_learning: ¡Seguí aprendiendo!
|
140
|
-
kids_default_success: ¡Lo hiciste muy bien!
|
140
|
+
kids_default_success: "¡Lo hiciste muy bien!"
|
141
|
+
kindergarten_passed: "¡Tu programa está muy bien!"
|
142
|
+
kindergarten_passed_with_warnings: "¡Tu programa está muy bien!"
|
143
|
+
kindergarten_pending: "Hay un error en tu programa. ¡Intentá de nuevo!"
|
144
|
+
kindergarten_failed: "Hay un error en tu programa. ¡Intentá de nuevo!"
|
145
|
+
kindergarten_errored: "Hay un error en tu programa. ¡Intentá de nuevo!"
|
146
|
+
kindergarten_aborted: "¡Ups! Hubo un problema técnico"
|
141
147
|
language: Lenguaje
|
142
148
|
languages: Lenguajes
|
143
149
|
last_name: Apellido
|
@@ -132,6 +132,12 @@ pt:
|
|
132
132
|
item_not_accessible: Você não tem permissões para acessar este conteúdo
|
133
133
|
joining_html: Bem-vindo ao curso <strong> %{curso} </strong>!
|
134
134
|
kids_default_success: Você fez muito bem!
|
135
|
+
kindergarten_passed: "O seu programa é muito bom!"
|
136
|
+
kindergarten_passed_with_warnings: "O seu programa é muito bom!"
|
137
|
+
kindergarten_pending: "Houve um erro no seu programa. Tenta novamente!"
|
138
|
+
kindergarten_failed: "Houve um erro no seu programa. Tenta novamente!"
|
139
|
+
kindergarten_errored: "Houve um erro no seu programa. Tenta novamente!"
|
140
|
+
kindergarten_aborted: "Opa! Houve um problema técnico"
|
135
141
|
language: Linguagem
|
136
142
|
languages: Linguagens
|
137
143
|
last_name: Sobrenome
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.12.
|
4
|
+
version: 7.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -376,6 +376,7 @@ files:
|
|
376
376
|
- app/assets/javascripts/mumuki_laboratory/application/multiple-scenarios.js
|
377
377
|
- app/assets/javascripts/mumuki_laboratory/application/pin.js
|
378
378
|
- app/assets/javascripts/mumuki_laboratory/application/popover.js
|
379
|
+
- app/assets/javascripts/mumuki_laboratory/application/primary.js
|
379
380
|
- app/assets/javascripts/mumuki_laboratory/application/profile.js
|
380
381
|
- app/assets/javascripts/mumuki_laboratory/application/progress.js
|
381
382
|
- app/assets/javascripts/mumuki_laboratory/application/results-renderer.js
|