Permalink
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...
1 parent 951b414 commit 6d2baaaea41c8a403ed495461696a58f08fe5471 @colin-umn colin-umn committed with marinaglancy Oct 31, 2013
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.

0 comments on commit 6d2baaa

Please sign in to comment.