diff --git a/factor/cohort/settings.php b/factor/cohort/settings.php index 08aede8d..4ae08873 100644 --- a/factor/cohort/settings.php +++ b/factor/cohort/settings.php @@ -38,10 +38,11 @@ new lang_string('settings:weight', 'tool_mfa'), new lang_string('settings:weight_help', 'tool_mfa'), 100, PARAM_INT)); -$cohorts = cohort_get_all_cohorts(); +global $DB; +$cohorts = $DB->get_records('cohort', null, 'name asc', 'id,name'); $choices = []; -foreach ($cohorts['cohorts'] as $cohort) { +foreach ($cohorts as $cohort) { $choices[$cohort->id] = $cohort->name; }