Fix get_current_max_groups_per_user. Issue #6923

1.10.x
Sylvain Mora 11 years ago
parent a65b60b88b
commit c1a46bdc39
  1. 4
      main/inc/lib/groupmanager.lib.php

@ -777,7 +777,9 @@ class GroupManager
$group_table = Database :: get_course_table(TABLE_GROUP);
$group_user_table = Database :: get_course_table(TABLE_GROUP_USER);
$sql = 'SELECT COUNT(gu.group_id) AS current_max FROM '.$group_user_table.' gu, '.$group_table.' g
WHERE g.c_id = '.$course_info['real_id'].' AND gu.group_id = g.id ';
WHERE g.c_id = '.$course_info['real_id'].'
AND gu.c_id = '.$course_info['real_id'].'
AND gu.group_id = g.id ';
if ($category_id != null) {
$category_id = Database::escape_string($category_id);
$sql .= ' AND g.category_id = '.$category_id;

Loading…
Cancel
Save