Affects Version/s: 1.6.4
Environment:Moodle 1.6.4, Postgres 8.2.0, PHP 4.3.9.
When we use "Each attempt builds on the last" feature, the 1st and 2nd attempts work nicely, but when the students attempts the quiz for the 3rd time, the questions are no longer the same. We tried this with our production site (Postgres) and test site (Mysql) and the problem seems to affect only Postgres. After some digging I found an old bug (see: http://tracker.moodle.org/browse/MDL-3684) with similar symptoms on Mysql. Could it be that the problem was solved only in the Mysql-spesific code?
Steps to reproduce:
1/ create a new quiz: "Each attempt builds on the last" enabled. Set the quiz so that it lets the student take the quiz e.g. 3 times.
2/ add e.g. 10 questions to quiz
3/ take the quiz: answer some of the questions and submit the answers.
4) take a look at the submitted quiz: the quiz is 100% similar to the quiz you just answered - everything's OK here!
5/ take the quiz again: you see the same set of questions with some of your questions answered - OK! Submit the quiz. The results page is also the same, so everyhting's OK.
6/ now take the quiz for the 3rd time: the questions aren't the same anymore!