Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.7
-
None
-
Any
-
MOODLE_17_STABLE
-
MOODLE_17_STABLE, MOODLE_18_STABLE
Description
The /admin/roles/manage.php page displays a '[blockname]' text string because the get_component_string() function in /lib/accesslib.php is not looking for the correct file when using CONTEXT_BLOCK.
Here is a patch for the problem (also attached):
Index: accesslib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/accesslib.php,v
retrieving revision 1.166.2.30
diff -u -r1.166.2.30 accesslib.php
— accesslib.php 5 Dec 2006 07:12:22 -0000 1.166.2.30
+++ accesslib.php 9 Jan 2007 16:01:11 -0000
@@ -2706,7 +2706,7 @@
break;
case CONTEXT_BLOCK:
- $string = get_string('blockname', 'block_'.$component.'.php');
+ $string = get_string('blockname', 'block_'.basename($component));
break;
default: