Merge branch 'MDL-59823-master' of git://github.com/damyon/moodle

This commit is contained in:
Jun Pataleta 2017-08-29 15:49:24 +08:00
commit b26ce53776
2 changed files with 9 additions and 3 deletions

View File

@ -554,7 +554,7 @@ class course_enrolment_manager {
}
/**
* Gets all of the enrolment plugins that are active for this course.
* Gets all of the enrolment plugins that are available for this course.
*
* @param bool $onlyenabled return only enabled enrol plugins
* @return array

View File

@ -264,8 +264,14 @@ if ($bulkoperations) {
}
if ($context->id != $frontpagectx->id) {
$plugins = $manager->get_enrolment_plugins();
foreach ($plugins as $plugin) {
$instances = $manager->get_enrolment_instances();
$plugins = $manager->get_enrolment_plugins(false);
foreach ($instances as $key => $instance) {
if (!isset($plugins[$instance->enrol])) {
// Weird, some broken stuff in plugin.
continue;
}
$plugin = $plugins[$instance->enrol];
$bulkoperations = $plugin->get_bulk_operations($manager);
$pluginoptions = [];