Merge branch 'wip-MDL-35260-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Dan Poltawski 2012-11-12 11:04:23 +08:00
commit 3c9b489820
14 changed files with 432 additions and 13 deletions

View file

@ -4572,7 +4572,8 @@ function delete_course($courseorid, $showfeedback = true) {
// 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", array("id" => $courseid));
$DB->delete_records("course_format_options", array("courseid" => $courseid));
//trigger events
$course->context = $context; // you can not fetch context in the event because it was already deleted