Merged fix from stable

This commit is contained in:
moodler 2004-07-27 13:19:12 +00:00
parent 26997a1f82
commit 9350263a96

View file

@ -1575,10 +1575,10 @@ function quiz_save_attempt($quiz, $questions, $result, $attemptnum) {
return false;
}
if ($attempt->attempt != $attemptnum) { // Double check.
notify("Number of this attempt is different to the unfinished one!");
return false;
}
// Not usually necessary, but there's some sort of very rare glitch
// I've seen where the number wasn't already the same. In these cases
// We upgrade the database to match the attemptnum we calculated
$attempt->attempt = $attemptnum;
// Now let's complete this record and save it