[multienrol]Hide disabled plugins and show the name of the site default in selection list

This commit is contained in:
martinlanghoff 2006-03-09 02:57:41 +00:00
parent f5befec4e8
commit cd1d0ef61a

View File

@ -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>