mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +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
|
@ -87,7 +87,8 @@ class restore_assign_activity_structure_step extends restore_activity_structure_
|
|||
$oldid = $data->id;
|
||||
$data->course = $this->get_courseid();
|
||||
|
||||
$data->timemodified = $this->apply_date_offset($data->timemodified);
|
||||
// Any changes to the list of dates that needs to be rolled should be same during course restore and course reset.
|
||||
// See MDL-9367.
|
||||
$data->allowsubmissionsfromdate = $this->apply_date_offset($data->allowsubmissionsfromdate);
|
||||
$data->duedate = $this->apply_date_offset($data->duedate);
|
||||
|
||||
|
@ -159,8 +160,6 @@ class restore_assign_activity_structure_step extends restore_activity_structure_
|
|||
|
||||
$data->assignment = $this->get_new_parentid('assign');
|
||||
|
||||
$data->timemodified = $this->apply_date_offset($data->timemodified);
|
||||
$data->timecreated = $this->apply_date_offset($data->timecreated);
|
||||
if ($data->userid > 0) {
|
||||
$data->userid = $this->get_mappingid('user', $data->userid);
|
||||
}
|
||||
|
@ -220,8 +219,6 @@ class restore_assign_activity_structure_step extends restore_activity_structure_
|
|||
|
||||
$data->assignment = $this->get_new_parentid('assign');
|
||||
|
||||
$data->timemodified = $this->apply_date_offset($data->timemodified);
|
||||
$data->timecreated = $this->apply_date_offset($data->timecreated);
|
||||
$data->userid = $this->get_mappingid('user', $data->userid);
|
||||
$data->grader = $this->get_mappingid('user', $data->grader);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue