mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +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
|
@ -30,7 +30,7 @@ $courseid = required_param('id', PARAM_INT);
|
|||
|
||||
$PAGE->set_url('/grade/edit/outcome/course.php', array('id'=>$courseid));
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
|
||||
$course = get_course($courseid);
|
||||
|
||||
/// Make sure they can even access this course
|
||||
require_login($course);
|
||||
|
|
|
@ -75,7 +75,7 @@ if ($id) {
|
|||
} else if ($courseid){
|
||||
$heading = get_string('addoutcome', 'grades');
|
||||
/// adding new outcome from course
|
||||
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
|
||||
$course = get_course($courseid);
|
||||
require_login($course);
|
||||
$context = context_course::instance($course->id);
|
||||
require_capability('moodle/grade:manage', $context);
|
||||
|
|
|
@ -34,7 +34,7 @@ $PAGE->set_pagelayout('admin');
|
|||
|
||||
/// Make sure they can even access this course
|
||||
if ($courseid) {
|
||||
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
|
||||
$course = get_course($courseid);
|
||||
require_login($course);
|
||||
$context = context_course::instance($course->id);
|
||||
require_capability('moodle/grade:manageoutcomes', $context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue