Browse Source

Fix translation for custom icon on course homepage - refs #8194

Angel Fernando Quiroz Campos 9 years ago
parent
commit
91150cfe5c
1 changed files with 2 additions and 6 deletions
  1. 2 6
      main/course_info/tools.php

+ 2 - 6
main/course_info/tools.php

@@ -118,12 +118,8 @@ switch ($action) {
         $iconsTools .= Display::page_header(get_lang('CustomizeIcons'), null, 'h4');
         $iconsTools .= '<div class="row">';
         foreach ($toolList as $tool) {
-
-            if ($tool['id']>20) {
-                $toolIconName = $tool['name'];
-            } else {
-                $toolIconName = get_lang('Tool'.api_underscore_to_camel_case($tool['name']));
-            }
+            $toolIconName = 'Tool' . api_underscore_to_camel_case($tool['name']);
+            $toolIconName = isset($$toolIconName) ? get_lang($toolIconName) : $tool['name'];
 
             $iconsTools .= '<div class="col-md-2">';
             $iconsTools .= '<div class="items-tools">';