|
|
|
@ -183,8 +183,8 @@ class GroupManager { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$groups = array (); |
|
|
|
|
while ($thisGroup = Database::fetch_array($groupList)) |
|
|
|
|
{ |
|
|
|
|
if(is_array($thisGroup = Database::fetch_array($groupList))){ |
|
|
|
|
while ($thisGroup = Database::fetch_array($groupList)) { |
|
|
|
|
if ($thisGroup['category_id'] == VIRTUAL_COURSE_CATEGORY) |
|
|
|
|
{ |
|
|
|
|
$sql = "SELECT title FROM $table_course WHERE code = '".$thisGroup['name']."'"; |
|
|
|
@ -203,6 +203,7 @@ class GroupManager { |
|
|
|
|
} |
|
|
|
|
$groups[] = $thisGroup; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $groups; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
@ -809,8 +810,8 @@ class GroupManager { |
|
|
|
|
$i--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(count($group_ids)==0) |
|
|
|
|
return false; |
|
|
|
|
if(count($group_ids)==0){ |
|
|
|
|
return false;} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
global $_course; |
|
|
|
@ -825,7 +826,7 @@ class GroupManager { |
|
|
|
|
* Retrieve all the groups where enrollment is still allowed |
|
|
|
|
* (reverse) ordered by the number of place available |
|
|
|
|
*/ |
|
|
|
|
$sql = "SELECT g.id gid, g.max_student-count(ug.user_id) nbPlaces, g.max_student |
|
|
|
|
echo $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` |
|
|
|
|