MDL-55454 quiz: loses shufflequestion setting restoring old backups

This commit is contained in:
Tim Hunt 2016-08-03 18:42:51 +01:00
parent d1a3ea62ef
commit 0e9132e56e

View File

@ -239,6 +239,10 @@ class restore_quiz_activity_structure_step extends restore_questions_activity_st
$data->overduehandling = get_config('quiz', 'overduehandling');
}
// Old shufflequestions setting is now stored in quiz sections,
// so save it here if necessary so it is available when we need it.
$this->legacyshufflequestionsoption = !empty($data->shufflequestions);
// Insert the quiz record.
$newitemid = $DB->insert_record('quiz', $data);
// Immediately after inserting "activity" record, call this.