Say you're on Question 1. You provide an answer and click Next. But you click it twice very quickly without waiting for the next pageload. Your first click stores the answer and updates your session so that you're now on Question 2. However, the second press causes the same POST request again, with the same answer intended for Question 1. Since the session is now at Question 2, Question 1's answer gets stored for both of them. The more times you click Next without waiting for the next pageload, the more questions get blasted away with Question 1's answer.

We originally found this in Quiz 3, but I've just confirmed that it's still happening in Quiz 4 rc6. It gets to be a problem when you allow backwards navigation, because people go back to double-check their answers and then click Next many times quickly, thinking it'll move them forward faster.

I've created an incomplete patch for Quiz 3 that adds a question_nid field to the form for multichoice questions (the only question type we're using) and compares the value of that field against the current question nid according to the session. If there is a mismatch, it does a drupal_goto() to node/<quiz_nid> and no further action is taken.

Comments

darktygur-1’s picture

By the way, I can post my incomplete patch if anyone's interested.

falcon’s picture

Status: Active » Fixed

Thanks for reporting!

Quick fix has been added. It works along the lines you suggested. (The fix is included in RC7 which should be available in a few minutes)

(A better fix would be to make Quiz follow drupals FAPI when answers are being submitted)

Status: Fixed » Closed (fixed)

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