Skip to content

Commit

Permalink
MDL-42640 quiz: Fix restore of backup without overduehandling setting
Browse files Browse the repository at this point in the history
Use default quiz overduehandling setting when restoring a
backup from older Moodle version that does not have a quiz
overduehandling setting.
  • Loading branch information
colin-umn committed Nov 5, 2013
1 parent 75d8d06 commit 4bb2eaa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/quiz/backup/moodle2/restore_quiz_stepslib.php
Expand Up @@ -220,6 +220,10 @@ protected function process_quiz($data) {
unset($data->popup); unset($data->popup);
} }


if (!isset($data->overduehandling)) {
$data->overduehandling = get_config('quiz', 'overduehandling');
}

// Insert the quiz record. // Insert the quiz record.
$newitemid = $DB->insert_record('quiz', $data); $newitemid = $DB->insert_record('quiz', $data);
// Immediately after inserting "activity" record, call this. // Immediately after inserting "activity" record, call this.
Expand Down

0 comments on commit 4bb2eaa

Please sign in to comment.