mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-55456 course: set context for category ajax requests
This commit is contained in:
parent
ddd8dc0d1b
commit
0ee41475ae
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,8 @@ $getroles = optional_param('getroles', 0, PARAM_BOOL);
|
|||
|
||||
list($context, $course, $cm) = get_context_info_array($contextid);
|
||||
|
||||
$PAGE->set_context($context);
|
||||
|
||||
require_login($course, false, $cm);
|
||||
require_capability('moodle/role:review', $context);
|
||||
require_sesskey();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue