MDL-37378 quiz restore: timecheckstate not in old backups.
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.
This commit is contained in:
@@ -306,7 +306,11 @@ class restore_quiz_activity_structure_step extends restore_questions_activity_st
|
||||
$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)) {
|
||||
|
||||
Reference in New Issue
Block a user