From 0d9dbbd562ea5752657a1d8421f11eb2107f18b0 Mon Sep 17 00:00:00 2001 From: Arthur Portugal Date: Wed, 28 Oct 2009 17:20:30 -0500 Subject: [PATCH] Reverted change because the first group always was hidden --- main/inc/lib/groupmanager.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/groupmanager.lib.php b/main/inc/lib/groupmanager.lib.php index 6d343cd857..7b60930c50 100644 --- a/main/inc/lib/groupmanager.lib.php +++ b/main/inc/lib/groupmanager.lib.php @@ -183,7 +183,7 @@ class GroupManager { } $groups = array (); - if(is_array($thisGroup = Database::fetch_array($groupList))){ + $thisGroup= array(); while ($thisGroup = Database::fetch_array($groupList)) { if ($thisGroup['category_id'] == VIRTUAL_COURSE_CATEGORY) { @@ -202,7 +202,7 @@ class GroupManager { } } $groups[] = $thisGroup; - } + } return $groups; } @@ -826,7 +826,7 @@ class GroupManager { * Retrieve all the groups where enrollment is still allowed * (reverse) ordered by the number of place available */ - echo $sql = "SELECT g.id gid, g.max_student-count(ug.user_id) nbPlaces, g.max_student + $sql = "SELECT g.id gid, g.max_student-count(ug.user_id) nbPlaces, g.max_student FROM ".$group_table." g LEFT JOIN ".$group_user_table." ug ON `g`.`id` = `ug`.`group_id`