|
@@ -16,7 +16,7 @@
|
|
|
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
|
|
|
*/
|
|
|
function get_tabs() {
|
|
|
- global $_course;
|
|
|
+ $_course = api_get_course_info();
|
|
|
|
|
|
$navigation = array();
|
|
|
|
|
@@ -27,7 +27,7 @@ function get_tabs() {
|
|
|
|
|
|
|
|
|
|
|
|
- if(api_is_allowed_to_create_course()) {
|
|
|
+ if (api_is_allowed_to_create_course()) {
|
|
|
|
|
|
$navigation['mycourses']['url'] = api_get_path(WEB_PATH).'user_portal.php?nosession=true';
|
|
|
} else {
|
|
@@ -48,17 +48,17 @@ function get_tabs() {
|
|
|
|
|
|
|
|
|
if (api_get_setting('gradebook_enable') == 'true') {
|
|
|
- $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' );
|
|
|
- $navigation['mygradebook']['title'] = get_lang('MyGradebook');
|
|
|
- $navigation['mygradebook']['key'] = 'gradebook';
|
|
|
+ $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' );
|
|
|
+ $navigation['mygradebook']['title'] = get_lang('MyGradebook');
|
|
|
+ $navigation['mygradebook']['key'] = 'gradebook';
|
|
|
}
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) {
|
|
|
-
|
|
|
- $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':'');
|
|
|
- $navigation['session_my_space']['title'] = get_lang('MySpace');
|
|
|
- $navigation['session_my_space']['key'] = 'my-space';
|
|
|
+
|
|
|
+ $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':'');
|
|
|
+ $navigation['session_my_space']['title'] = get_lang('MySpace');
|
|
|
+ $navigation['session_my_space']['key'] = 'my-space';
|
|
|
} else if (api_is_student_boss()) {
|
|
|
$navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH) . 'mySpace/student.php';
|
|
|
$navigation['session_my_space']['title'] = get_lang('MySpace');
|
|
@@ -74,22 +74,22 @@ function get_tabs() {
|
|
|
$navigation['session_my_progress']['url'] .= 'auth/my_progress.php';
|
|
|
}
|
|
|
|
|
|
- $navigation['session_my_progress']['title'] = get_lang('MyProgress');
|
|
|
- $navigation['session_my_progress']['key'] = 'my-progress';
|
|
|
+ $navigation['session_my_progress']['title'] = get_lang('MyProgress');
|
|
|
+ $navigation['session_my_progress']['key'] = 'my-progress';
|
|
|
}
|
|
|
|
|
|
|
|
|
if (api_get_setting('allow_social_tool')=='true') {
|
|
|
- $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php';
|
|
|
- $navigation['social']['title'] = get_lang('SocialNetwork');
|
|
|
- $navigation['social']['key'] = 'social-network';
|
|
|
+ $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php';
|
|
|
+ $navigation['social']['title'] = get_lang('SocialNetwork');
|
|
|
+ $navigation['social']['key'] = 'social-network';
|
|
|
}
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
|
|
|
- $navigation['dashboard']['url'] = api_get_path(WEB_CODE_PATH).'dashboard/index.php';
|
|
|
- $navigation['dashboard']['title'] = get_lang('Dashboard');
|
|
|
- $navigation['dashboard']['key'] = 'dashboard';
|
|
|
+ $navigation['dashboard']['url'] = api_get_path(WEB_CODE_PATH).'dashboard/index.php';
|
|
|
+ $navigation['dashboard']['title'] = get_lang('Dashboard');
|
|
|
+ $navigation['dashboard']['key'] = 'dashboard';
|
|
|
}
|
|
|
|
|
|
|
|
@@ -121,6 +121,7 @@ function get_tabs() {
|
|
|
$navigation['platform_admin']['title'] = get_lang('PlatformAdmin');
|
|
|
$navigation['platform_admin']['key'] = 'admin';
|
|
|
}
|
|
|
+
|
|
|
return $navigation;
|
|
|
}
|
|
|
|
|
@@ -129,7 +130,8 @@ function get_tabs() {
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
-function getCustomTabs() {
|
|
|
+function getCustomTabs()
|
|
|
+{
|
|
|
$tableSettingsCurrent = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
|
|
|
$sql = "SELECT * FROM $tableSettingsCurrent
|
|
|
WHERE variable = 'show_tabs' AND
|
|
@@ -144,7 +146,8 @@ function getCustomTabs() {
|
|
|
return $customTabs;
|
|
|
}
|
|
|
|
|
|
-function return_logo($theme) {
|
|
|
+function return_logo($theme)
|
|
|
+{
|
|
|
$_course = api_get_course_info();
|
|
|
$html = '';
|
|
|
$logo = api_get_path(SYS_CSS_PATH).'themes/'.$theme.'/images/header-logo.png';
|
|
@@ -369,7 +372,11 @@ function return_navigation_array()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return array('menu_navigation' => $menu_navigation, 'navigation' => $navigation, 'possible_tabs' => $possible_tabs);
|
|
|
+ return array(
|
|
|
+ 'menu_navigation' => $menu_navigation,
|
|
|
+ 'navigation' => $navigation,
|
|
|
+ 'possible_tabs' => $possible_tabs,
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
function return_menu()
|