Skip to content

Commit

Permalink
MDL-37378 quiz restore: timecheckstate not in old backups.
Browse files Browse the repository at this point in the history
We need to avoid a notice. If the value is missing, setting it to 0 is
fine. It will get sorted out the next time cron is run.
  • Loading branch information
timhunt committed Jan 11, 2013
1 parent 2e5d013 commit 816138b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/quiz/backup/moodle2/restore_quiz_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,11 @@ protected function process_quiz_attempt($data) {
$data->timestart = $this->apply_date_offset($data->timestart);
$data->timefinish = $this->apply_date_offset($data->timefinish);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$data->timecheckstate = $this->apply_date_offset($data->timecheckstate);
if (!empty($data->timecheckstate)) {
$data->timecheckstate = $this->apply_date_offset($data->timecheckstate);
} else {
$data->timecheckstate = 0;
}

// Deals with up-grading pre-2.3 back-ups to 2.3+.
if (!isset($data->state)) {
Expand Down

0 comments on commit 816138b

Please sign in to comment.