diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index 7b8b91aacb41a..dc20f0b3be2c1 100644 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -831,7 +831,9 @@ function scorm_reset_userdata($data) { $status[] = array('component' => $componentstr, 'item' => get_string('deleteallattempts', 'scorm'), 'error' => false); } - // No dates to shift here. + // Any changes to the list of dates that needs to be rolled should be same during course restore and course reset. + // See MDL-9367. + shift_course_mod_dates('scorm', array('timeopen', 'timeclose'), $data->timeshift, $data->courseid); return $status; } diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index 728af4cd78102..0a187a67c2a1e 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -230,6 +230,11 @@ function wiki_reset_userdata($data) { } } } + + // Any changes to the list of dates that needs to be rolled should be same during course restore and course reset. + // See MDL-9367. + shift_course_mod_dates('wiki', array('editbegin', 'editend'), $data->timeshift, $data->courseid); + return $status; } diff --git a/mod/workshop/lib.php b/mod/workshop/lib.php index 67197cca38682..63cd369d2eceb 100644 --- a/mod/workshop/lib.php +++ b/mod/workshop/lib.php @@ -1890,6 +1890,11 @@ function workshop_reset_course_form_defaults(stdClass $course) { function workshop_reset_userdata(stdClass $data) { global $CFG, $DB; + // Any changes to the list of dates that needs to be rolled should be same during course restore and course reset. + // See MDL-9367. + shift_course_mod_dates('workshop', array('submissionstart', 'submissionend', 'assessmentstart', 'assessmentend'), + $data->timeshift, $data->courseid); + if (empty($data->reset_workshop_submissions) and empty($data->reset_workshop_assessments) and empty($data->reset_workshop_phase) ) {