MDL-42557 Events: Removed timemodified hack from course_deleted event
This commit is contained in:
@@ -71,7 +71,7 @@ class course_deleted extends base {
|
||||
protected function get_legacy_eventdata() {
|
||||
$course = $this->get_record_snapshot('course', $this->objectid);
|
||||
$course->context = $this->context;
|
||||
|
||||
$course->timemodified = $this->data['timecreated'];
|
||||
return $course;
|
||||
}
|
||||
|
||||
|
||||
@@ -4842,10 +4842,6 @@ function delete_course($courseorid, $showfeedback = true) {
|
||||
// Delete the course and related context instance.
|
||||
context_helper::delete_instance(CONTEXT_COURSE, $courseid);
|
||||
|
||||
// We will update the course's timemodified, as it will be passed to the course_deleted event,
|
||||
// which should know about this updated property, as this event is meant to pass the full course record.
|
||||
$course->timemodified = time();
|
||||
|
||||
$DB->delete_records("course", array("id" => $courseid));
|
||||
$DB->delete_records("course_format_options", array("courseid" => $courseid));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user