-
Bug
-
Resolution: Fixed
-
Major
-
2.0.1, 2.1
-
Centos 5 php 5.2.16
-
MySQL
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
MOODLE_20_STABLE
-
-
When a quiz is created and set to allow more than one attempts if a teacher deletes student attempts other than the most recent the quiz attempts are not reset.
In researching this more I found that the attempts are stored in mdl_data_attempts / attempts column as attempt 1 attempt 2 and so on. For each attempt a new column is written to the database and given an attempt id. When you delete an attempt is deletes the whole row for in the database. The problem is moodle gets the value from the attempt column in the database. So if you allow 8 attempts and delete all attempts accept the most recent when moodle fetches the attempt value it reads 2 4 or 6 and matches the attempt limit. So the student is recieves a message stating all attempts have been used.
I have tested this on two different servers one running 2.0.1+ and am fairly sure this affects 2.0 and up.