mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue