From: skodak Date: Tue, 12 Sep 2006 20:03:08 +0000 (+0000) Subject: get_component_string() now works for all enrollment plugins MDL-6522 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=be382aafb32002dba7669e8f4badd4396a54e498;p=moodle.git get_component_string() now works for all enrollment plugins MDL-6522 --- 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'); }