mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-32117 equella: Switch get_all_editing_roles to get_users_with_capability
This is the core function to do the same thing
This commit is contained in:
parent
32f7f85862
commit
7406ee9f57
@ -278,13 +278,7 @@ class repository_equella extends repository {
|
||||
}
|
||||
|
||||
private static function get_all_editing_roles() {
|
||||
global $DB;
|
||||
$sql = "SELECT r.* FROM {role_capabilities} rc
|
||||
INNER JOIN {role} r
|
||||
ON rc.roleid = r.id
|
||||
WHERE capability = :capability AND permission = 1
|
||||
ORDER BY r.shortname";
|
||||
return $DB->get_records_sql($sql, array('capability' => 'moodle/course:manageactivities'));
|
||||
return get_roles_with_capability('moodle/course:manageactivities', CAP_ALLOW);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user