$navigation_item) { if (strstr($navigation_item['link'], '?')) { //link already contains a parameter, add course id parameter with & $parameter_separator = '&'; } else { //link doesn't contain a parameter yet, add course id parameter with ? $parameter_separator = '?'; } $navigation_items[$key]['link'] .= $parameter_separator.api_get_cidreq(); } return $navigation_items; } /** * Show a navigation menu */ function show_navigation_menu() { $navigation_items = get_navigation_items(true); $course_id = api_get_course_id(); if (api_get_setting('show_navigation_menu') == 'icons') { echo '
'; show_navigation_tool_shortcuts($orientation = SHORTCUTS_VERTICAL); echo '
'; } else { echo '
'; ?> '; echo '
'; foreach ($navigation_items as $key => $navigation_item) { //students can't see the course settings option if (!api_is_allowed_to_edit() && $key == 'course_settings') { continue; } echo '
'; $url_item = parse_url($navigation_item['link']); $url_current = parse_url($_SERVER['REQUEST_URI']); if (strpos($navigation_item['link'], 'chat') !== false && api_get_course_setting('allow_open_chat_window', $course_id)) { echo ''; if (api_get_setting('show_navigation_menu') != 'text') { echo '
'.$navigation_item['name'].'
'; } if (api_get_setting('show_navigation_menu') != 'icons') { echo $navigation_item['name']; } echo '
'; echo '
'; echo "\n"; } echo '
'; echo ' '; ?> $navigation_item) { if (strpos($navigation_item['link'],'chat') !== false && api_get_course_setting('allow_open_chat_window')) { echo ''; echo ''.$navigation_item['name'].''; echo ''; if ($orientation == SHORTCUTS_VERTICAL) { echo '
'; } } }