Thanks for looking at this. Because I'm new at moodle I can't help that much at this stage but will start looking at the code when I get some time.
I just set up a new install of moodle on another box with apache2, mySQL
4.1 and PHP 5 and I can recreate the bug every time.
I have been playing around and found some info that might help you?
I create a quiz with 3 questions.
Unlimited attemps = yes
Attempts builds on last = yes
Adaptive mode = no
grading method = highest grade
Grade is set to 3.
The other options are left as default.
I logged in as a student and went through the quiz like this;
- Answer all answers incorrectly. Grade = 0
- Answer first question correctly. Grade = 1
- Answer second question correctly. Grade = 2
- Answer third question correctly. Grade = 3
So after attempt 4 I have gained 100% and have a grade of 3.
After clicking on the Regrade tab and then back to Overview, the grades for each go 0,1,1,1
I then went into each attempt and found the following.
Attempt 1 looked correct.
Attempt 2 also looked correct showing the first question as correct.
Attempt 3 did NOT look correct displaying question 1 as INCORRECT even though the correct answer is selected and is hightlighted showing that indeed it is the correct answer. The second qestion, which was changed in this attempt was showing correct.
Attempt 4 showed all questions as incorrect except question 3 which again was the one changed in this attempt. All other questions had the correct answers and were highlighted but were showing up as Incorrect answers.
Hopefully this makes sense. So it looks like that any re-attempts at a question gets flagged as incorrect on subsequent atempts (maybe?).