mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 19:03:38 +02:00
Merge branch 'MDL-27040' of git://github.com/timhunt/moodle
This commit is contained in:
commit
babbab1449
@ -5007,7 +5007,11 @@ function get_users_by_capability($context, $capability, $fields = '', $sort = ''
|
||||
|
||||
if ($useviewallgroups) {
|
||||
$viewallgroupsusers = get_users_by_capability($context, 'moodle/site:accessallgroups', 'u.id, u.id', '', '', '', '', $exceptions);
|
||||
$wherecond[] = "($grouptest OR u.id IN (" . implode(',', array_keys($viewallgroupsusers)) . '))';
|
||||
if (!empty($viewallgroupsusers)) {
|
||||
$wherecond[] = "($grouptest OR u.id IN (" . implode(',', array_keys($viewallgroupsusers)) . '))';
|
||||
} else {
|
||||
$wherecond[] = "($grouptest)";
|
||||
}
|
||||
} else {
|
||||
$wherecond[] = "($grouptest)";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user