mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-39971 each attempt builds on last broken for previews.
This commit is contained in:
parent
b6f8a93642
commit
2ed7833790
1 changed files with 5 additions and 1 deletions
|
@ -104,6 +104,10 @@ if ($lastattempt && ($lastattempt->state == quiz_attempt::IN_PROGRESS ||
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
while ($lastattempt && $lastattempt->preview) {
|
||||||
|
$lastattempt = array_pop($attempts);
|
||||||
|
}
|
||||||
|
|
||||||
// Get number for the next or unfinished attempt.
|
// Get number for the next or unfinished attempt.
|
||||||
if ($lastattempt) {
|
if ($lastattempt) {
|
||||||
$attemptnumber = $lastattempt->attempt + 1;
|
$attemptnumber = $lastattempt->attempt + 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue