MDL-56877 autogroup form: no limit on cohorts

This commit is contained in:
Virgil Ashruf 2016-11-10 09:25:54 +01:00
parent b4d6669dd0
commit 5ceb68d169

View File

@ -83,7 +83,7 @@ class autogroup_form extends moodleform {
}
$coursecontext = context_course::instance($COURSE->id);
if ($cohorts = cohort_get_available_cohorts($coursecontext, COHORT_WITH_ENROLLED_MEMBERS_ONLY)) {
if ($cohorts = cohort_get_available_cohorts($coursecontext, COHORT_WITH_ENROLLED_MEMBERS_ONLY, 0, 0)) {
$options = array(0 => get_string('anycohort', 'cohort'));
foreach ($cohorts as $c) {
$options[$c->id] = format_string($c->name, true, context::instance_by_id($c->contextid));