I have installed jQuery Countdown (https://drupal.org/project/jquery_countdown) to enable the countdown timer in the quiz I created. All work fine except one weird thing - when I click on "Next" or "Back" to navigate between questions, the countdown timer would elapse much quicker than real time. For example, the timer is 1:50 and then I go to the next question, then the timer will become 1:42 even though the page refresh time is only 2 seconds.
I have no idea how to solve this question and can't find similar issues online.
An example: http://acecareer.org/quiztest
Hope somebody can help. Thanks in advance!
Comment | File | Size | Author |
---|---|---|---|
#2 | timer_too_fast-2239499-2.patch | 1.47 KB | ultimike |
Comments
Comment #1
priyapr CreditAttribution: priyapr commentedHi,
I also have the same issue. I think the elapsed time is the idle time. It also happens on page refresh/ reload.
Kind Regards
Priya
Comment #2
ultimikeI've encountered the same issue and believe it is caused by the quiz_take_quiz() function being call multiple times between questions.
Rather than trying to figure out the logic behind that, I added a bit of code that checks to make sure the code that sets the timer between questions only runs once. It seems to be working, and I've attached a patch (for the 7.x-4.x branch) so that more people can give it a try and see if this is a reasonable fix.
Thanks,
-mike
Comment #4
ultimikeUpdated Quiz version for testbot.
-mike
Comment #5
ksiebel CreditAttribution: ksiebel commented2: timer_too_fast-2239499-2.patch queued for re-testing.
Comment #6
djdevinFixed in 7.x-5.0