";
}
elseif (isset ($nameTools) && $language_file != 'course_home')
{
//Put the name of the user-tools in the header
if (!isset ($_user['user_id']))
{
echo " ";
}
elseif(!$noPHP_SELF)
{
echo "
';
if ((api_get_setting('showonline','world') == "true" AND !$_user['user_id']) OR (api_get_setting('showonline','users') == "true" AND $_user['user_id']) OR (api_get_setting('showonline','course') == "true" AND $_user['user_id'] AND $_cid))
{
if(api_get_setting("use_session_mode") == "true" && isset($_user['user_id']) && api_is_coach())
{
echo "
".get_lang('UsersOnline').": ";
// Display the who's online of the platform
if ((api_get_setting('showonline','world') == "true" AND !$_user['user_id']) OR (api_get_setting('showonline','users') == "true" AND $_user['user_id']))
{
echo "".$number."";
}
// Display the who's online for the course
if ($_course AND api_get_setting('showonline','course') == "true")
{
echo "($number_online_in_course ".get_lang('InThisCourse').")";
}
echo '
';
}
if ($_user['user_id'])
{
if (api_is_course_admin() && api_get_setting('show_student_view') == 'true')
{
echo '
\n";
$navigation = array();
// Link to campus homepage
$navigation[SECTION_CAMPUS]['url'] = api_get_path(WEB_PATH).'index.php';
$navigation[SECTION_CAMPUS]['title'] = get_lang('CampusHomepage');
if ($_user['user_id'])
{
if(api_get_setting('use_session_mode')=='true')
{
if(api_is_allowed_to_create_course())
{
// Link to my courses for teachers
$navigation['mycourses']['url'] = api_get_path(WEB_PATH).'user_portal.php?nosession=true';
$navigation['mycourses']['title'] = get_lang('MyCourses');
}
else
{
// Link to my courses for students
$navigation['mycourses']['url'] = api_get_path(WEB_PATH).'user_portal.php';
$navigation['mycourses']['title'] = get_lang('MyCourses');
}
// Link to active sessions
//$navigation[SECTION_ACTIVESESSIONS]['url'] = api_get_path(WEB_PATH).'user_portal.php';
//$navigation[SECTION_ACTIVESESSIONS]['title'] = get_lang('myActiveSessions');
// Link to inactive sessions
//$navigation[SECTION_INACTIVESESSIONS]['url'] = api_get_path(WEB_PATH).'user_portal.php?inactives';
//$navigation[SECTION_INACTIVESESSIONS]['title'] = get_lang('myInActiveSessions');
}
else
{
// Link to my courses
$navigation['mycourses']['url'] = api_get_path(WEB_PATH).'user_portal.php';
$navigation['mycourses']['title'] = get_lang('MyCourses');
}
//NOW IN THE RIGHT MENU IN "MY COURSES"
/*
// Link to my profile
$navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' );
$navigation['myprofile']['title'] = get_lang('ModifyProfile');
// Link to my agenda
$navigation['myagenda']['url'] = api_get_path(WEB_CODE_PATH).'calendar/myagenda.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' );
$navigation['myagenda']['title'] = get_lang('MyAgenda');*/
//if(api_get_setting('use_session_mode')=='true'){
if(api_is_allowed_to_create_course())
{
// Link to my space
$navigation['session_my_space']['url'] = api_get_path(WEB_PATH).'main/mySpace/';
$navigation['session_my_space']['title'] = get_lang('MySpace');
}
if(!api_is_allowed_to_create_course())
{
// Link to my progress
$navigation['session_my_progress']['url'] = api_get_path(WEB_PATH).'main/auth/my_progress.php';
$navigation['session_my_progress']['title'] = get_lang('MyProgress');
}
//}
if (api_is_platform_admin())
{
// Link to platform admin
$navigation['platform_admin']['url'] = $rootAdminWeb;
$navigation['platform_admin']['title'] = get_lang('PlatformAdmin');
}
}
foreach($navigation as $section => $navigation_info)
{
$current = ($section == $GLOBALS['this_section'] ? ' id="current"' : '');
echo '
';
require_once('tool_navigation_menu.inc.php');
show_navigation_tool_shortcuts();
echo '';
}
if (isset ($dokeos_database_connection))
{
// connect to the main database.
// if single database, don't pefix table names with the main database name in SQL queries
// (ex. SELECT * FROM `table`)
// if multiple database, prefix table names with the course database name in SQL queries (or no prefix if the table is in
// the main database)
// (ex. SELECT * FROM `table_from_main_db` - SELECT * FROM `courseDB`.`table_from_course_db`)
mysql_select_db($_configuration['main_database'], $dokeos_database_connection);
}
?>