Skip to content

Commit

Permalink
Merge branch 'MDL-59523-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 1, 2017
2 parents 77c5325 + cb416db commit 3ccd196
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/scorm/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 5 additions & 0 deletions mod/wiki/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 5 additions & 0 deletions mod/workshop/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) ) {
Expand Down

0 comments on commit 3ccd196

Please sign in to comment.