mumuki-laboratory 9.8.2 → 9.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/mumuki_laboratory/application/messages.js +1 -30
  3. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_editor.scss +3 -0
  4. data/app/controllers/messages_controller.rb +2 -5
  5. data/app/helpers/application_helper.rb +4 -0
  6. data/app/helpers/exam_registration_helper.rb +0 -4
  7. data/app/helpers/messages_helper.rb +4 -8
  8. data/app/helpers/profile_helper.rb +4 -0
  9. data/app/views/layouts/_copyright.html.erb +1 -1
  10. data/app/views/layouts/_messages.html.erb +1 -7
  11. data/app/views/layouts/exercise_inputs/forms/_interactive_form.html.erb +1 -1
  12. data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +1 -1
  13. data/app/views/user_mailer/1st_reminder.html.erb +1 -1
  14. data/app/views/user_mailer/1st_reminder.text.erb +1 -1
  15. data/app/views/user_mailer/2nd_reminder.html.erb +1 -1
  16. data/app/views/user_mailer/2nd_reminder.text.erb +1 -1
  17. data/app/views/user_mailer/3rd_reminder.html.erb +1 -1
  18. data/app/views/user_mailer/3rd_reminder.text.erb +1 -1
  19. data/app/views/user_mailer/certificate.html.erb +1 -1
  20. data/app/views/user_mailer/certificate.text.erb +1 -1
  21. data/app/views/user_mailer/no_submissions_reminder.html.erb +1 -1
  22. data/app/views/user_mailer/no_submissions_reminder.text.erb +1 -1
  23. data/app/views/users/_basic_profile_fields.html.erb +30 -0
  24. data/app/views/users/_profile_fields.html.erb +1 -20
  25. data/app/views/users/messages.html.erb +1 -1
  26. data/config/routes.rb +0 -1
  27. data/lib/mumuki/laboratory/locales/en.yml +2 -2
  28. data/lib/mumuki/laboratory/locales/es-CL.yml +2 -2
  29. data/lib/mumuki/laboratory/locales/es.yml +2 -2
  30. data/lib/mumuki/laboratory/locales/pt.yml +2 -2
  31. data/lib/mumuki/laboratory/version.rb +1 -1
  32. data/spec/controllers/organizations_api_controller_spec.rb +6 -1
  33. data/spec/controllers/students_api_controller_spec.rb +1 -1
  34. data/spec/dummy/db/schema.rb +3 -1
  35. data/spec/features/not_found_public_flow_spec.rb +1 -1
  36. data/spec/features/profile_flow_spec.rb +1 -1
  37. metadata +7 -7
  38. data/app/views/messages/errors.html.erb +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab01a709d13fa43fb20ead7bb17a0f8d217ed1fb864423dd2af54ea197109c44
4
- data.tar.gz: 0f88578a615139a0ac93ca07c2ffa2f8580b5f6c99c900dacef03d34ba62d6e1
3
+ metadata.gz: 49d2ca01f9b5f0c006b68ae6a0587ee4231db269c9d6bb4dd3a5a77833757c7f
4
+ data.tar.gz: '0093396f29a33c579c63d5f227df36772f9aaee6867603f77a6d878f7eeb277d'
5
5
  SHA512:
6
- metadata.gz: 438fef387af073a4423ade676a7739933ca090f5319a1d71098c41443c8c928094bcec9b98205ce7e1b43b9295f9270c131a86de553e0eabadb6b7ec63b51c49
7
- data.tar.gz: 5172fa138e0b5acd092e7e99cb1475abe8c07de26c1024d305805104c848a71168fe4a1dec9cc1efc44c51d7c7b2a7a5d37a5cc79cf9264ca165ef76fd38d195
6
+ metadata.gz: 4e03ec14d6309220ef8bac5fc19691a4659f6612936831c17601338ce10a309b896c2c352424e8f063514cf95f7c7edde0de225b0d387b8cf1452c2dc6b46986
7
+ data.tar.gz: 4fe91de131798c91a7db006e4e89f6601c46c7bf61490c211f3090921ccdf08243695980c24a6ac720487d8d627a668c072ee051d5dfeb4c55815410f0badc70
@@ -19,6 +19,7 @@ mumuki.load(() => {
19
19
  $('.pending-messages-filter').removeClass('pending-messages-filter');
20
20
  $('button.btn-submit').removeClass('disabled');
21
21
  $('.pending-messages-text').remove();
22
+ $("a[data-bs-target='#messages']")[0].click();
22
23
  },
23
24
  readMessages: function (url) {
24
25
  Chat.tokenRequest({
@@ -47,35 +48,6 @@ mumuki.load(() => {
47
48
  setMessagesInterval: function () {
48
49
  mumuki.setInterval(Chat.getMessages, 60000);
49
50
  },
50
- submitMessagesForm: function (url, readUrl, errorUrl) {
51
- var $container = $('.mu-view-messages');
52
-
53
- function renderHTML(data) {
54
- $container.empty();
55
- $container.html(data);
56
- $("a[data-bs-target='#messages']").click();
57
- }
58
-
59
- function success(data) {
60
- renderHTML(data);
61
- Chat.readMessages(readUrl);
62
- }
63
-
64
- function error(_xhr) {
65
- Chat.tokenRequest({
66
- url: errorUrl,
67
- success: renderHTML,
68
- xhrFields: {withCredentials: true}
69
- });
70
- }
71
-
72
- $.ajax({
73
- url: url,
74
- success: success,
75
- error: error,
76
- xhrFields: {withCredentials: true}
77
- });
78
- },
79
51
  openNewMessageModal: function () {
80
52
  Chat.$newMessageModal().modal({backdrop: false, keyboard: false});
81
53
  Chat.$body().addClass("new-message-modal-open");
@@ -90,4 +62,3 @@ mumuki.load(() => {
90
62
  mumuki.Chat = Chat;
91
63
 
92
64
  });
93
-
@@ -115,3 +115,6 @@ body.fullscreen {
115
115
  }
116
116
  }
117
117
 
118
+ .pending-messages-text {
119
+ top: auto;
120
+ }
@@ -2,7 +2,8 @@ class MessagesController < AjaxController
2
2
  before_action :set_exercise!, only: [:create, :read_messages]
3
3
 
4
4
  def index
5
- render json: {has_messages: has_messages?, messages_count: messages_count}
5
+ pending_messages = current_user.unread_messages
6
+ render json: {has_messages: pending_messages.present?, messages_count: pending_messages.count}
6
7
  end
7
8
 
8
9
  def read_messages
@@ -15,10 +16,6 @@ class MessagesController < AjaxController
15
16
  redirect_to @exercise
16
17
  end
17
18
 
18
- def errors
19
- render 'messages/errors', layout: false
20
- end
21
-
22
19
  private
23
20
 
24
21
  def set_exercise!
@@ -48,4 +48,8 @@ module ApplicationHelper
48
48
  def notification_preview_for(target)
49
49
  render "notifications/#{target.class.name.underscore}", { target: target }
50
50
  end
51
+
52
+ def current_time_zone_html
53
+ %Q{(<span class="select-date-timezone">#{Organization.current.time_zone}</span>)}.html_safe
54
+ end
51
55
  end
@@ -6,8 +6,4 @@ module ExamRegistrationHelper
6
6
  { icon: :info_circle, class: :info, t: :exam_registration_explanation_html }
7
7
  end
8
8
  end
9
-
10
- def current_time_zone_html
11
- %Q{(<span class="select-date-timezone">#{Organization.current&.time_zone}</span>)}.html_safe
12
- end
13
9
  end
@@ -1,8 +1,4 @@
1
1
  module MessagesHelper
2
- def messages_url(exercise)
3
- exercise.messages_url_for(current_user) if current_user?
4
- end
5
-
6
2
  def hidden_pending(assignment)
7
3
  assignment.pending_messages? ? '' : 'd-none'
8
4
  end
@@ -15,11 +11,11 @@ module MessagesHelper
15
11
  'pending-messages-filter' if assignment.pending_messages?
16
12
  end
17
13
 
18
- def read_messages_caption(assignment)
19
- assignment.pending_messages? ? :read_messages : :exit
20
- end
21
-
22
14
  def sender_class(message)
23
15
  message.blank? || message.from_user?(current_user) ? 'self' : 'other'
24
16
  end
17
+
18
+ def staleness_class(message)
19
+ 'mu-stale' if message.stale?
20
+ end
25
21
  end
@@ -10,4 +10,8 @@ module ProfileHelper
10
10
  def save_edit_profile_button(form)
11
11
  form.submit t(:save), class: 'btn btn-complementary mu-edit-profile-btn'
12
12
  end
13
+
14
+ def show_verified_full_name_notice?(user, organization)
15
+ user.has_verified_full_name? && organization.private?
16
+ end
13
17
  end
@@ -1,2 +1,2 @@
1
- &copy; 2015-<%= DateTime.now.year %>
1
+ &copy; 2015-<%= Time.current.year %>
2
2
  <a href="http://mumuki.org/" class="mu-org-link"><span class="da da-mumuki-circle"></span> Mumuki</a>
@@ -1,14 +1,8 @@
1
1
  <div class="mu-view-messages">
2
2
  <div class="mu-messages">
3
3
  <ol class="mu-chat">
4
- <li>
5
- <a href="javascript:{}"
6
- onclick="mumuki.Chat.submitMessagesForm('<%= messages_url(@exercise) %>', '<%= read_messages_path(@exercise) %>', '<%= messages_errors_path %>')">
7
- <%= t :more_messages %>
8
- </a>
9
- </li>
10
4
  <% messages.each do |message| %>
11
- <li class="<%= sender_class(message) %>">
5
+ <li class="<%= sender_class(message) %> <%= staleness_class(message) %>">
12
6
  <div class="message">
13
7
  <p> <%= message.content_html %></p>
14
8
  <div class="sender"><%= message.sender unless message.sender == current_user_uid %></div>
@@ -15,7 +15,7 @@
15
15
  <% if @assignment.pending_messages? %>
16
16
  <span class="pending-messages-text"> <%= t :pending_messages_explanation %>
17
17
  <a href="javascript:{}"
18
- onclick="mumuki.Chat.submitMessagesForm('<%= messages_url(exercise) %>', '<%= read_messages_path(exercise) %>')"
18
+ onclick="mumuki.Chat.readMessages('<%= read_messages_path(exercise) %>')"
19
19
  class="<%= hidden_pending(@assignment) %>"
20
20
  data-waiting="<%= t(:sending_solution) %>">
21
21
  <%= t :get_messages %>
@@ -23,7 +23,7 @@
23
23
  <% if @assignment.pending_messages? %>
24
24
  <span class="pending-messages-text"> <%= t :pending_messages_explanation %>
25
25
  <a href="javascript:{}"
26
- onclick="mumuki.Chat.submitMessagesForm('<%= messages_url(exercise) %>', '<%= read_messages_path(exercise) %>')"
26
+ onclick="mumuki.Chat.readMessages('<%= read_messages_path(exercise) %>')"
27
27
  class="<%= hidden_pending(@assignment) %>"
28
28
  data-waiting="<%= t(:sending_solution) %>">
29
29
  <%= t :get_messages %>
@@ -313,7 +313,7 @@
313
313
 
314
314
  <td valign="top" class="muMailTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;">
315
315
 
316
- © Copyright 2015-<%= DateTime.now.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
316
+ © Copyright 2015-<%= Time.current.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
317
317
  <br>
318
318
  <%= t :stop_emails? %><br>
319
319
  <%= link_to t(:cancel_subscription), @organization.url_for("/user/unsubscribe?id=#{@unsubscribe_code}"), target: :_blank %>
@@ -7,7 +7,7 @@
7
7
  <%= t :keep_learning %>
8
8
 
9
9
 
10
- © Copyright 2015-<%= DateTime.now.year %> Mumuki.
10
+ © Copyright 2015-<%= Time.current.year %> Mumuki.
11
11
 
12
12
  <%= t :stop_emails? %>
13
13
  <%= t :cancel_subscription %>
@@ -313,7 +313,7 @@
313
313
 
314
314
  <td valign="top" class="muMailTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;">
315
315
 
316
- © Copyright 2015-<%= DateTime.now.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
316
+ © Copyright 2015-<%= Time.current.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
317
317
  <br>
318
318
  <%= t :stop_emails? %><br>
319
319
  <%= link_to t(:cancel_subscription), @organization.url_for("/user/unsubscribe?id=#{@unsubscribe_code}"), target: :_blank %>
@@ -7,7 +7,7 @@
7
7
  <%= t :keep_learning %>
8
8
 
9
9
 
10
- © Copyright 2015-<%= DateTime.now.year %> Mumuki.
10
+ © Copyright 2015-<%= Time.current.year %> Mumuki.
11
11
 
12
12
  <%= t :stop_emails? %>
13
13
  <%= t :cancel_subscription %>
@@ -313,7 +313,7 @@
313
313
 
314
314
  <td valign="top" class="muMailTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;">
315
315
 
316
- © Copyright 2015-<%= DateTime.now.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
316
+ © Copyright 2015-<%= Time.current.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
317
317
  <br>
318
318
  <%= t :stop_emails? %><br>
319
319
  <%= link_to t(:cancel_subscription), @organization.url_for("/user/unsubscribe?id=#{@unsubscribe_code}"), target: :_blank %>
@@ -7,7 +7,7 @@
7
7
  <%= t :keep_learning %>
8
8
 
9
9
 
10
- © Copyright 2015-<%= DateTime.now.year %> Mumuki.
10
+ © Copyright 2015-<%= Time.current.year %> Mumuki.
11
11
 
12
12
  <%= t :stop_emails? %>
13
13
  <%= t :cancel_subscription %>
@@ -299,7 +299,7 @@
299
299
 
300
300
  <td valign="top" class="muMailTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;">
301
301
 
302
- © Copyright 2015-<%= DateTime.now.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
302
+ © Copyright 2015-<%= Time.current.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
303
303
  <br>
304
304
  <%= t :stop_emails? %><br>
305
305
  <%= link_to t(:cancel_subscription), @organization.url_for("/user/unsubscribe?id=#{@unsubscribe_code}"), target: :_blank %>
@@ -4,7 +4,7 @@
4
4
  <%= t :new_certificate_mailer_p2 %>
5
5
 
6
6
 
7
- © Copyright 2015-<%= DateTime.now.year %> Mumuki.
7
+ © Copyright 2015-<%= Time.current.year %> Mumuki.
8
8
 
9
9
  <%= t :stop_emails? %>
10
10
  <%= t :cancel_subscription %>
@@ -313,7 +313,7 @@
313
313
 
314
314
  <td valign="top" class="muMailTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;">
315
315
 
316
- © Copyright 2015-<%= DateTime.now.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
316
+ © Copyright 2015-<%= Time.current.year %>&nbsp;<a href="https://mumuki.org/home/">Mumuki</a><em>.</em><br>
317
317
  <br>
318
318
  <%= t :stop_emails? %><br>
319
319
  <%= link_to t(:cancel_subscription), @organization.url_for("/user/unsubscribe?id=#{@unsubscribe_code}"), target: :_blank %>
@@ -7,7 +7,7 @@
7
7
  <%= t :keep_learning %>
8
8
 
9
9
 
10
- © Copyright 2015-<%= DateTime.now.year %> Mumuki.
10
+ © Copyright 2015-<%= Time.current.year %> Mumuki.
11
11
 
12
12
  <%= t :stop_emails? %>
13
13
  <%= t :cancel_subscription %>
@@ -0,0 +1,30 @@
1
+ <fieldset>
2
+ <div><%= form.label(t :first_name) %></div>
3
+ <div><%= form.text_field :first_name, required: true, class: 'form-control' %></div>
4
+ </fieldset>
5
+ <fieldset>
6
+ <div><%= form.label(t :last_name) %></div>
7
+ <div><%= form.text_field :last_name, required: true, class: 'form-control' %></div>
8
+ </fieldset>
9
+ <fieldset>
10
+ <div><%= form.label(t :gender) %></div>
11
+ <div><%= form.select :gender, options_for_select(User.genders.map { |gender, _| [t(gender), gender] }, @user.gender), {}, required: true, class: 'form-control form-select' %></div>
12
+ </fieldset>
13
+ <fieldset>
14
+ <div><%= form.label(t :birthdate) %></div>
15
+ <div><%= form.date_field :birthdate, min: Date.new(1900), max: 3.years.ago.end_of_year, required: true, class: 'form-control' %></div>
16
+ </fieldset>
17
+ <fieldset>
18
+ <div><%= form.label(t :email) %></div>
19
+ <div><%= form.text_field :email, readonly: true, class: 'form-control' %></div>
20
+ </fieldset>
21
+
22
+ <% if show_verified_full_name_notice?(@user, Organization.current) %>
23
+ <label><%= (t :verified_full_name) %></label>
24
+ <input class="form-control" readonly="readonly" value="<%= @user.verified_full_name %>">
25
+ <p class="fs-7">
26
+ <%= fa_icon("question-circle", text: (t :verified_full_name_notice,
27
+ organization: Organization.current.display_name,
28
+ contact: Organization.current.contact_email)) %>
29
+ </p>
30
+ <% end %>
@@ -1,20 +1 @@
1
- <fieldset>
2
- <div><%= form.label(t :first_name) %></div>
3
- <div><%= form.text_field :first_name, required: true, class: 'form-control' %></div>
4
- </fieldset>
5
- <fieldset>
6
- <div><%= form.label(t :last_name) %></div>
7
- <div><%= form.text_field :last_name, required: true, class: 'form-control' %></div>
8
- </fieldset>
9
- <fieldset>
10
- <div><%= form.label(t :gender) %></div>
11
- <div><%= form.select :gender, options_for_select(User.genders.map { |gender, _| [t(gender), gender] }, @user.gender), {}, required: true, class: 'form-control form-select' %></div>
12
- </fieldset>
13
- <fieldset>
14
- <div><%= form.label(t :birthdate) %></div>
15
- <div><%= form.date_field :birthdate, min: Date.new(1900), max: 3.years.ago.end_of_year, required: true, class: 'form-control' %></div>
16
- </fieldset>
17
- <fieldset>
18
- <div><%= form.label(t :email) %></div>
19
- <div><%= form.text_field :email, readonly: true, class: 'form-control' %></div>
20
- </fieldset>
1
+ <%= render partial: 'users/basic_profile_fields', locals: {form: form} %>
@@ -16,7 +16,7 @@
16
16
  <% else %>
17
17
  <table class="table table-striped">
18
18
  <% @messages.each do |message| %>
19
- <tr>
19
+ <tr class="<%= staleness_class(message) %>" >
20
20
  <td><%= icon_for_read(message.read?) %></td>
21
21
  <td><%= link_to message.exercise.name, exercise_path(message.exercise.id) %></td>
22
22
  <td><%= mail_to message.sender %></td>
data/config/routes.rb CHANGED
@@ -77,7 +77,6 @@ Rails.application.routes.draw do
77
77
  resources :faqs, only: [:index]
78
78
 
79
79
  resources :messages, only: [:index, :create]
80
- get '/messages/errors' => 'messages#errors'
81
80
 
82
81
  get 'certificates/verify/:code', to: 'certificates#verify', as: :verify_certificate
83
82
  get 'certificates/download/:code', to: 'certificates#download', as: :download_certificate
@@ -189,7 +189,6 @@ en:
189
189
  message: Message
190
190
  message_deleted: This message was deleted because it %{motive}, which violates the %{forum_terms}.
191
191
  messages: Messages
192
- messages_error: Previous messages are unavailable. Please try again later.
193
192
  messages_pluralized:
194
193
  one: Message
195
194
  other: Messages
@@ -204,7 +203,6 @@ en:
204
203
  you_are: You're taking care of it
205
204
  you_will_confirmation: You'll take care of this discussion. If you change your mind, click the button again.
206
205
  you_wont_confirmation: You won't take care of this discussion.
207
- more_messages: More
208
206
  my_account: My account
209
207
  my_doubts: My doubts
210
208
  my_profile: My profile
@@ -346,6 +344,8 @@ en:
346
344
  user: User
347
345
  user_data_updated: Your data was updated successfully
348
346
  username: Username
347
+ verified_full_name: Verified name
348
+ verified_full_name_notice: Your verified name was provided by %{organization}. If there's a mistake, please send an email to %{contact}.
349
349
  view_details: View details
350
350
  want_permissions: The following user requires permissions for the organization
351
351
  we_miss_you: We miss you!
@@ -190,7 +190,6 @@ es-CL:
190
190
  message: Mensaje
191
191
  message_deleted: Este mensaje fue eliminado porque %{motive}, lo cual infringe las %{forum_terms}.
192
192
  messages: Mensajes
193
- messages_error: Los mensajes anteriores no están disponibles en este momento. ¡Vuelve a intentar más tarde!
194
193
  messages_pluralized:
195
194
  one: Mensaje
196
195
  other: Mensajes
@@ -207,7 +206,6 @@ es-CL:
207
206
  you_are: Te estás ocupando
208
207
  you_will_confirmation: Te vas a ocupar de esta consulta. Si cambias de parecer, toca nuevamente el botón.
209
208
  you_wont_confirmation: No te vas a ocupar de esta consulta.
210
- more_messages: Ver mensajes anteriores
211
209
  my_account: Mi cuenta
212
210
  my_doubts: Mis consultas
213
211
  my_profile: Mi perfil
@@ -358,6 +356,8 @@ es-CL:
358
356
  user_data_updated: Tus datos se actualizaron correctamente
359
357
  user: Usuario
360
358
  username: Nombre de usuario
359
+ verified_full_name: Nombre verificado
360
+ verified_full_name_notice: Tu nombre verificado fue provisto por %{organization}. Si hay algún error, por favor escribe a %{contact}.
361
361
  view_details: Ver detalles
362
362
  want_permissions: El siguiente usuario requiere permisos para la organización
363
363
  we_miss_you: ¡Te extrañamos!
@@ -200,7 +200,6 @@ es:
200
200
  message: Mensaje
201
201
  message_deleted: Este mensaje fue eliminado porque %{motive}, lo cual infringe las %{forum_terms}.
202
202
  messages: Mensajes
203
- messages_error: Los mensajes anteriores no están disponibles en este momento. ¡Volvé a intentar mas tarde!
204
203
  messages_pluralized:
205
204
  one: Mensaje
206
205
  other: Mensajes
@@ -217,7 +216,6 @@ es:
217
216
  you_are: Te estás ocupando
218
217
  you_will_confirmation: Te vas a ocupar de esta consulta. Si cambiás de parecer, tocá nuevamente el botón.
219
218
  you_wont_confirmation: No te vas a ocupar de esta consulta.
220
- more_messages: Ver mensajes anteriores
221
219
  my_account: Mi cuenta
222
220
  my_doubts: Mis consultas
223
221
  my_profile: Mi perfil
@@ -373,6 +371,8 @@ es:
373
371
  user_data_updated: Tus datos se actualizaron correctamente
374
372
  user: Usuario
375
373
  username: Nombre de usuario
374
+ verified_full_name: Nombre verificado
375
+ verified_full_name_notice: Tu nombre verificado fue provisto por %{organization}. Si hay algún error, por favor escribí a %{contact}.
376
376
  view_details: Ver detalles
377
377
  want_permissions: El siguiente usuario requiere permisos para la organización
378
378
  we_miss_you: ¡Te extrañamos!
@@ -193,7 +193,6 @@ pt:
193
193
  message: Mensagem
194
194
  message_deleted: Esta mensagem foi excluída porque %{motive}, o que viola as %{forum_terms}.
195
195
  messages: Mensagens
196
- messages_error: As mensagens acima não estão disponíveis no momento. Eu tentei novamente mais tarde!
197
196
  mais tarde!
198
197
  messages_pluralized:
199
198
  one: Mensagem
@@ -211,7 +210,6 @@ pt:
211
210
  you_are: Você está cuidando
212
211
  you_will_confirmation: Você vai cuidar dessa consulta. Se mudar de ideia, clique no botão novamente.
213
212
  you_wont_confirmation: Você não vai cuidar dessa consulta.
214
- more_messages: Ver as mensagens anteriores
215
213
  my_account: Minha conta
216
214
  my_doubts: Minhas duvidas
217
215
  my_profile: Meu perfil
@@ -355,6 +353,8 @@ pt:
355
353
  user: Usuário
356
354
  user_data_updated: Os seus dados foram atualizados corretamente
357
355
  username: Nome de usuário
356
+ verified_full_name: Nome verificado
357
+ verified_full_name_notice: Seu nome verificado foi fornecido por %{organization}. Se houver algum erro, escreva um e-mail para %{contact}.
358
358
  view_details: Ver detalhes
359
359
  want_permissions: O próximo usuário requer permissões para a organização
360
360
  week_of: Semana de %{date}
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Laboratory
3
- VERSION = '9.8.2'
3
+ VERSION = '9.9.0'
4
4
  end
5
5
  end
@@ -107,7 +107,9 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
107
107
  name: 'a-name',
108
108
  public: false,
109
109
  book: book.slug,
110
- locale: 'es'}
110
+ locale: 'es',
111
+ time_zone: 'Buenos Aires'
112
+ }
111
113
  end
112
114
 
113
115
  context 'with the admin permissions' do
@@ -138,6 +140,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
138
140
  description: 'A description',
139
141
  book: book.slug,
140
142
  locale: 'es',
143
+ time_zone: 'Montevideo',
141
144
  public: false,
142
145
  login_methods: %w(facebook github),
143
146
  logo_url: 'http://a-logo-url.com',
@@ -155,6 +158,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
155
158
  it { expect(organization.extension_javascript).to eq "window.a = function() { }" }
156
159
  it { expect(organization.terms_of_service).to eq 'A TOS' }
157
160
  it { expect(organization.faqs).to eq 'some faqs' }
161
+ it { expect(organization.time_zone).to eq 'Montevideo' }
158
162
  end
159
163
 
160
164
  context 'with missing values' do
@@ -166,6 +170,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
166
170
  {
167
171
  errors: {
168
172
  name: ["can't be blank"],
173
+ time_zone: ["can't be blank"],
169
174
  locale: ['is not included in the list']
170
175
  }
171
176
  }
@@ -31,7 +31,7 @@ require 'spec_helper'
31
31
  it { expect(User.last.uid).to eq 'agus@mumuki.org' }
32
32
  it { expect(User.last.email).to eq 'agus@mumuki.org' }
33
33
  it { expect(User.last.gender).to eq 'male' }
34
- it { expect(User.last.birthdate).to eq '2010-08-25'.to_datetime }
34
+ it { expect(User.last.birthdate).to eq '2010-08-25'.in_time_zone }
35
35
  it { expect(User.last.permissions.has_permission? role, 'anorganization/acode').to be true }
36
36
 
37
37
  end
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20210518100153) do
13
+ ActiveRecord::Schema.define(version: 20210707143002) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -384,7 +384,9 @@ ActiveRecord::Schema.define(version: 20210518100153) do
384
384
  t.integer "deletion_motive"
385
385
  t.datetime "deleted_at"
386
386
  t.bigint "deleted_by_id"
387
+ t.bigint "assignment_id"
387
388
  t.index ["approved_by_id"], name: "index_messages_on_approved_by_id"
389
+ t.index ["assignment_id"], name: "index_messages_on_assignment_id"
388
390
  t.index ["deleted_by_id"], name: "index_messages_on_deleted_by_id"
389
391
  end
390
392
 
@@ -6,7 +6,7 @@ feature 'not found public on app' do
6
6
  let!(:some_orga) { create(:public_organization, name: 'someorga', profile: profile) }
7
7
 
8
8
  let(:profile) { Mumuki::Domain::Organization::Profile.parse json }
9
- let(:json) { { contact_email: 'some@email.com', locale: 'en', errors_explanations: { 404 => 'Some explanation'} } }
9
+ let(:json) { { contact_email: 'some@email.com', locale: 'en', time_zone: 'Brasilia', errors_explanations: { 404 => 'Some explanation'} } }
10
10
 
11
11
  scenario 'when route does not exist in explicit central' do
12
12
  set_subdomain_host! 'test'
@@ -71,7 +71,7 @@ feature 'Profile Flow', organization_workspace: :test do
71
71
  before { set_current_user! user }
72
72
 
73
73
  context 'user with uncompleted profile after saving' do
74
- before { user.update! last_name: 'last_name', birthdate: Time.now - 20.years, gender: 'female' }
74
+ before { user.update! last_name: 'last_name', birthdate: 20.years.ago, gender: 'female' }
75
75
 
76
76
  context 'when visiting an exercise' do
77
77
  scenario 'is redirected to previous path' do
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.8.2
4
+ version: 9.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-06 00:00:00.000000000 Z
11
+ date: 2021-07-15 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.8.0
33
+ version: 9.9.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.8.0
40
+ version: 9.9.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mumukit-bridge
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.0'
117
+ version: 3.0.2.2
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3.0'
124
+ version: 3.0.2.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: muvment
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -692,7 +692,6 @@ files:
692
692
  - app/views/layouts/modals/_level_up.html.erb
693
693
  - app/views/layouts/modals/_new_message.html.erb
694
694
  - app/views/lessons/show.html.erb
695
- - app/views/messages/errors.html.erb
696
695
  - app/views/notifications/_discussion.html.erb
697
696
  - app/views/notifications/_dropdown.html.erb
698
697
  - app/views/notifications/_exam_authorization_request.html.erb
@@ -710,6 +709,7 @@ files:
710
709
  - app/views/user_mailer/no_submissions_reminder.text.erb
711
710
  - app/views/users/_activity_indicator.html.erb
712
711
  - app/views/users/_avatar_list.html.erb
712
+ - app/views/users/_basic_profile_fields.html.erb
713
713
  - app/views/users/_edit_user_form.html.erb
714
714
  - app/views/users/_profile_fields.html.erb
715
715
  - app/views/users/_term.html.erb
@@ -1 +0,0 @@
1
- <p> <%= t :messages_error %> </p>