Timer pauses when on different tab

Oct 23, 2020

Hello

I have seen a few discussions on this topic but don't think I've seen a solution - sorry if I have missed it.

I have a timer on one of my files counting up. I want the learner to be able to register their time at the end of the course and compare with others. I've set up a timer that works well enough using variables and a motion path but I've realised that if they switch to another tab on their browser while doing the course, the timer pauses - which obviously isn't great for comparing. The nature of the course means that some learners will probably spend quite a while on other tabs and so I really need a solution to this problem. 

I can ask them to open another browser and use that for looking at other tabs but this seems like a but of clunky work around that I'd rather avoid. Is there a better solution?

Thanks 

6 Replies
Math Notermans

Only workaround i can think of is server-based or time-calculation based. As you cannot force a browser window to stay active and offcourse its no good UX to tell the user to stay in the browser.. your options are limited.

Server based solution:
Find a serverbased solution that starts and stops a timer.
Looks like this one works..

https://albert-gonzalez.github.io/easytimer.js/

Tried it with swapping to another tab and it works...
Gonna make a sample in SL360 to test it...

Math Notermans

Working sample using the easytimer.js...

https://360.articulate.com/review/content/8d2ee323-8e2e-4097-803e-42e28cc19244/review

I add the Storyline360 setup for reuse...

As for reusing functions with JS on every page i use a Weboject that gets specific Javascript files externally... i added my folder with the specific script in a zipped file too...

Kind regards,
Math

Paul Njuguna

Hi Math, so how do I get this idea you put here into each slide of my storyline. I have some 20 questions and each needs a certain amount of time to answer ...which is guided by an overall timer countdown say 20 minutes. Note: Each question must not be set to a limited time, it is whatever time they take anchored to the quickly receding 20minute counter allocated. Thoughts? 

Math Notermans

Use multiple timers i would say... one overall the slides counting down from 20 minutes...
And then set a separate counting up timer for each individual slide...

So in the end you then can block progress as the user exceeds his 20 minutes...
And show them how much time they spent on each question...

Christophe HAMER

Hi heroes,

Wow that sounds great!

Have some kinda similar problem: I want my students to answer a max of 100 randomized questions amongst a 300 questions bank within 13 mn.

The timer is the Storyine built-in solution. But, once launched, the timer stops everytime I change tabs, meaning I can find the answer on the web without any loss of time.

The timer communicates to the LMS. Is it possible to use sthing else that would stop the quiz and wouldn't be stopped everytime I change tabs?

Thx for your help!

Math Notermans

The sample as above will do whats needed. It keeps counting untill you tell it to stop. Change tabs, slidelayers, lightboxes... whatever you do. So that you can set to 13 minutes... and then add whatever you want / need. Communicate whats needed to the LMS. If you share a sample i can help you...