MDL-21781 added support for autocreation of groups from cohorts
[moodle.git] / group / autogroup.php
index 830ad5d..fa37ddb 100644 (file)
@@ -71,7 +71,7 @@ if ($editform->is_cancelled()) {
         default:
             print_error('unknoworder');
     }
-    $users = groups_get_potential_members($data->courseid, $data->roleid, $orderby);
+    $users = groups_get_potential_members($data->courseid, $data->roleid, $data->cohortid, $orderby);
     $usercnt = count($users);
 
     if ($data->allocateby == 'random') {