MDL-37298 use progress_trace in enrol_cohort sync

This commit is contained in:
Petr Škoda 2012-12-25 14:52:30 +01:00
parent 0dc5a532ec
commit c61162310c
6 changed files with 63 additions and 64 deletions

View file

@ -90,7 +90,9 @@ switch ($action) {
}
$enrol = enrol_get_plugin('cohort');
$enrol->add_instance($manager->get_course(), array('customint1' => $cohortid, 'roleid' => $roleid));
enrol_cohort_sync($manager->get_course()->id);
$trace = new null_progress_trace();
enrol_cohort_sync($trace, $manager->get_course()->id);
$trace->finished();
break;
case 'enrolcohortusers':
//TODO: this should be moved to enrol_manual, see MDL-35618.