mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
[multienrol]Hide disabled plugins and show the name of the site default in selection list
This commit is contained in:
parent
f5befec4e8
commit
cd1d0ef61a
@ -116,7 +116,7 @@
|
||||
<td align="right"><?php print_string("enrolmentplugins") ?>:</td>
|
||||
<td><?php
|
||||
unset($choices);
|
||||
$modules = get_list_of_plugins("enrol");
|
||||
$modules = explode(',', $CFG->enrol_plugins_enabled);
|
||||
foreach ($modules as $module) {
|
||||
$name = get_string("enrolname", "enrol_$module");
|
||||
$plugin = enrolment_factory::factory($module);
|
||||
@ -126,7 +126,7 @@
|
||||
}
|
||||
asort($choices);
|
||||
$choices = array_flip($choices);
|
||||
$choices = array_merge(array('' => get_string('sitedefault')), $choices);
|
||||
$choices = array_merge(array('' => get_string('sitedefault').' ('.get_string("enrolname", "enrol_$CFG->enrol").')'), $choices);
|
||||
choose_from_menu ($choices, "enrol", "$form->enrol", "");
|
||||
helpbutton("courseenrolmentplugins", get_string("enrolmentplugins"));
|
||||
?></td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user