Merge branch 'MDL-37378_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE
authorSam Hemelryk <sam@moodle.com>
Mon, 14 Jan 2013 21:42:36 +0000 (10:42 +1300)
committerSam Hemelryk <sam@moodle.com>
Mon, 14 Jan 2013 21:42:36 +0000 (10:42 +1300)
mod/quiz/backup/moodle2/restore_quiz_stepslib.php

index 8014bc1..d4a384b 100644 (file)
@@ -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)) {