diff --git a/classes/smartmenu.php b/classes/smartmenu.php index ff338a22c75..23aec8c27b2 100644 --- a/classes/smartmenu.php +++ b/classes/smartmenu.php @@ -594,7 +594,7 @@ public function build($resetcache=false) { // Moodle core custom menu logic. 'title' => '', 'url' => null, - 'text' => $this->menu->title, + 'text' => format_string($this->menu->title), 'key' => $this->menu->id, 'submenulink' => 1, 'itemtype' => 'submenu-link', // Used in user menus, to identify the menu type, "link" for submmenus. diff --git a/classes/table/smartmenus_items.php b/classes/table/smartmenus_items.php index b4e5b9e6d17..2b4d7a07826 100644 --- a/classes/table/smartmenus_items.php +++ b/classes/table/smartmenus_items.php @@ -79,6 +79,17 @@ public function __construct($menuid) { $this->totalmenuitems = $DB->count_records('theme_boost_union_menuitems'); } + /** + * Title column. + * + * @param stdclass $row Data of the item. + * @return string Lanaguage formated title of item. + */ + public function col_title($row) { + // Return the title after filter. + return format_string($row->title); + } + /** * Type column. * diff --git a/classes/table/smartmenus_menus.php b/classes/table/smartmenus_menus.php index 5e3851bf345..b3effacfbb3 100644 --- a/classes/table/smartmenus_menus.php +++ b/classes/table/smartmenus_menus.php @@ -77,6 +77,17 @@ public function __construct() { $this->totalmenus = $DB->count_records('theme_boost_union_menus'); } + /** + * Title column. + * + * @param stdclass $row Data of the menu. + * @return string Lanaguage formated title of menu. + */ + public function col_title($row) { + // Return the title after filter. + return format_string($row->title); + } + /** * Location column. * diff --git a/smartmenus/items.php b/smartmenus/items.php index 785a0a3d83d..4ad3b454ab7 100644 --- a/smartmenus/items.php +++ b/smartmenus/items.php @@ -133,7 +133,7 @@ echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('smartmenus', 'theme_boost_union')); if (isset($menu->title)) { - $menuheading = $menu->title; + $menuheading = format_string($menu->title); $settingstitle = get_string('smartmenussettings', 'theme_boost_union'); $settingsurl = new moodle_url('/theme/boost_union/smartmenus/edit.php', array('id' => $menuid, 'sesskey' => sesskey())); $menuheading .= html_writer::link($settingsurl,