get_component_string() now works for all enrollment plugins MDL-6522

This commit is contained in:
skodak
2006-09-12 20:03:08 +00:00
parent 69eb59f28a
commit be382aafb3
+3 -2
View File
@@ -1867,8 +1867,9 @@ function get_component_string($component, $contextlevel) {
switch ($contextlevel) {
case CONTEXT_SYSTEM:
if ($component == 'enrol/authorize') {
$string = get_string('enrolname', 'enrol_authorize');
if (preg_match('|^enrol/|', $component)) {
$langname = str_replace('/', '_', $component);
$string = get_string('enrolname', $langname);
} else {
$string = get_string('coresystem');
}