MDL-55548 backup: changes after review
1) There is no need to store the 'timemodified' value of the section when backing up a course module, they do not refer to the same time. 2) When creating a new course section during restore use the current time. 3) Added timemodified value to more places when updating the 'course_sections' table.
This commit is contained in:
@@ -62,8 +62,12 @@ class info_section extends info {
|
||||
|
||||
protected function set_in_database($availability) {
|
||||
global $DB;
|
||||
$DB->set_field('course_sections', 'availability', $availability,
|
||||
array('id' => $this->section->id));
|
||||
|
||||
$section = new \stdClass();
|
||||
$section->id = $this->section->id;
|
||||
$section->availability = $availability;
|
||||
$section->timemodified = time();
|
||||
$DB->update_record('course_sections', $section);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user