Browse Source

Minor - changing function names

Julio Montoya 12 years ago
parent
commit
670c464234

+ 20 - 9
main/inc/lib/template.lib.php

@@ -137,7 +137,7 @@ class Template
     /**
      * @param string $help_input
      */
-    public function set_help($help_input = null)
+    public function setHelp($help_input = null)
     {
         if (!empty($help_input)) {
             $help = $help_input;
@@ -411,7 +411,7 @@ class Template
         }
 
         // Logo
-        $logo = $this->return_logo($this->theme);
+        $logo = $this->returnLogo($this->theme);
         $this->assign('logo', $logo);
     }
 
@@ -567,9 +567,9 @@ class Template
 
         $this->assign('favico', $favico);
 
-        $this->set_help();
+        $this->setHelp();
 
-        $notification = $this->return_notification_menu();
+        $notification = $this->returnNotificationMenu();
         $this->assign('notification_menu', $notification);
 
         //Preparing values for the menu
@@ -889,12 +889,12 @@ class Template
      * Determines the possible tabs (=sections) that are available.
      * This function is used when creating the tabs in the third header line and
      * all the sections that do not appear there (as determined by the
-     * platform admin on the Dokeos configuration settings page)
+     * platform admin on the Chamilo configuration settings page)
      * will appear in the right hand menu that appears on several other pages
      * @return array containing all the possible tabs
      * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
      */
-    function get_tabs()
+    function getTabs()
     {
         $_course = api_get_course_info();
 
@@ -976,10 +976,16 @@ class Template
             $navigation['platform_admin']['url'] = api_get_path(WEB_CODE_PATH).'admin/';
             $navigation['platform_admin']['title'] = get_lang('PlatformAdmin');
         }
+
+        if (api_is_question_manager()) {
+            $navigation['question_manager']['url'] = api_get_path(WEB_PUBLIC_PATH).'admin/questionmanager';
+            $navigation['question_manager']['title'] = get_lang('PlatformAdmin');
+        }
+
         return $navigation;
     }
 
-    function return_logo($theme)
+    function returnLogo($theme)
     {
         $_course = api_get_course_info();
         $html = '';
@@ -1032,7 +1038,7 @@ class Template
         return $html;
     }
 
-    function return_notification_menu()
+    function returnNotificationMenu()
     {
         $_course = api_get_course_info();
         $course_id = api_get_course_id();
@@ -1122,7 +1128,7 @@ class Template
     {
         $navigation = array();
         $menu_navigation = array();
-        $possible_tabs = $this->get_tabs();
+        $possible_tabs = $this->getTabs();
 
         // Campus Homepage
         if (api_get_setting('show_tabs', 'campus_homepage') == 'true') {
@@ -1208,6 +1214,11 @@ class Template
                 }
             }
 
+            if (api_is_question_manager()) {
+                $navigation['question_manager'] = $possible_tabs['question_manager'];
+            }
+
+
             // Reports
             if (!empty($possible_tabs['reports'])) {
                 if (api_get_setting('show_tabs', 'reports') == 'true') {

+ 1 - 1
main/social/group_add.php

@@ -47,7 +47,7 @@ $social_right_content .= $form->return_form();
 $social_right_content .= '</div>';
 
 $tpl = $app['template'];
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);
 

+ 1 - 1
main/social/group_edit.php

@@ -70,7 +70,7 @@ $social_right_content .= '</div>';
 $app['title'] = $tool_name;
 $tpl = $app['template'];
 
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);
 

+ 1 - 1
main/social/group_invitation.php

@@ -515,7 +515,7 @@ $social_right_content = Display::div($social_right_content, array('class' => 'sp
 $app['title'] = $tool_name;
 $tpl = $app['template'];
 
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);
 

+ 1 - 1
main/social/group_members.php

@@ -124,7 +124,7 @@ $social_right_content = '<div class="span9">'.$social_right_content.'</div>';
 $app['title'] = get_lang('Social');
 $tpl = $app['template'];
 
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);
 $tpl->assign('message', $show_message);

+ 1 - 1
main/social/group_topics.php

@@ -195,7 +195,7 @@ $social_right_content = '<div class="span9">'.$social_right_content.'</div>';
 $app['title'] = get_lang('Social');
 $tpl = $app['template'];
 
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);
 $tpl->assign('message', $show_message);

+ 1 - 1
main/social/group_waiting_list.php

@@ -105,7 +105,7 @@ $social_right_content .= '</div>';
 
 $tpl = $app['template'];
 
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);
 

+ 1 - 1
main/social/groups.php

@@ -535,7 +535,7 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'show_message' && isset
 
 $tpl = $app['template'];
 
-$tpl->set_help('Groups');
+$tpl->setHelp('Groups');
 $tpl->assign('social_left_content', $social_left_content);
 $tpl->assign('social_right_content', $social_right_content);