From cbf643f5f0ba7fc0a61885fc58eccb80e707eba4 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 1 Oct 2006 08:48:58 +0000 Subject: [PATCH] Make the sorting of the names always by lastname, to match assign roles --- course/groups.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/course/groups.php b/course/groups.php index 36ddd19043..208ee29c26 100644 --- a/course/groups.php +++ b/course/groups.php @@ -184,7 +184,7 @@ foreach ($groups as $group) { $countusers = 0; $listmembers[$group->id] = array(); - if ($groupusers = get_group_users($group->id)) { + if ($groupusers = get_group_users($group->id, 'u.lastname ASC, u.firstname ASC')) { foreach ($groupusers as $key=>$groupuser) { if (!array_key_exists($groupuser->id, $nonmembers)) { // group member with another role @@ -197,15 +197,12 @@ $countusers++; } } - natcasesort($listmembers[$group->id]); } $listgroups[$group->id] = $group->name." ($countusers)"; } natcasesort($listgroups); } - natcasesort($nonmembers); - if (empty($selectedgroup)) { // Choose the first group by default if ($selectedgroup = array_shift($temparr = array_keys($listgroups))) { $members = $listmembers[$selectedgroup]; -- 2.39.5