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

@ -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);

View file

@ -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);

View file

@ -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);