Skip to content

Commit

Permalink
Closes catalyst#450. Fixed cohort factor list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikko Haiku committed Dec 20, 2023
1 parent 29963a6 commit 4831d87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions factor/cohort/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4831d87

Please sign in to comment.