mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-78057 core_user: Use correct class for context check.
This commit is contained in:
parent
5252124e35
commit
3d95fe0bc3
@ -18,7 +18,7 @@ namespace core_user\output;
|
||||
|
||||
use context_course;
|
||||
use core_user;
|
||||
use core_external;
|
||||
use core_external\external_api;
|
||||
use coding_exception;
|
||||
|
||||
/**
|
||||
@ -152,7 +152,7 @@ class user_roles_editable extends \core\output\inplace_editable {
|
||||
|
||||
// Check user is enrolled in the course.
|
||||
$context = context_course::instance($courseid);
|
||||
core_external::validate_context($context);
|
||||
external_api::validate_context($context);
|
||||
|
||||
// Check permissions.
|
||||
require_capability('moodle/role:assign', $context);
|
||||
|
Loading…
x
Reference in New Issue
Block a user