mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-27040' of git://github.com/timhunt/moodle
This commit is contained in:
commit
babbab1449
1 changed files with 5 additions and 1 deletions
|
@ -5007,7 +5007,11 @@ function get_users_by_capability($context, $capability, $fields = '', $sort = ''
|
||||||
|
|
||||||
if ($useviewallgroups) {
|
if ($useviewallgroups) {
|
||||||
$viewallgroupsusers = get_users_by_capability($context, 'moodle/site:accessallgroups', 'u.id, u.id', '', '', '', '', $exceptions);
|
$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 {
|
} else {
|
||||||
$wherecond[] = "($grouptest)";
|
$wherecond[] = "($grouptest)";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue