mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +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
|
@ -40,7 +40,7 @@ if ($type !== "usercourse.png" and $type !== "userday.png") {
|
|||
$type = 'userday.png';
|
||||
}
|
||||
|
||||
$course = $DB->get_record("course", array("id"=>$id), '*', MUST_EXIST);
|
||||
$course = get_course($id);
|
||||
$user = $DB->get_record("user", array("id"=>$user, 'deleted'=>0), '*', MUST_EXIST);
|
||||
|
||||
$coursecontext = context_course::instance($course->id);
|
||||
|
|
|
@ -100,7 +100,7 @@ $PAGE->set_url('/report/log/index.php', $params);
|
|||
$PAGE->set_pagelayout('report');
|
||||
|
||||
if ($hostid == $CFG->mnet_localhost_id) {
|
||||
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
|
||||
$course = get_course($id);
|
||||
|
||||
} else {
|
||||
$course_stub = $DB->get_record('mnet_log', array('hostid'=>$hostid, 'course'=>$id), '*', true);
|
||||
|
|
|
@ -36,7 +36,7 @@ if ($mode !== 'today' and $mode !== 'all') {
|
|||
}
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$userid, 'deleted'=>0), '*', MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
|
||||
$course = get_course($courseid);
|
||||
|
||||
$coursecontext = context_course::instance($course->id);
|
||||
$personalcontext = context_user::instance($user->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue