Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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.
  • Loading branch information...
commit 6d2baaaea41c8a403ed495461696a58f08fe5471 1 parent 951b414
@colin-umn colin-umn authored marinaglancy committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/quiz/backup/moodle2/restore_quiz_stepslib.php
View
4 mod/quiz/backup/moodle2/restore_quiz_stepslib.php
@@ -220,6 +220,10 @@ protected function process_quiz($data) {
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.
Please sign in to comment.
Something went wrong with that request. Please try again.