mumuki-laboratory 9.3.0 → 9.3.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/faqs.js +6 -6
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +0 -25
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_faqs.scss +4 -3
- data/app/helpers/discussions_helper.rb +10 -2
- data/app/views/discussions/_description_message.html.erb +1 -1
- data/app/views/discussions/_message.html.erb +1 -1
- data/app/views/discussions/_new_message.html.erb +1 -1
- data/app/views/discussions/new.html.erb +1 -1
- data/app/views/exercises/_read_only.html.erb +3 -3
- data/app/views/faqs/index.html.erb +1 -1
- data/app/views/users/activity.html.erb +8 -6
- data/lib/mumuki/laboratory/locales/en.yml +3 -3
- data/lib/mumuki/laboratory/locales/es-CL.yml +3 -3
- data/lib/mumuki/laboratory/locales/es.yml +3 -3
- data/lib/mumuki/laboratory/locales/pt.yml +3 -3
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/features/user_activity_flow_spec.rb +30 -10
- data/spec/helpers/with_navigation_spec.rb +22 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72cf517c032d4c5173d14f33d52060ad7f2ee504beeed5425ebb91a4e3591359
|
4
|
+
data.tar.gz: b74980c8331ac7dd02f6e56ba249cb1e7c8a788eecb2e7a88c7b263451069d8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a92eb701dfaf5fc7666c9e5193908c979018825e9d8a6926eb453ece500dc6431ad149eb43b1eae942e862e6eb8904e57052d3d235b5fb53d54ef0d3c0fe7c77
|
7
|
+
data.tar.gz: 023e52805e6213623bda1e6b9bc2e954b032880f7df6ece9c54e8a007c71740aeb5952b0e58365367405e0821d4739480518ac24267bd4839a32b9bb418d8af3
|
@@ -25,9 +25,9 @@ mumuki.faqs = class {
|
|
25
25
|
_createNavbar() {
|
26
26
|
const $faqsNavbar = $(".mu-faqs-navbar nav ul");
|
27
27
|
$('.mu-faqs-group').each((_index, faqGroup) => {
|
28
|
-
const $navItem = this._createNavbarItem($faqsNavbar, faqGroup)
|
28
|
+
const $navItem = this._createNavbarItem($faqsNavbar, faqGroup);
|
29
29
|
const $faqGroup = $(faqGroup);
|
30
|
-
this._configureClickFor($navItem, $faqGroup, $faqsNavbar)
|
30
|
+
this._configureClickFor($navItem, $faqGroup, $faqsNavbar);
|
31
31
|
});
|
32
32
|
}
|
33
33
|
|
@@ -56,12 +56,12 @@ mumuki.faqs = class {
|
|
56
56
|
}
|
57
57
|
|
58
58
|
_createFaqsIcons() {
|
59
|
-
const $faqIcon = $('<i class="mu-faqs-group-icon
|
59
|
+
const $faqIcon = $('<i class="mu-faqs-group-icon fas fa-chevron-down">');
|
60
60
|
$faqIcon.click(function(e){
|
61
61
|
const $elem = $(this);
|
62
|
-
$elem.toggleClass('fa-
|
62
|
+
$elem.toggleClass('fa-chevron-down fa-chevron-up');
|
63
63
|
$elem.closest('.mu-faqs-group').toggleClass('active');
|
64
|
-
})
|
64
|
+
});
|
65
65
|
$('.mu-faqs-group').prepend($faqIcon);
|
66
66
|
}
|
67
67
|
|
@@ -75,7 +75,7 @@ mumuki.faqs = class {
|
|
75
75
|
newGroup = [];
|
76
76
|
}
|
77
77
|
newGroup.push(elem);
|
78
|
-
previousNodeName = elem.nodeName
|
78
|
+
previousNodeName = elem.nodeName;
|
79
79
|
});
|
80
80
|
|
81
81
|
elemsGroups.push(newGroup);
|
@@ -394,31 +394,6 @@ $moderator-badge-color: #dd9900;
|
|
394
394
|
}
|
395
395
|
}
|
396
396
|
|
397
|
-
$statuses: (
|
398
|
-
closed: ($danger white $danger),
|
399
|
-
opened: (white #333333 #eaeaea),
|
400
|
-
solved: ($success white $success),
|
401
|
-
pending_review: ($success white $success)
|
402
|
-
);
|
403
|
-
|
404
|
-
@each $status, $style in $statuses {
|
405
|
-
$background-color: nth($style, 1);
|
406
|
-
$font-color: nth($style, 2);
|
407
|
-
$border-color: nth($style, 3);
|
408
|
-
|
409
|
-
.btn-discussion-#{$status} {
|
410
|
-
background-color: $background-color;
|
411
|
-
color: $font-color;
|
412
|
-
border-color: $border-color;
|
413
|
-
margin-left: 5px;
|
414
|
-
&:hover {
|
415
|
-
color: $font-color;
|
416
|
-
border-color: darken($border-color, 3%);
|
417
|
-
background-color: darken($background-color, 3%);
|
418
|
-
}
|
419
|
-
}
|
420
|
-
}
|
421
|
-
|
422
397
|
.discussion-requires-attention {
|
423
398
|
margin-right: 20px;
|
424
399
|
label {
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
width: 100%;
|
10
10
|
|
11
|
-
@media
|
11
|
+
@include media-breakpoint-up(md) {
|
12
12
|
width: 75%;
|
13
13
|
float: right;
|
14
14
|
}
|
@@ -17,8 +17,9 @@
|
|
17
17
|
padding: 32px;
|
18
18
|
box-shadow: 0 0.375em 2.8125em 0 #d2d5d9;
|
19
19
|
margin-bottom: 32px;
|
20
|
+
word-wrap: anywhere;
|
20
21
|
|
21
|
-
@media
|
22
|
+
@include media-breakpoint-down(md) {
|
22
23
|
&:not(.active) {
|
23
24
|
h3, p {
|
24
25
|
display: none
|
@@ -44,7 +45,7 @@
|
|
44
45
|
margin-top: 10px;
|
45
46
|
cursor: pointer;
|
46
47
|
display: none;
|
47
|
-
@media
|
48
|
+
@include media-breakpoint-down(md) {
|
48
49
|
display: unset;
|
49
50
|
}
|
50
51
|
}
|
@@ -83,10 +83,14 @@ module DiscussionsHelper
|
|
83
83
|
def discussion_update_status_button(status)
|
84
84
|
button_to t("to_#{status}"),
|
85
85
|
item_discussion_path(@discussion, {status: status}),
|
86
|
-
class: "btn btn
|
86
|
+
class: "btn btn-#{btn_type_for_discussion_statuses[status.to_sym]}",
|
87
87
|
method: :put
|
88
88
|
end
|
89
89
|
|
90
|
+
def btn_type_for_discussion_statuses
|
91
|
+
{ closed: 'danger', solved: 'success', opened: 'light' }
|
92
|
+
end
|
93
|
+
|
90
94
|
def new_discussion_link(teaser_text, link_text)
|
91
95
|
%Q{
|
92
96
|
<h4>
|
@@ -173,7 +177,7 @@ module DiscussionsHelper
|
|
173
177
|
end
|
174
178
|
|
175
179
|
def discussion_info(discussion)
|
176
|
-
"#{t(:time_since, time: time_ago_in_words(discussion.created_at))} · #{t(:
|
180
|
+
"#{t(:time_since, time: time_ago_in_words(discussion.created_at))} · #{t(:reply_count, count: discussion.visible_messages.size)}"
|
177
181
|
end
|
178
182
|
|
179
183
|
def discussion_filter_params_without_page
|
@@ -188,6 +192,10 @@ module DiscussionsHelper
|
|
188
192
|
user.abbreviated_name
|
189
193
|
end
|
190
194
|
|
195
|
+
def linked_discussion_user_name(user)
|
196
|
+
content_tag :a, discussion_user_name(user)
|
197
|
+
end
|
198
|
+
|
191
199
|
def subscription_icon
|
192
200
|
fa_icon :bell, text: t(:subscribe)
|
193
201
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="discussion-message-bubble">
|
3
3
|
<div class="discussion-message-bubble-header">
|
4
4
|
<div class="discussion-message-bubble-title">
|
5
|
-
<%=
|
5
|
+
<%= linked_discussion_user_name(discussion.initiator) %>
|
6
6
|
<span class="message-date">
|
7
7
|
<%= t(:time_since, time: time_ago_in_words(discussion.created_at)) %>
|
8
8
|
</span>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="discussion-message-bubble">
|
3
3
|
<div class="discussion-message-bubble-header">
|
4
4
|
<div class="discussion-message-bubble-title">
|
5
|
-
<%=
|
5
|
+
<%= linked_discussion_user_name user %>
|
6
6
|
<% if user.moderator_here? %>
|
7
7
|
<span class="moderator-badge"><%= t(:moderation) %></span>
|
8
8
|
<% end %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<div class="discussion-message-bubble" id="new-discussion-description-container">
|
16
16
|
<div class="discussion-message-bubble-header">
|
17
17
|
<div class="discussion-message-bubble-title">
|
18
|
-
<%= @discussion.initiator
|
18
|
+
<%= discussion_user_name @discussion.initiator %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<div class="discussion-message-bubble-content">
|
@@ -26,15 +26,15 @@
|
|
26
26
|
<%= label_for_contextualization(@discussion, class: 'd-none d-sm-inline') %> ·
|
27
27
|
<span class="discussion-info">
|
28
28
|
<span class="discussion-initiator-name">
|
29
|
-
<%= @discussion.initiator
|
29
|
+
<%= discussion_user_name @discussion.initiator %>
|
30
30
|
</span>
|
31
|
-
<span
|
31
|
+
<span><%= discussion_info(@discussion) unless @discussion.new_record? %></span>
|
32
32
|
</span>
|
33
33
|
</div>
|
34
34
|
<% if @discussion.last_moderator_access_visible_for?(current_user) %>
|
35
35
|
<h5 class="my-2 me-3">
|
36
36
|
<span class="badge bg-primary text-wrap">
|
37
|
-
<%= t :last_seen, name: @discussion.last_moderator_access_by
|
37
|
+
<%= t :last_seen, name: discussion_user_name(@discussion.last_moderator_access_by) %>
|
38
38
|
<%= t :time_since, time: time_ago_in_words(@discussion.last_moderator_access_at) %>
|
39
39
|
</span>
|
40
40
|
</h5>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="row">
|
6
6
|
<%= render partial: 'layouts/user_menu' %>
|
7
7
|
|
8
|
-
<div class="col-md-9">
|
8
|
+
<div class="col-md-9 mu-tab-body">
|
9
9
|
<div class="mu-user-header">
|
10
10
|
<h1><%= t(:activity) %></h1>
|
11
11
|
</div>
|
@@ -17,11 +17,13 @@
|
|
17
17
|
stats: exercises_activity_stats
|
18
18
|
} %>
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
<% if Organization.current.forum_enabled? %>
|
21
|
+
<%= render partial: 'activity_indicator',
|
22
|
+
locals: {
|
23
|
+
title: t(:forum),
|
24
|
+
stats: messages_activity_stats
|
25
|
+
} %>
|
26
|
+
<% end %>
|
25
27
|
</div>
|
26
28
|
<div class="col-lg-4 mu-tab-body">
|
27
29
|
<div class="nav nav-pills flex-column">
|
@@ -186,9 +186,6 @@ en:
|
|
186
186
|
male: Male
|
187
187
|
manual_evaluation_pending: Thanks for submitting your solution! It will be revised by the course teachers soon
|
188
188
|
medal: Medal
|
189
|
-
message_count:
|
190
|
-
one: 1 message
|
191
|
-
other: '%{count} messages'
|
192
189
|
message: Message
|
193
190
|
message_deleted: This message was deleted because it %{motive}, which violates the %{forum_terms}.
|
194
191
|
messages: Messages
|
@@ -255,6 +252,9 @@ en:
|
|
255
252
|
progress: Progresss
|
256
253
|
read: Read
|
257
254
|
refresh_or_wait: Please press F5 if results are not displayed after a few seconds
|
255
|
+
reply_count:
|
256
|
+
one: 1 reply
|
257
|
+
other: '%{count} replies'
|
258
258
|
requires_attention: Requires attention
|
259
259
|
reset_query: Clear current search filters
|
260
260
|
responses_count_asc: By less validated replies
|
@@ -186,9 +186,6 @@ es-CL:
|
|
186
186
|
male: Hombre
|
187
187
|
manual_evaluation_pending: ¡Gracias por enviar tu solución! Tus docentes la corregirán pronto
|
188
188
|
medal: Medalla
|
189
|
-
message_count:
|
190
|
-
one: 1 mensaje
|
191
|
-
other: '%{count} mensajes'
|
192
189
|
message: Mensaje
|
193
190
|
message_deleted: Este mensaje fue eliminado porque %{motive}, lo cual infringe las %{forum_terms}.
|
194
191
|
messages: Mensajes
|
@@ -262,6 +259,9 @@ es-CL:
|
|
262
259
|
read: Leído
|
263
260
|
read_messages: Ver mensajes
|
264
261
|
refresh_or_wait: Si no se muestra automáticamente en unos segundos, presiona F5
|
262
|
+
reply_count:
|
263
|
+
one: 1 respuesta
|
264
|
+
other: '%{count} respuestas'
|
265
265
|
reset_query: Borrar los filtros de búsqueda actuales
|
266
266
|
restart: Reiniciar
|
267
267
|
results_hidden: ¡Tu solución fue enviada con éxito!
|
@@ -197,9 +197,6 @@ es:
|
|
197
197
|
male: Hombre
|
198
198
|
manual_evaluation_pending: ¡Gracias por enviar tu solución! Tus docentes la corregirán pronto
|
199
199
|
medal: Medalla
|
200
|
-
message_count:
|
201
|
-
one: 1 mensaje
|
202
|
-
other: '%{count} mensajes'
|
203
200
|
message: Mensaje
|
204
201
|
message_deleted: Este mensaje fue eliminado porque %{motive}, lo cual infringe las %{forum_terms}.
|
205
202
|
messages: Mensajes
|
@@ -274,6 +271,9 @@ es:
|
|
274
271
|
read: Leido
|
275
272
|
read_messages: Ver mensajes
|
276
273
|
refresh_or_wait: Si no se muestra automáticamente en unos segundos, presioná F5
|
274
|
+
reply_count:
|
275
|
+
one: 1 respuesta
|
276
|
+
other: '%{count} respuestas'
|
277
277
|
requires_attention: Requiere atención
|
278
278
|
reset_query: Borrar los filtros de búsqueda actuales
|
279
279
|
responses_count_asc: Con menos respuestas validadas
|
@@ -190,9 +190,6 @@ pt:
|
|
190
190
|
male: Masculino
|
191
191
|
manual_evaluation_pending: Obrigado por enviar sua solução! Seus professores irão corrigi-lo em breve
|
192
192
|
medal: Medalha
|
193
|
-
message_count:
|
194
|
-
one: 1 mensagem
|
195
|
-
other: '%{count} mensagens'
|
196
193
|
message: Mensagem
|
197
194
|
message_deleted: Esta mensagem foi excluída porque %{motive}, o que viola as %{forum_terms}.
|
198
195
|
messages: Mensagens
|
@@ -265,6 +262,9 @@ pt:
|
|
265
262
|
read: Ler
|
266
263
|
read_messages: Ver mensagens
|
267
264
|
refresh_or_wait: Se não mostrar automaticamente em alguns segundos, pressione F5
|
265
|
+
reply_count:
|
266
|
+
one: 1 resposta
|
267
|
+
other: '%{count} respostas'
|
268
268
|
requires_attention: Requer atenção
|
269
269
|
reset_query: Limpar filtros de pesquisa atuais
|
270
270
|
restart: Reiniciar
|
@@ -2,6 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
feature 'User Activity Flow', organization_workspace: :test do
|
4
4
|
let(:user) { create(:user) }
|
5
|
+
let(:organization) { Organization.locate!('test') }
|
6
|
+
|
5
7
|
before { set_current_user!(user) }
|
6
8
|
|
7
9
|
let(:fake_stats) { double('stats') }
|
@@ -30,21 +32,39 @@ feature 'User Activity Flow', organization_workspace: :test do
|
|
30
32
|
expect(page).to have_text('solved')
|
31
33
|
end
|
32
34
|
|
33
|
-
scenario 'displays messages count' do
|
34
|
-
expect(page).to have_text('12')
|
35
|
-
expect(page).to have_text('messages')
|
36
|
-
end
|
37
|
-
|
38
|
-
scenario 'displays validated messages count' do
|
39
|
-
expect(page).to have_text('6')
|
40
|
-
expect(page).to have_text('validated')
|
41
|
-
end
|
42
|
-
|
43
35
|
scenario 'displays recent weeks' do
|
44
36
|
expect(page).to have_text 'Week of 2020-10-12'
|
45
37
|
expect(page).to have_text 'Week of 2020-10-05'
|
46
38
|
expect(page).to have_text 'Week of 2020-09-28'
|
47
39
|
end
|
40
|
+
|
41
|
+
context 'on organization with no forum' do
|
42
|
+
scenario 'does not display messages count' do
|
43
|
+
expect(page).to_not have_text('messages')
|
44
|
+
end
|
45
|
+
|
46
|
+
scenario 'does not display validated messages count' do
|
47
|
+
expect(page).to_not have_text('validated')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
context 'on organization with forum' do
|
52
|
+
before do
|
53
|
+
organization.update! forum_enabled: true
|
54
|
+
visit activity_user_path
|
55
|
+
end
|
56
|
+
|
57
|
+
scenario 'displays messages count' do
|
58
|
+
expect(page).to have_text('12')
|
59
|
+
expect(page).to have_text('messages')
|
60
|
+
end
|
61
|
+
|
62
|
+
scenario 'displays validated messages count' do
|
63
|
+
expect(page).to have_text('6')
|
64
|
+
expect(page).to have_text('validated')
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
48
68
|
end
|
49
69
|
|
50
70
|
context 'selecting a specific week' do
|
@@ -131,5 +131,27 @@ describe WithStudentPathNavigation, organization_workspace: :test do
|
|
131
131
|
it { expect { next_button(exercise) }.to_not raise_error }
|
132
132
|
it { expect(next_button(exercise)).to be_nil }
|
133
133
|
end
|
134
|
+
|
135
|
+
context "when there are manual_evaluation exercises" do
|
136
|
+
let(:book) { create :book, topics: [topic] }
|
137
|
+
let(:topic) { create :topic, lessons: [lesson_1, lesson_2] }
|
138
|
+
let(:lesson_1) { create :lesson, exercises: [create(:exercise, manual_evaluation: true)] }
|
139
|
+
let(:lesson_2) { create :lesson, exercises: [regular_exercise] }
|
140
|
+
let(:regular_exercise) { create :exercise }
|
141
|
+
|
142
|
+
before { organization.switch!.reindex_usages! }
|
143
|
+
|
144
|
+
context 'on organization with prevent_manual_evaluation_content' do
|
145
|
+
let(:organization) { create :organization, prevent_manual_evaluation_content: true, book: book }
|
146
|
+
|
147
|
+
it { expect(next_button(lesson_2)).to be_nil }
|
148
|
+
end
|
149
|
+
|
150
|
+
context 'on organization without prevent_manual_evaluation_content' do
|
151
|
+
let(:organization) { create :organization, book: book }
|
152
|
+
|
153
|
+
it { expect(next_button(lesson_2)).to eq "<a class=\"btn btn-warning w-100\" role=\"button\" href=\"/lessons/#{lesson_1.friendly_name}\"><span class=\"fa5-text-r\">Next pending: #{lesson_1.name}</span><i class=\"fas fa-chevron-right\"></i></a>" }
|
154
|
+
end
|
155
|
+
end
|
134
156
|
end
|
135
157
|
end
|
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: 9.3.
|
4
|
+
version: 9.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 9.
|
33
|
+
version: 9.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 9.
|
40
|
+
version: 9.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mumukit-bridge
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -939,7 +939,7 @@ homepage: https://mumuki.io
|
|
939
939
|
licenses:
|
940
940
|
- AGPL-3.0
|
941
941
|
metadata: {}
|
942
|
-
post_install_message:
|
942
|
+
post_install_message:
|
943
943
|
rdoc_options: []
|
944
944
|
require_paths:
|
945
945
|
- lib
|
@@ -955,7 +955,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
955
955
|
version: '0'
|
956
956
|
requirements: []
|
957
957
|
rubygems_version: 3.1.2
|
958
|
-
signing_key:
|
958
|
+
signing_key:
|
959
959
|
specification_version: 4
|
960
960
|
summary: Code assement web application for the Mumuki Platform.
|
961
961
|
test_files:
|