mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-34463 - lib - Alteration of the get_context_instance function to utilize the new function context_XXXX::instance().
This commit is contained in:
parent
3294034b80
commit
d40604724b
61 changed files with 95 additions and 100 deletions
|
@ -36,7 +36,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
|
|||
print_error('nocourseid');
|
||||
}
|
||||
require_login($course);
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
$context = context_course::instance($course->id);
|
||||
|
||||
require_capability('moodle/grade:manage', $context);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue