AS shown in the image below, when the next button is clicked, the next question appears without reloading the page - as expected with ajax. However, this causes the time-left row to double. The more the next button is clicked, the more the row increases.

enabled modules:
Quiz 7.x-5.1
Jquery countdown 7.x-1.1

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adigunsherif created an issue. See original summary.

djdevin’s picture

Version: 7.x-5.1 » 7.x-5.x-dev
Status: Active » Needs review
FileSize
2.32 KB

Here is a patch. This moves the Quiz countdown div out of the area that is replaced by AHAH, so it will not duplicate on each question take.

adigunsherif’s picture

Perfect! Patch #2 works. Thank you. No more duplicate.

djdevin’s picture

Status: Needs review » Fixed

Great, thanks for reporting. Fixed!

  • djdevin committed 24d5c4c on 7.x-5.x
    Issue #2867169 by djdevin, adigunsherif: Ajax Quiz causes multiple...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joenan’s picture

Please how did you fix yours? I checked the patch file but it didnt work for me. Can you please help me and upload the already complete quiz.module file you have patched? Sorry to ask for this. I am new to drupal and hooked up with multiple display of timer after clicking next or previous button

joenan’s picture

The patch didn't work for me, but I was able to resolve the issue by commenting on this code inside this function in quiz.theme.inc as shown below.

function theme_quiz_progress($variables) {
//$output .= '<div id="quiz-progress">';
}
djdevin’s picture

Hi,

You can either apply the patch, or you can update to Quiz 7.x-5.x-dev which will contain the fix.

joenan’s picture

Ok. thanks the problem has now been solved.