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