From be382aafb32002dba7669e8f4badd4396a54e498 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 12 Sep 2006 20:03:08 +0000 Subject: [PATCH] get_component_string() now works for all enrollment plugins MDL-6522 --- lib/accesslib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 352f16062c..fccb7f1c81 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -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'); } -- 2.39.5