mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Putting in a placeholder when counting or gettig users in group 0
(return nothing for now)
This commit is contained in:
parent
0720313b30
commit
3d35e6b732
1 changed files with 9 additions and 2 deletions
|
@ -1102,7 +1102,10 @@ function get_course_students($courseid, $sort="s.timeaccess", $dir="", $page=0,
|
|||
$select .= " AND u.lastname $LIKE '$lastinitial%' ";
|
||||
}
|
||||
|
||||
if ($group) {
|
||||
if ($group === 0) { /// Need something here to get all students not in a group
|
||||
return array();
|
||||
|
||||
} else if ($group !== NULL) {
|
||||
$groupmembers = ", {$CFG->prefix}groups_members gm ";
|
||||
$select .= " AND u.id = gm.userid AND gm.groupid = '$group'";
|
||||
}
|
||||
|
@ -1144,7 +1147,11 @@ function count_course_students($course, $search="", $firstinitial="", $lastiniti
|
|||
if ($lastinitial) {
|
||||
$select .= " AND u.lastname $LIKE '$lastinitial%'";
|
||||
}
|
||||
if ($group) {
|
||||
|
||||
if ($group === 0) { /// Need something here to get all students not in a group
|
||||
return 0;
|
||||
|
||||
} else if ($group !== NULL) {
|
||||
$groupmembers = ", {$CFG->prefix}groups_members gm ";
|
||||
$select .= " AND u.id = gm.userid AND gm.groupid = '$group'";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue