Commit 6d2baaae authored by Colin Campbell's avatar Colin Campbell Committed by Marina Glancy
Browse files

MDL-42640 quiz: Fix restore of backup without overduehandling setting

Use default quiz overduehandling setting when restoring a
backup from older Moodle version that does not have a quiz
overduehandling setting.
parent 951b414b
......@@ -220,6 +220,10 @@ class restore_quiz_activity_structure_step extends restore_questions_activity_st
if (!isset($data->overduehandling)) {
$data->overduehandling = get_config('quiz', 'overduehandling');
// Insert the quiz record.
$newitemid = $DB->insert_record('quiz', $data);
// Immediately after inserting "activity" record, call this.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment