mirror of
https://github.com/moodle/moodle.git
synced 2025-02-21 01:48:45 +01:00
Forgot to convert a $quiz to $cmoptions. Fixes bug 3749
This commit is contained in:
parent
33674080d6
commit
6869085a5e
@ -210,7 +210,7 @@ function quiz_get_states(&$questions, $cmoptions, $attempt) {
|
||||
}
|
||||
} else {
|
||||
// Create a new state object
|
||||
if ($quiz->attemptonlast and $attempt->attempt > 1 and !$attempt->preview) {
|
||||
if ($cmoptions->attemptonlast and $attempt->attempt > 1 and !$attempt->preview) {
|
||||
// build on states from last attempt
|
||||
if (!$lastattemptid = get_field('quiz_attempts', 'uniqueid', 'quiz', $attempt->quiz, 'userid', $attempt->userid, 'attempt', $attempt->attempt-1)) {
|
||||
error('Could not find previous attempt to build on');
|
||||
|
Loading…
x
Reference in New Issue
Block a user