MDL-39876 Change get_record('course') calls to get_course

This commit is contained in:
sam marshall 2013-06-18 17:00:37 +01:00
parent 838d78a9ff
commit ab7632b74c
189 changed files with 231 additions and 233 deletions

View file

@ -2887,7 +2887,7 @@ function require_login($courseorid = null, $autologinguest = true, $cm = null, $
} else if ($courseorid == SITEID) {
$course = clone($SITE);
} else {
$course = $DB->get_record('course', array('id' => $courseorid), '*', MUST_EXIST);
$course = get_course($courseorid);
}
if ($cm) {
if ($cm->course != $course->id) {
@ -4906,7 +4906,7 @@ function remove_course_contents($courseid, $showfeedback = true, array $options
// Some crazy wishlist of stuff we should skip during purging of course content.
$options = (array)$options;
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$course = get_course($courseid);
$coursecontext = context_course::instance($courseid);
$fs = get_file_storage();