Forum Discussion

TsvetyPendeva-8's avatar
TsvetyPendeva-8
Community Member
5 months ago

Time it took for learner to finish the quiz - Anyone knows of a way to capture it in the Results slide?

I have a request to show in the Results slide, beside the Scored Points, the Time it took the learner to finish the quiz. The player already shows the learner during the quiz the time passed, however after it's finished there's no way to see that time again. Do you know of any built-in variable that keeps that record as I couldn't find any. The only one I could see was Scene.ElapsedTime, however I couldn't find any useful use of it. Any thoughts, suggestions?

  • AndrewHanley's avatar
    AndrewHanley
    Community 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-8's avatar
      TsvetyPendeva-8
      Community 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.

  • 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-8's avatar
      TsvetyPendeva-8
      Community 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....

  • AndrewHanley's avatar
    AndrewHanley
    Community 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?