MDL-59368 groups: Postgres fix

Postgres is strict about mixing types.
This commit is contained in:
Damyon Wiese 2017-07-07 09:38:00 +08:00
parent 4aad7c2be2
commit f746a078cb

View File

@ -264,7 +264,7 @@ function groups_get_all_groups($courseid, $userid=0, $groupingid=0, $fields='g.*
}
if ($withmembers) {
$memberselect = $DB->sql_concat("COALESCE(ugm.userid, ugm.userid, 'NULL')", "':'", 'g.id') . ' AS ugmid, ugm.userid, ';
$memberselect = $DB->sql_concat("COALESCE(ugm.userid, 0)", "':'", 'g.id') . ' AS ugmid, ugm.userid, ';
$memberjoin = ' LEFT JOIN {groups_members} ugm ON ugm.groupid = g.id ';
}