mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 10:56:56 +02:00
MDL-9367 restore: Roll only configuration dates
It was decided to roll only configuration dates and any date related to user content such as 'timecreated' , 'timemodified' etc should not be rolled forward.
This commit is contained in:
parent
d509f80c48
commit
0d14fcbc60
57 changed files with 1617 additions and 74 deletions
|
@ -2872,7 +2872,10 @@ function data_reset_userdata($data) {
|
|||
|
||||
// updating dates - shift may be negative too
|
||||
if ($data->timeshift) {
|
||||
shift_course_mod_dates('data', array('timeavailablefrom', 'timeavailableto', 'timeviewfrom', 'timeviewto'), $data->timeshift, $data->courseid);
|
||||
// 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('data', array('timeavailablefrom', 'timeavailableto',
|
||||
'timeviewfrom', 'timeviewto', 'assesstimestart', 'assesstimefinish'), $data->timeshift, $data->courseid);
|
||||
$status[] = array('component'=>$componentstr, 'item'=>get_string('datechanged'), 'error'=>false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue