mirror of
https://github.com/moodle/moodle.git
synced 2025-04-18 15:07:34 +02:00
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.
This commit is contained in:
parent
951b414b65
commit
6d2baaaea4
@ -220,6 +220,10 @@ class restore_quiz_activity_structure_step extends restore_questions_activity_st
|
||||
unset($data->popup);
|
||||
}
|
||||
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user