MDL-62065 core_access: First deprecation of get roles on exact context
This commit is contained in:
@@ -6613,3 +6613,34 @@ function groups_get_all_groups_for_courses($courses) {
|
||||
|
||||
return $groups;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function finds the roles assigned directly to this context only
|
||||
* i.e. no roles in parent contexts
|
||||
*
|
||||
* @deprecated since Moodle 3.6. Please use the get_roles_used_in_context().
|
||||
* @todo final deprecation. To be removed in Moodle 4.0
|
||||
* @param context $context
|
||||
* @return array
|
||||
*/
|
||||
function get_roles_on_exact_context(context $context) {
|
||||
debugging('get_roles_on_exact_context() is deprecated, please use get_roles_used_in_context() instead.',
|
||||
DEBUG_DEVELOPER);
|
||||
|
||||
return get_roles_used_in_context($context, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find out which roles has assignment on this context
|
||||
*
|
||||
* @deprecated since Moodle 3.6. Please use the get_roles_used_in_context().
|
||||
* @todo final deprecation. To be removed in Moodle 4.0
|
||||
* @param context $context
|
||||
* @return array
|
||||
*/
|
||||
function get_roles_with_assignment_on_context(context $context) {
|
||||
debugging('get_roles_with_assignment_on_context() is deprecated, please use get_roles_used_in_context() instead.',
|
||||
DEBUG_DEVELOPER);
|
||||
|
||||
return get_roles_used_in_context($context, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user