mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-48074 enrol: option to filter by users 'not in any group'
This commit is contained in:
parent
e5eefbbf01
commit
0c9d8172b5
3 changed files with 9 additions and 2 deletions
|
@ -280,8 +280,13 @@ class course_enrolment_manager {
|
|||
|
||||
// Group condition.
|
||||
if ($this->groupfilter) {
|
||||
$sql .= " AND gm.groupid = :groupid";
|
||||
$params['groupid'] = $this->groupfilter;
|
||||
if ($this->groupfilter < 0) {
|
||||
// Show users who are not in any group.
|
||||
$sql .= " AND gm.groupid IS NULL";
|
||||
} else {
|
||||
$sql .= " AND gm.groupid = :groupid";
|
||||
$params['groupid'] = $this->groupfilter;
|
||||
}
|
||||
}
|
||||
|
||||
// Status condition.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue