MDL-36014 cohorts: fix error in SQL query
authorMarina Glancy <marina@moodle.com>
Thu, 9 Oct 2014 07:33:49 +0000 (15:33 +0800)
committerMarina Glancy <marina@moodle.com>
Thu, 9 Oct 2014 07:33:49 +0000 (15:33 +0800)
lib/deprecatedlib.php

index 899cb1c..91d58f6 100644 (file)
@@ -4522,7 +4522,7 @@ function cohort_get_visible_list($course, $onlyenrolled=true) {
         $left JOIN ({cohort_members} cm
                    JOIN ($esql) u ON u.id = cm.userid) ON cm.cohortid = c.id
              WHERE c.contextid $parentsql
-          GROUP BY c.id, c.name, c.contextid, c.idnumber
+          GROUP BY c.id, c.name, c.contextid, c.idnumber, c.visible
            $having
           ORDER BY c.name, c.idnumber, c.visible";