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!

CommentFileSizeAuthor
#2 timer_too_fast-2239499-2.patch1.47 KBultimike
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

priyapr’s picture

Hi,

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

ultimike’s picture

I'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

Status: Needs review » Needs work

The last submitted patch, 2: timer_too_fast-2239499-2.patch, failed testing.

ultimike’s picture

Version: 7.x-4.0-beta2 » 7.x-4.x-dev
Status: Needs work » Needs review

Updated Quiz version for testbot.

-mike

ksiebel’s picture

2: timer_too_fast-2239499-2.patch queued for re-testing.

djdevin’s picture

Status: Needs review » Closed (outdated)

Fixed in 7.x-5.0