mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-39876 Change get_record('course') calls to get_course
This commit is contained in:
parent
838d78a9ff
commit
ab7632b74c
189 changed files with 231 additions and 233 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue