mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'wip-MDL-42089-master' of git://github.com/abgreeve/moodle
This commit is contained in:
commit
e9091a28f5
@ -266,7 +266,8 @@ if ($roleid) {
|
||||
foreach ($assignableroles as $roleid => $notused) {
|
||||
$roleusers = '';
|
||||
if (0 < $assigncounts[$roleid] && $assigncounts[$roleid] <= MAX_USERS_TO_LIST_PER_ROLE) {
|
||||
$roleusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname');
|
||||
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
|
||||
$roleusers = get_role_users($roleid, $context, false, $userfields);
|
||||
if (!empty($roleusers)) {
|
||||
$strroleusers = array();
|
||||
foreach ($roleusers as $user) {
|
||||
|
@ -3328,8 +3328,8 @@ class admin_setting_users_with_capability extends admin_setting_configmultiselec
|
||||
'This is unexpected, and a problem because there is no way to pass these ' .
|
||||
'parameters to get_users_by_capability. See MDL-34657.');
|
||||
}
|
||||
$users = get_users_by_capability(context_system::instance(),
|
||||
$this->capability, 'u.id,u.username,u.firstname,u.lastname', $sort);
|
||||
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
|
||||
$users = get_users_by_capability(context_system::instance(), $this->capability, $userfields, $sort);
|
||||
$this->choices = array(
|
||||
'$@NONE@$' => get_string('nobody'),
|
||||
'$@ALL@$' => get_string('everyonewhocan', 'admin', get_capability_string($this->capability)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user