mumuki-laboratory 9.18.1 → 9.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ae29f9665d934e9d1a3ef71a67074980155c36eabd6dc0ee5d66ddcc7c6cea3
4
- data.tar.gz: 5a9158cd4bec4155c1890241f2dab4d87889c87d0b9143d572bc63cc4e925f99
3
+ metadata.gz: 74909716a7b8701adb5f410a2fded18a19779547b107635965361cf2247c7595
4
+ data.tar.gz: ac32359e5add8298400567f10d1d1fcf191db92eeacaa258d33387b6d9433de9
5
5
  SHA512:
6
- metadata.gz: 9cafbd64b3e29e4005bb51c3da4a3e45a7532295a34e4e7727185af580544ca9ff614f0c7b15496f9a043e6dd9c8d3becc82282a9f4deb6cbfec6c3e09fa78ed
7
- data.tar.gz: ecf6beb36af7772043cb3775523373b38db0cdbc58ebe316b9fd4239decf8610c9ea7200b1fc4954be83765a2f71a1d97e75621814c19dcccb5984a1ac4f17ec
6
+ metadata.gz: 33cac73574865ca539d574765c2b85c57da593b11078e92f2c17cd47b51382f33840083458c396893ac3ed0227f068fdfab9e1fc83ab7556186ca901c2c6ba50
7
+ data.tar.gz: dae03d18dfd66681d899d3546bc98aa36b88e1d85947202f032f1a7972c8cc3adb33e4cda12795a46719445530fb1aeff4d2783cae4234836f234f163a45cacf
@@ -1,9 +1,6 @@
1
1
  mumuki.startTimer = (() => {
2
- function startTimer(endDate) {
3
- var endTime = new Date(endDate).getTime();
4
- var currentTime = Date.now();
5
- var diffTime = endTime - currentTime;
6
- var duration = moment.duration(diffTime, 'milliseconds');
2
+ function startTimer(seconds) {
3
+ var duration = moment.duration(seconds, 'seconds');
7
4
  var intervalDuration = 1000;
8
5
 
9
6
  var interval = mumuki.setInterval(function () {
@@ -9,7 +9,7 @@
9
9
  <% @stats = @exercise.stats_for(current_user) %>
10
10
 
11
11
  <% if @exercise.navigable_parent.timed? && !current_user.teacher? %>
12
- <%= render partial: 'layouts/timer', locals: {end_time: @exercise.navigable_parent.real_end_time(current_user)} %>
12
+ <%= render partial: 'layouts/timer', locals: { duration: @exercise.navigable_parent.time_left(current_user) } %>
13
13
  <% end %>
14
14
 
15
15
  <% unless @exercise.input_kids? %>
@@ -3,7 +3,7 @@
3
3
  <%= render partial: 'layouts/authoring', locals: {guide: @guide} %>
4
4
 
5
5
  <% if subject.timed? && @stats.started? && !current_user.teacher? %>
6
- <%= render partial: 'layouts/timer', locals: {end_time: subject.real_end_time(current_user)} %>
6
+ <%= render partial: 'layouts/timer', locals: { duration: subject.time_left(current_user) } %>
7
7
  <% end %>
8
8
 
9
9
  <%= yield if block_given? %>
@@ -4,7 +4,7 @@
4
4
  <i class="timer timer-text text-center"><%= t :time_left %></i>
5
5
  <i id="timer" class="timer timer-text text-center"></i>
6
6
  <script>
7
- mumuki.startTimer('<%= end_time&.iso8601 %>');
7
+ mumuki.startTimer(<%= duration %>);
8
8
  </script>
9
9
  </div>
10
10
  </div>
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Laboratory
3
- VERSION = '9.18.1'
3
+ VERSION = '9.19.0'
4
4
  end
5
5
  end
@@ -470,20 +470,22 @@ feature 'Read Only Flow' do
470
470
 
471
471
  context 'and user is ex student of organization' do
472
472
  before { user.update! permissions: { ex_student: slug } }
473
- scenario 'avatar dorpdown' do
473
+ scenario 'avatar dropdown' do
474
474
  visit "/"
475
475
  find('#profileDropdown').click
476
- expect(page).not_to have_text('My account')
477
- expect(page).not_to have_text('FAQs')
478
- expect(page).not_to have_text('Classroom')
479
- expect(page).not_to have_text('Solve other\'s doubts')
476
+ expect(page).to have_text('My account')
477
+ expect(page).to have_text('FAQs')
480
478
  expect(page).not_to have_text('My doubts')
479
+ expect(page).not_to have_text('Classroom')
481
480
  expect(page).not_to have_text('Bibliotheca')
481
+ expect(page).not_to have_text('Solve other\'s doubts')
482
482
  expect(page).to have_text('Sign Out')
483
483
  end
484
484
  scenario 'show book' do
485
485
  visit "/"
486
- expect(page).to have_text('You are not allowed to see this content')
486
+ expect(page).not_to have_text('Chapter 1')
487
+ expect(page).not_to have_text('Chapter 2')
488
+ expect(page).not_to have_text('Practicing!')
487
489
  end
488
490
  scenario 'show chapter' do
489
491
  visit "/chapters/#{chapter1.id}"
@@ -503,27 +505,23 @@ feature 'Read Only Flow' do
503
505
  end
504
506
  scenario 'show profile' do
505
507
  visit "/user"
506
- expect(page).to have_text('You are not allowed to see this content')
508
+ expect(page).to have_text('My profile')
507
509
  end
508
510
  scenario 'show faqs' do
509
511
  visit "/faqs"
510
- expect(page).to have_text('You are not allowed to see this content')
511
- end
512
- scenario 'show discussion' do
513
- visit "/discussions"
514
- expect(page).to have_text('You are not allowed to see this content')
512
+ expect(page).to have_text('FAQs')
515
513
  end
516
514
  scenario 'show discussion in existent exercise' do
517
515
  visit "/exercises/#{exercise111.id}/discussions/#{discussion111.id}"
518
- expect(page).to have_text('You are not allowed to see this content')
516
+ expect(page).to have_text('Page was not found')
519
517
  end
520
518
  scenario 'show discussion in existent exercise' do
521
519
  visit "/exercises/#{exercise112.id}/discussions/#{discussion112.id}"
522
- expect(page).to have_text('You are not allowed to see this content')
520
+ expect(page).to have_text('Page was not found')
523
521
  end
524
522
  scenario 'new discussion' do
525
523
  visit "/exercises/#{exercise112.id}/discussions/new"
526
- expect(page).to have_text('You are not allowed to see this content')
524
+ expect(page).to have_text('Page was not found')
527
525
  end
528
526
  end
529
527
 
@@ -740,7 +738,7 @@ feature 'Read Only Flow' do
740
738
 
741
739
  context 'and user is ex student of organization' do
742
740
  before { user.update! permissions: { ex_student: slug } }
743
- scenario 'avatar dorpdown' do
741
+ scenario 'avatar dorpdownz' do
744
742
  visit "/"
745
743
  find('#profileDropdown').click
746
744
  expect(page).to have_text('My account')
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.18.1
4
+ version: 9.19.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-10-15 00:00:00.000000000 Z
11
+ date: 2021-10-19 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.18.0
33
+ version: 9.19.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.18.0
40
+ version: 9.19.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mumukit-bridge
43
43
  requirement: !ruby/object:Gem::Requirement