mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merged fix from stable
This commit is contained in:
parent
26997a1f82
commit
9350263a96
1 changed files with 4 additions and 4 deletions
|
@ -1575,10 +1575,10 @@ function quiz_save_attempt($quiz, $questions, $result, $attemptnum) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($attempt->attempt != $attemptnum) { // Double check.
|
// Not usually necessary, but there's some sort of very rare glitch
|
||||||
notify("Number of this attempt is different to the unfinished one!");
|
// I've seen where the number wasn't already the same. In these cases
|
||||||
return false;
|
// We upgrade the database to match the attemptnum we calculated
|
||||||
}
|
$attempt->attempt = $attemptnum;
|
||||||
|
|
||||||
// Now let's complete this record and save it
|
// Now let's complete this record and save it
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue