mumuki-laboratory 7.10.5 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -7
- data/Rakefile +9 -2
- data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +26 -5
- data/app/assets/javascripts/mumuki_laboratory/application/characters.js +3 -1
- data/app/assets/javascripts/mumuki_laboratory/application/gamification.js +85 -0
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +160 -334
- data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +200 -0
- data/app/assets/javascripts/mumuki_laboratory/application/primary.js +257 -0
- data/app/assets/javascripts/mumuki_laboratory/application/profile.js +31 -16
- data/app/assets/javascripts/mumuki_laboratory/application/submission.js +1 -0
- data/app/assets/javascripts/mumuki_laboratory/application/submissions-store.js +19 -2
- data/app/assets/stylesheets/mumuki_laboratory/application/_errors.scss +1 -3
- data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +3 -1
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_avatar.scss +21 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/{_chapter_show.scss → _content_show.scss} +0 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +421 -12
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_medal.scss +48 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_terms.scss +44 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +9 -0
- data/app/controllers/api/courses_controller.rb +1 -2
- data/app/controllers/api/organizations_controller.rb +2 -3
- data/app/controllers/api/users_controller.rb +2 -4
- data/app/controllers/application_controller.rb +15 -8
- data/app/controllers/book_discussions_controller.rb +4 -0
- data/app/controllers/invitations_controller.rb +1 -2
- data/app/controllers/users_controller.rb +8 -2
- data/app/helpers/avatar_helper.rb +11 -3
- data/app/helpers/contextualization_result_helper.rb +9 -1
- data/app/helpers/kindergarten_helper.rb +5 -0
- data/app/helpers/links_helper.rb +8 -0
- data/app/helpers/medal_helper.rb +36 -0
- data/app/helpers/open_graph_helper.rb +2 -2
- data/app/helpers/organization_list_helper.rb +1 -1
- data/app/helpers/overlapped_buttons_helper.rb +1 -1
- data/app/helpers/page_title_helper.rb +2 -2
- data/app/helpers/profile_helper.rb +9 -1
- data/app/views/book/_header.html.erb +17 -0
- data/app/views/book/show.html.erb +1 -18
- data/app/views/discussions/terms.html.erb +10 -0
- data/app/views/exercise_solutions/_kids_results.html.erb +1 -1
- data/app/views/exercises/show.html.erb +1 -0
- data/app/views/invitations/_invitation_form.html.erb +1 -0
- data/app/views/layouts/_discussions.html.erb +4 -0
- data/app/views/layouts/_error.html.erb +3 -6
- data/app/views/layouts/_guide.html.erb +10 -3
- data/app/views/layouts/_kindergarten.html.erb +38 -0
- data/app/views/layouts/_main.html.erb +3 -1
- data/app/views/layouts/_organization_chooser.html.erb +0 -7
- data/app/views/layouts/_terms_acceptance_disclaimer.html.erb +6 -0
- data/app/views/layouts/application.html.erb +3 -2
- data/app/views/layouts/exercise_inputs/layouts/_input_kindergarten.html.erb +27 -27
- data/app/views/layouts/modals/_guide_corollary.html.erb +9 -0
- data/app/views/layouts/modals/_kindergarten_context.html.erb +30 -0
- data/app/views/layouts/modals/_kindergarten_results.html.erb +23 -0
- data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +27 -0
- data/app/views/users/_avatar_list.html.erb +6 -2
- data/app/views/users/_edit_user_form.html.erb +9 -4
- data/app/views/users/_term.html.erb +10 -0
- data/app/views/users/_user_form.html.erb +5 -1
- data/app/views/users/terms.html.erb +18 -0
- data/config/routes.rb +2 -0
- data/lib/mumuki/laboratory.rb +1 -1
- data/lib/mumuki/laboratory/controllers/current_organization.rb +1 -1
- data/lib/mumuki/laboratory/controllers/results_rendering.rb +3 -2
- data/lib/mumuki/laboratory/events/events.rb +0 -24
- data/lib/mumuki/laboratory/locales/en.yml +16 -5
- data/lib/mumuki/laboratory/locales/es-CL.yml +5 -4
- data/lib/mumuki/laboratory/locales/es.yml +17 -6
- data/lib/mumuki/laboratory/locales/pt.yml +16 -5
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/capybara_helper.rb +99 -0
- data/spec/controllers/exercise_solutions_controller_spec.rb +3 -4
- data/spec/dummy/db/schema.rb +37 -1
- data/spec/dummy/public/medal/outline.svg +1089 -0
- data/spec/features/choose_organization_spec.rb +12 -30
- data/spec/features/disable_user_flow_spec.rb +3 -5
- data/spec/features/disabled_organization_flow_spec.rb +9 -14
- data/spec/features/exercise_flow_spec.rb +2 -2
- data/spec/features/guide_reset_spec.rb +1 -1
- data/spec/features/guides_flow_spec.rb +1 -1
- data/spec/features/home_private_flow_spec.rb +1 -3
- data/spec/features/home_public_flow_spec.rb +6 -12
- data/spec/features/invitations_flow_spec.rb +2 -2
- data/spec/features/login_flow_spec.rb +2 -2
- data/spec/features/not_found_private_flow_spec.rb +4 -4
- data/spec/features/not_found_public_flow_spec.rb +1 -6
- data/spec/features/profile_flow_spec.rb +1 -1
- data/spec/helpers/page_title_helper_spec.rb +3 -3
- data/spec/javascripts/editors-spec.js +23 -0
- data/spec/javascripts/gamification-spec.js +58 -0
- data/spec/javascripts/submissions-store-spec.js +139 -6
- data/spec/spec_helper.rb +2 -0
- data/spec/teaspoon_env.rb +24 -6
- metadata +41 -7
data/config/routes.rb
CHANGED
@@ -12,6 +12,7 @@ Rails.application.routes.draw do
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
get '/discussions/terms' => 'book_discussions#terms'
|
15
16
|
concerns :debatable, controller: 'book_discussions', only: :index
|
16
17
|
|
17
18
|
resources :discussions, only: [] do
|
@@ -53,6 +54,7 @@ Rails.application.routes.draw do
|
|
53
54
|
|
54
55
|
# All users
|
55
56
|
resource :user, only: [:show, :edit]
|
57
|
+
get '/user/terms' => 'users#terms'
|
56
58
|
|
57
59
|
# Current user
|
58
60
|
resources :messages, only: [:index, :create]
|
data/lib/mumuki/laboratory.rb
CHANGED
@@ -19,7 +19,8 @@ module Mumuki::Laboratory::Controllers::ResultsRendering
|
|
19
19
|
.merge(progress_json)
|
20
20
|
.merge(
|
21
21
|
html: render_results(layout, assignment),
|
22
|
-
remaining_attempts_html: remaining_attempts_text(assignment)
|
22
|
+
remaining_attempts_html: remaining_attempts_text(assignment),
|
23
|
+
current_exp: UserStats.exp_for(assignment.submitter))
|
23
24
|
end
|
24
25
|
|
25
26
|
def merge_kids_specific_renders(assignment, results)
|
@@ -28,7 +29,7 @@ module Mumuki::Laboratory::Controllers::ResultsRendering
|
|
28
29
|
title_html: render_results_title(assignment),
|
29
30
|
expectations: assignment.affable_expectation_results,
|
30
31
|
tips: assignment.affable_tips,
|
31
|
-
test_results: assignment.
|
32
|
+
test_results: assignment.sanitized_affable_test_results) # these results could include escaped characters so they should be rendered as HTML to display properly
|
32
33
|
end
|
33
34
|
|
34
35
|
def progress_json
|
@@ -1,29 +1,5 @@
|
|
1
1
|
Mumukit::Nuntius::EventConsumer.handle do
|
2
2
|
|
3
|
-
# Emitted by user registration and modification in classroom
|
4
|
-
event 'UserChanged' do |payload|
|
5
|
-
User.import_from_resource_h! payload.deep_symbolize_keys[:user]
|
6
|
-
end
|
7
|
-
|
8
|
-
# Emitted by course creation of courses in classroom
|
9
|
-
event 'CourseChanged' do |payload|
|
10
|
-
Course.import_from_resource_h! payload.deep_symbolize_keys[:course]
|
11
|
-
end
|
12
|
-
|
13
|
-
# Emitted by invitation creation in classroom
|
14
|
-
event 'InvitationCreated' do |payload|
|
15
|
-
Invitation.import_from_resource_h! payload.deep_symbolize_keys[:invitation]
|
16
|
-
end
|
17
|
-
|
18
|
-
# Emitted by exam creation and modification in classroom
|
19
|
-
event 'UpsertExam' do |body|
|
20
|
-
Exam.import_from_resource_h! body
|
21
|
-
end
|
22
|
-
|
23
|
-
event 'UpsertExamStudents' do |body|
|
24
|
-
Exam.upsert_students! body
|
25
|
-
end
|
26
|
-
|
27
3
|
# Emitted by assigment manual evaluation in classroom
|
28
4
|
event 'AssignmentManuallyEvaluated' do |payload|
|
29
5
|
Assignment.evaluate_manually! payload.deep_symbolize_keys[:assignment]
|
@@ -3,7 +3,9 @@ en:
|
|
3
3
|
aborted: Oops, we couldn't evaluate your solution
|
4
4
|
abort_explanation_html: <li>Check that your program does not have recursion or an infinite loop</li> <li>Check that you have an internet connection</li> <li>Wait a while and try again</li>
|
5
5
|
about: About
|
6
|
-
|
6
|
+
accept: Accept
|
7
|
+
accept_terms: I have read and accept the terms and conditions
|
8
|
+
accept_terms_to_continue: Accept terms to continue
|
7
9
|
actions: Actions
|
8
10
|
activity: Activity
|
9
11
|
actual_state: Obtained board
|
@@ -103,6 +105,8 @@ en:
|
|
103
105
|
first_name: First Name
|
104
106
|
forbidden_explanation: Please verify you have logged in with the right account
|
105
107
|
format: Format
|
108
|
+
forum_terms: Forum rules
|
109
|
+
forum_terms_link: If you have any questions, please check %{terms_link}
|
106
110
|
fullscreen: "Fullscreen"
|
107
111
|
gender: Gender
|
108
112
|
get_messages: "View messages"
|
@@ -125,6 +129,12 @@ en:
|
|
125
129
|
joining_html: '¡Welcome to course <strong>%{course}</strong>!'
|
126
130
|
keep_learning: Keep learning!
|
127
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"
|
128
138
|
language: Language
|
129
139
|
last_name: Last Name
|
130
140
|
last_seen: "Seen by %{name}"
|
@@ -140,6 +150,7 @@ en:
|
|
140
150
|
locked_content: 'This content will be unlocked when you finish previous chapters'
|
141
151
|
male: Male
|
142
152
|
manual_evaluation_pending: Thanks for submitting your solution! It will be revised by the course teachers soon
|
153
|
+
medal: Medal
|
143
154
|
message_count:
|
144
155
|
one: 1 message
|
145
156
|
other: '%{count} messages'
|
@@ -148,8 +159,6 @@ en:
|
|
148
159
|
messages_error: Previous messages are unavailable. Please try again later.
|
149
160
|
more_messages: More
|
150
161
|
moderator: Mentor
|
151
|
-
mumuki_catchphrase: Improve your programming skills
|
152
|
-
mumuki_short_description: Mumuki is a simple, open and collaborative platform for sharing and solving programming exercises. It is aimed to help people with learning and teaching programing languages and paradigms
|
153
162
|
my_doubts: My doubts
|
154
163
|
my_submissions: My Submissions
|
155
164
|
name: Name
|
@@ -191,7 +200,6 @@ en:
|
|
191
200
|
permissions: Permissions
|
192
201
|
please_fill_profile_data: Please complete your profile data to continue!
|
193
202
|
please_validate: 'Please validate your data before continue:'
|
194
|
-
powered_by_mumuki_html: "powered by <span class=\"da da-mumuki-circle\"></span> mumuki"
|
195
203
|
previous_exercise: Previous
|
196
204
|
problem_with_exercise: '[Mumuki] Problem with exercise: %{title}'
|
197
205
|
processing_your_solution: We are processing you solution
|
@@ -234,7 +242,6 @@ en:
|
|
234
242
|
start_practicing: Start Practicing!
|
235
243
|
start_using_mumuki: Start using Mumuki!
|
236
244
|
status: Status
|
237
|
-
stay_here: I want to stay here
|
238
245
|
stop_emails?: Want to stop getting emails?
|
239
246
|
submission: submission
|
240
247
|
submission_date: Submission date
|
@@ -247,7 +254,10 @@ en:
|
|
247
254
|
teacher_info: Information for teachers
|
248
255
|
tell_us_how: Please tell us how this happened!
|
249
256
|
tell_us_if_our_error: If you think this is our fault, %{issues}
|
257
|
+
terms_accepted: The terms and conditions were accepted
|
250
258
|
terms_and_conditions: Terms and conditions
|
259
|
+
terms_and_conditions_continue_disclaimer: By continuing you agree to %{terms_link}
|
260
|
+
terms_and_conditions_must_be_accepted: You must accept the terms and conditions
|
251
261
|
test_results: Test results
|
252
262
|
time_ago: "%{time} ago"
|
253
263
|
time_left: You have
|
@@ -258,6 +268,7 @@ en:
|
|
258
268
|
to_solved: Mark as solved
|
259
269
|
unauthorized_explanation: You have no permissions for this content. Maybe you logged in with another account.
|
260
270
|
undo_upvote: Undo upvote
|
271
|
+
unlocked_medal_as_avatar: You earned this medal! You can now choose it as an avatar.
|
261
272
|
unspecified: I'd rather not say
|
262
273
|
unmeet_expectations: "Goals that weren't met"
|
263
274
|
unprepared_organization_explanation: This path hasn't started yet.
|
@@ -103,6 +103,7 @@ es-CL:
|
|
103
103
|
first_name: Nombre
|
104
104
|
forbidden_explanation: ¿Puede que hayas ingresado con una cuenta incorrecta?
|
105
105
|
format: Dar formato
|
106
|
+
forum_terms_link: Si tienes alguna duda, consulta las %{terms_link}
|
106
107
|
fullscreen: "Pantalla completa"
|
107
108
|
gender: Género
|
108
109
|
get_messages: "Ver mensajes"
|
@@ -143,6 +144,7 @@ es-CL:
|
|
143
144
|
locked_content: 'Éste contenido se desbloqueará cuando termines los capítulos anteriores'
|
144
145
|
male: Hombre
|
145
146
|
manual_evaluation_pending: ¡Gracias por enviar tu solución! Tus docentes la corregirán pronto
|
147
|
+
medal: Medalla
|
146
148
|
message_count:
|
147
149
|
one: 1 mensaje
|
148
150
|
other: '%{count} mensajes'
|
@@ -153,8 +155,6 @@ es-CL:
|
|
153
155
|
minutes: minutos
|
154
156
|
more_messages: Ver mensajes anteriores
|
155
157
|
moderator: Moderador
|
156
|
-
mumuki_catchphrase: Aprende a programar
|
157
|
-
mumuki_short_description: Mumuki es la plataforma libre y gratuita para aprender a programar, de la práctica a la teoría y en tu idioma
|
158
158
|
my_doubts: Mis consultas
|
159
159
|
name: Nombre
|
160
160
|
navigation_continue: 'Siguiente %{kind}: %{sibling}'
|
@@ -201,7 +201,6 @@ es-CL:
|
|
201
201
|
permissions: Permisos
|
202
202
|
please_fill_profile_data: ¡Completa tus datos personales para continuar!
|
203
203
|
please_validate: 'Estás a punto de ingresar al curso. Para poder ofrecerte una mejor experiencia, por favor valida que tus datos a continuación sean reales y correctos.'
|
204
|
-
powered_by_mumuki_html: "por <span class=\"da da-mumuki-circle\"></span> mumuki"
|
205
204
|
previous_exercise: Anterior
|
206
205
|
problem_with_exercise: '[Mumuki] Error con el ejercicio: %{title}'
|
207
206
|
processing_your_solution: Estamos procesando tu solución
|
@@ -245,7 +244,6 @@ es-CL:
|
|
245
244
|
start_practicing: ¡Empieza ahora!
|
246
245
|
start_using_mumuki: ¡Empieza a usar Mumuki!
|
247
246
|
status: Estado
|
248
|
-
stay_here: No, quiero quedarme acá
|
249
247
|
stop_emails?: ¿Quieres dejar de recibir estos mails?
|
250
248
|
subscribe: Recibir notificaciones
|
251
249
|
submission: solución
|
@@ -260,6 +258,8 @@ es-CL:
|
|
260
258
|
tell_us_how: ¡Cuéntanos cómo te pasó esto!
|
261
259
|
tell_us_if_our_error: Si piensas que es un error nuestro, %{issues}
|
262
260
|
terms_and_conditions: Términos y condiciones
|
261
|
+
terms_and_conditions_continue_disclaimer: Al continuar aceptas los %{terms_link}
|
262
|
+
terms_and_conditions_must_be_accepted: Tienes que aceptar los términos y condiciones
|
263
263
|
test_results: Resultados de las pruebas
|
264
264
|
time_since: "hace %{time}"
|
265
265
|
time_left: Te quedan
|
@@ -271,6 +271,7 @@ es-CL:
|
|
271
271
|
unauthorized_explanation: ¡Ups! Esto es lo que se conoce como %{error}, es decir que no iniciaste sesión.
|
272
272
|
uncategorized: No categorizado
|
273
273
|
undo_upvote: No es útil
|
274
|
+
unlocked_medal_as_avatar: ¡Obtuviste esta medalla! Ya puedes elegirla como avatar.
|
274
275
|
unspecified: Prefiero no decirlo
|
275
276
|
unmeet_expectations: Objetivos que no se cumplieron
|
276
277
|
unprepared_organization_explanation: ¡Este recorrido aún no ha comenzado!
|
@@ -3,7 +3,9 @@ es:
|
|
3
3
|
aborted: Ups, no pudimos evaluar tu solución
|
4
4
|
abort_explanation_html: <li>Revisá que tu programa no tenga recursión o algún bucle infinito</li><li>Revisá que tengas conexión a internet</li><li>Esperá un rato e intentalo nuevamente</li>
|
5
5
|
about: Detalles
|
6
|
-
|
6
|
+
accept: Aceptar
|
7
|
+
accept_terms: He leido y acepto los términos y condiciones
|
8
|
+
accept_terms_to_continue: Para continuar es necesario aceptar los términos y condiciones
|
7
9
|
actions: Acciones
|
8
10
|
activity: Actividad
|
9
11
|
actual_state: Tablero obtenido
|
@@ -109,6 +111,8 @@ es:
|
|
109
111
|
first_name: Nombre
|
110
112
|
forbidden_explanation: ¿Puede que hayas ingresado con una cuenta incorrecta?
|
111
113
|
format: Dar formato
|
114
|
+
forum_terms: Reglas del foro
|
115
|
+
forum_terms_link: Si tenés alguna duda, consultá las %{terms_link}
|
112
116
|
fullscreen: "Pantalla completa"
|
113
117
|
gender: Género
|
114
118
|
get_messages: "Ver mensajes"
|
@@ -133,7 +137,13 @@ es:
|
|
133
137
|
its_been_a_while: Hace un tiempo que no usás Mumuki.
|
134
138
|
joining_html: '¡Te damos la bienvenida al curso <strong>%{course}</strong>!'
|
135
139
|
keep_learning: ¡Seguí aprendiendo!
|
136
|
-
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"
|
137
147
|
language: Lenguaje
|
138
148
|
languages: Lenguajes
|
139
149
|
last_name: Apellido
|
@@ -150,6 +160,7 @@ es:
|
|
150
160
|
locked_content: 'Este contenido se desbloqueará cuando termines los capítulos anteriores'
|
151
161
|
male: Hombre
|
152
162
|
manual_evaluation_pending: ¡Gracias por enviar tu solución! Tus docentes la corregirán pronto
|
163
|
+
medal: Medalla
|
153
164
|
message_count:
|
154
165
|
one: 1 mensaje
|
155
166
|
other: '%{count} mensajes'
|
@@ -160,8 +171,6 @@ es:
|
|
160
171
|
minutes: minutos
|
161
172
|
more_messages: Ver mensajes anteriores
|
162
173
|
moderator: Mentor
|
163
|
-
mumuki_catchphrase: Aprendé a programar
|
164
|
-
mumuki_short_description: Mumuki es la plataforma libre y gratuita para aprender a programar, de la práctica a la teoría y en tu idioma
|
165
174
|
my_doubts: Mis consultas
|
166
175
|
name: Nombre
|
167
176
|
navigation_continue: 'Siguiente %{kind}: %{sibling}'
|
@@ -208,7 +217,6 @@ es:
|
|
208
217
|
permissions: Permisos
|
209
218
|
please_fill_profile_data: ¡Completá tus datos personales para continuar!
|
210
219
|
please_validate: 'Estás a punto de ingresar al curso. Para poder ofrecerte una mejor experiencia, por favor validá que tus datos a continuación sean reales y correctos.'
|
211
|
-
powered_by_mumuki_html: "por <span class=\"da da-mumuki-circle\"></span> mumuki"
|
212
220
|
previous_exercise: Anterior
|
213
221
|
problem_with_exercise: '[Mumuki] Error con el ejercicio: %{title}'
|
214
222
|
processing_your_solution: Estamos procesando tu solución
|
@@ -256,7 +264,6 @@ es:
|
|
256
264
|
start_practicing: ¡Empezá ahora!
|
257
265
|
start_using_mumuki: ¡Empezá a usar Mumuki!
|
258
266
|
status: Estado
|
259
|
-
stay_here: No, quiero quedarme acá
|
260
267
|
stop_emails?: ¿Querés dejar de recibir estos mails?
|
261
268
|
subscribe: Recibir notificaciones
|
262
269
|
submission: solución
|
@@ -270,7 +277,10 @@ es:
|
|
270
277
|
teacher_info: Información para docentes
|
271
278
|
tell_us_how: ¡Contanos cómo te pasó esto!
|
272
279
|
tell_us_if_our_error: Si pensás que es un error nuestro, %{issues}
|
280
|
+
terms_accepted: Los términos y condiciones fueron aceptados
|
273
281
|
terms_and_conditions: Términos y condiciones
|
282
|
+
terms_and_conditions_continue_disclaimer: Al continuar estás aceptando los %{terms_link}
|
283
|
+
terms_and_conditions_must_be_accepted: Tenés que aceptar los términos y condiciones
|
274
284
|
test_results: Resultados de las pruebas
|
275
285
|
time_since: "hace %{time}"
|
276
286
|
time_left: Te quedan
|
@@ -282,6 +292,7 @@ es:
|
|
282
292
|
unauthorized_explanation: ¡Ups! Esto es lo que se conoce como %{error}, es decir que no iniciaste sesión.
|
283
293
|
uncategorized: No categorizado
|
284
294
|
undo_upvote: No es útil
|
295
|
+
unlocked_medal_as_avatar: ¡Obtuviste esta medalla! Ya podés elegirla como avatar.
|
285
296
|
unspecified: Prefiero no decirlo
|
286
297
|
unmeet_expectations: Objetivos que no se cumplieron
|
287
298
|
unprepared_organization_explanation: Este recorrido aún no ha comenzado
|
@@ -3,7 +3,9 @@ pt:
|
|
3
3
|
aborted: Opa, não pudemos avaliar sua solução
|
4
4
|
abort_explanation_html: <li>Verifique se o seu programa não possui recursão ou um loop infinito</li> <li>Verifique se você tem uma conexão com a internet</li> <li>Espere um pouco e tente novamente</li>
|
5
5
|
about: Detalhes
|
6
|
-
|
6
|
+
accept: Aceitar
|
7
|
+
accept_terms: Eu li e aceito ceito os termos e condições
|
8
|
+
accept_terms_to_continue: Aceite os termos e condições para continuar
|
7
9
|
actions: Ações
|
8
10
|
activity: Atividade
|
9
11
|
actual_state: Tablero obtido
|
@@ -105,6 +107,8 @@ pt:
|
|
105
107
|
first_name: Nome
|
106
108
|
forbidden_explanation: Você poderia ter entrado com uma conta incorreta?
|
107
109
|
format: Formato
|
110
|
+
forum_terms: Regras do fórum
|
111
|
+
forum_terms_link: Se você tiver alguma dúvida, consulte as %{terms_link}
|
108
112
|
fullscreen: Tela completa
|
109
113
|
gender: Gênero
|
110
114
|
get_messages: Ver mensagens
|
@@ -128,6 +132,12 @@ pt:
|
|
128
132
|
item_not_accessible: Você não tem permissões para acessar este conteúdo
|
129
133
|
joining_html: Bem-vindo ao curso <strong> %{curso} </strong>!
|
130
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"
|
131
141
|
language: Linguagem
|
132
142
|
languages: Linguagens
|
133
143
|
last_name: Sobrenome
|
@@ -144,6 +154,7 @@ pt:
|
|
144
154
|
locked_content: 'Este conteúdo será desbloqueado quando você terminar os capítulos anteriores'
|
145
155
|
male: Masculino
|
146
156
|
manual_evaluation_pending: Obrigado por enviar sua solução! Seus professores irão corrigi-lo em breve
|
157
|
+
medal: Medalha
|
147
158
|
message_count:
|
148
159
|
one: 1 mensagem
|
149
160
|
other: '%{count} mensagens'
|
@@ -154,8 +165,6 @@ pt:
|
|
154
165
|
minutes: minutos
|
155
166
|
more_messages: Ver as mensagens anteriores
|
156
167
|
moderator: Mentor
|
157
|
-
mumuki_catchphrase: Aprendi a programar
|
158
|
-
mumuki_short_description: Mumuki é a plataforma gratuita e gratuita para aprender a programar, desde a prática até a teoria e no seu idioma
|
159
168
|
my_doubts: Minhas duvidas
|
160
169
|
name: Nome
|
161
170
|
navigation_continue: "Próximo %{kind}: %{sibling}"
|
@@ -199,7 +208,6 @@ pt:
|
|
199
208
|
permissions: Permissões
|
200
209
|
please_fill_profile_data: Preencha suas informações pessoais para continuar!
|
201
210
|
please_validate: Você está prestes a entrar no curso. Para oferecer uma experiência melhor, valide que seus dados abaixo sejam reais e corretos.
|
202
|
-
powered_by_mumuki_html: por <span class = "da da-mumuki-circle"> </ span> mumuki
|
203
211
|
previous_exercise: Anterior
|
204
212
|
problem_with_exercise: '[Mumuki] Erro com exercício %{title}'
|
205
213
|
processing_your_solution: Estamos processando sua solução
|
@@ -242,7 +250,6 @@ pt:
|
|
242
250
|
start_lesson: Comece esta lição!
|
243
251
|
start_practicing: Comece agora!
|
244
252
|
status: Estado
|
245
|
-
stay_here: Não, eu quero ficar aqui
|
246
253
|
submission: solução
|
247
254
|
submission_date: Data de envio
|
248
255
|
submission_for_exercise: Solução para exercício
|
@@ -255,7 +262,10 @@ pt:
|
|
255
262
|
teacher_info: Informação para professores
|
256
263
|
tell_us_how: Conte-nos como isso aconteceu com você!
|
257
264
|
tell_us_if_our_error: Se você acha que é nosso erro, %{issues}
|
265
|
+
terms_accepted: Os termos e condições foram aceitos
|
258
266
|
terms_and_conditions: Termos e Condições
|
267
|
+
terms_and_conditions_continue_disclaimer: Ao continuar, você concorda %{terms_link}
|
268
|
+
terms_and_conditions_must_be_accepted: Você deve aceitar os Termos e Condições
|
259
269
|
test_results: Resultados do teste
|
260
270
|
time_since: "há %{time}"
|
261
271
|
time_left: Te deixam
|
@@ -266,6 +276,7 @@ pt:
|
|
266
276
|
to_solved: Marcar como resolvida
|
267
277
|
unauthorized_explanation: Opa! Isso é o que é conhecido como %{error}, ou seja, você não fez logon.
|
268
278
|
uncategorized: Não classificado
|
279
|
+
unlocked_medal_as_avatar: Você ganhou essa medalha! Agora você pode escolhê-la como avatar.
|
269
280
|
unspecified: Eu preferiria não dizer
|
270
281
|
unmeet_expectations: Objetivos que não foram atendidos
|
271
282
|
unprepared_organization_explanation: Este curso ainda não começou
|
data/spec/capybara_helper.rb
CHANGED
@@ -1,12 +1,111 @@
|
|
1
1
|
require 'capybara/rails'
|
2
2
|
require 'capybara/rspec'
|
3
3
|
|
4
|
+
# Test helpers
|
5
|
+
|
6
|
+
def page_body
|
7
|
+
find('body')
|
8
|
+
end
|
9
|
+
|
10
|
+
def set_request_header!(key, value)
|
11
|
+
current_driver = Capybara.current_session.driver
|
12
|
+
if current_driver.respond_to? :header
|
13
|
+
current_driver.header key, value
|
14
|
+
else
|
15
|
+
$custom_headers = {key => value}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
4
19
|
def set_subdomain_host!(subdomain)
|
5
20
|
@request.try { |it| it.host = Mumukit::Platform.laboratory.organic_domain subdomain }
|
6
21
|
Capybara.app_host = Mumukit::Platform.laboratory.organic_url subdomain
|
7
22
|
end
|
8
23
|
|
9
24
|
def set_implicit_central!
|
25
|
+
warn "Implicit behaviour is going to be removed soon"
|
10
26
|
@request.try { |it| it.host = Mumukit::Platform.laboratory.domain }
|
11
27
|
Capybara.app_host = Mumukit::Platform.laboratory.url
|
12
28
|
end
|
29
|
+
|
30
|
+
# Config helpers
|
31
|
+
|
32
|
+
def selected_driver
|
33
|
+
case ENV['MUMUKI_SELENIUM_DRIVER']
|
34
|
+
when 'chrome'
|
35
|
+
:selenium_chrome_headless
|
36
|
+
when 'firefox'
|
37
|
+
:selenium_headless
|
38
|
+
when 'safari'
|
39
|
+
:selenium_safari
|
40
|
+
else
|
41
|
+
:rack_test
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def run_with_selenium?
|
46
|
+
selected_driver.to_s.start_with? 'selenium'
|
47
|
+
end
|
48
|
+
|
49
|
+
def register_safari_driver!
|
50
|
+
# No official docs for this, code was taken from https://github.com/teamcapybara/capybara/blob/master/spec/selenium_spec_safari.rb
|
51
|
+
Capybara.register_driver :selenium_safari do |app|
|
52
|
+
Capybara::Selenium::Driver.new(app, browser: :safari, timeout: 30)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Registers a middleware to set request headers, because Selenium Webdriver has no native support for that
|
57
|
+
def register_request_headers_workaround!
|
58
|
+
RSpec.configure do |config|
|
59
|
+
config.after(:suite) do
|
60
|
+
$custom_headers = nil
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
Object.class_eval <<-EOR
|
65
|
+
module RequestWithExtraHeaders
|
66
|
+
def headers
|
67
|
+
$custom_headers.each { |key, value| self.set_header "HTTP_\#{key}", value } if $custom_headers
|
68
|
+
super
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class ActionDispatch::Request
|
73
|
+
prepend RequestWithExtraHeaders
|
74
|
+
end
|
75
|
+
EOR
|
76
|
+
end
|
77
|
+
|
78
|
+
def exclude_selenium_failing_tests!
|
79
|
+
RSpec.configure do |config|
|
80
|
+
config.filter_run_excluding(
|
81
|
+
# Response headers are not supported by Selenium Driver
|
82
|
+
:http_response_headers,
|
83
|
+
|
84
|
+
# TODO: the following ignored groups should be fixed
|
85
|
+
:element_not_interactable_error,
|
86
|
+
:invalid_selector_error,
|
87
|
+
:json_eq_error,
|
88
|
+
:navigation_error,
|
89
|
+
:organization_not_nil,
|
90
|
+
:xpath_no_matches
|
91
|
+
)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Configuration
|
96
|
+
|
97
|
+
register_safari_driver! if selected_driver == :selenium_safari
|
98
|
+
Capybara.default_driver = selected_driver
|
99
|
+
|
100
|
+
# TODO: fix the tests that depend on hidden elements and remove this
|
101
|
+
Capybara.ignore_hidden_elements = false
|
102
|
+
|
103
|
+
if run_with_selenium?
|
104
|
+
register_request_headers_workaround!
|
105
|
+
exclude_selenium_failing_tests!
|
106
|
+
|
107
|
+
# Include port on the URL, so we don't need to forward it via nginx or so
|
108
|
+
Capybara.always_include_port = true
|
109
|
+
end
|
110
|
+
|
111
|
+
puts "Running Capybara tests with #{selected_driver}, #{Capybara.ignore_hidden_elements ? '' : 'not '}ignoring hidden elements"
|