Forum Discussion
- AndrewHanleyCommunity Member
I dont think there is a built-in variable to access this, however, if you put your questions on a seperate Scene, then you can use the Scene.ElapsedTime as a faily accurate timer.
- TsvetyPendeva-8Community Member
Thank you, Andrew - the Quiz is on separate Scene, however I have 3 slides at the beginning which should not be counted towards the Time taken to complete the Quiz. It's a live continuous timer as opposed to a statement value - 2 min. And additionally the timer continues to run even after the Quiz had been completed, even if just the browser is open and you are not interacting with the course.
- NedimRamic-88daCommunity Member
The quiz built-in timer should be visible in the Result slide.
As Andrew pointed out there is no accessible variable to display the quiz time. But with some help of JavaScript and CSS you could probably detach it from its current div and attach it to different div/position, and modify its CSS properties.- TsvetyPendeva-8Community Member
Thank you, Nedim, for your nice suggestion. I may try it when I have more time, just to see if it would work.
However, I just used Java script to count and capture directly into the Results slide the time taken, instead of trying to reposition the SL Player's timer into the slide. It's less time consuming and quite works nicely. Too bad I couldn't make use of the built-in variables - they seem kind of useless to me in their current incarnation....
- AndrewHanleyCommunity Member
Hi Tsvety, I see what you mean.
Could you move the 3 slides at beginning to their own Scene, so its just the questions in your Scene. That means the ElapsedTime should start in the right place.
In order to stop the timer running even after the Quiz. On the very last question, when you are about to move to the Results slide, you could grab the ElapsedTime value, and store it in a new variable. This would then never change no matter how long the user sits on the Results slide, feedback, review, etc.
That might work?