diff --git a/main/document/downloadfolder.inc.php b/main/document/downloadfolder.inc.php index a675b1cac6..35abae1bc4 100755 --- a/main/document/downloadfolder.inc.php +++ b/main/document/downloadfolder.inc.php @@ -158,7 +158,9 @@ event_download(($path=='/')?'documents.zip (folder)':basename($path).'.zip (fold //start download of created file //send_file_to_client($temp_zip_file, basename(empty($_GET['id'])?"documents":$_GET['id']).".zip"); $name = ($path=='/')?'documents.zip':basename($path).'.zip'; + DocumentManager::file_send_for_download($temp_zip_file,true,$name); +@unlink($temp_zip_file); exit; /** diff --git a/main/inc/tool_navigation_menu.inc.php b/main/inc/tool_navigation_menu.inc.php index 8096b0fdd9..26175e7e1f 100755 --- a/main/inc/tool_navigation_menu.inc.php +++ b/main/inc/tool_navigation_menu.inc.php @@ -1,29 +1,6 @@ $navigation_item) - { - if (strstr($navigation_item['link'], '?')) - { + foreach($navigation_items as $key => $navigation_item) { + if (strstr($navigation_item['link'], '?')) { //link already contains a parameter, add course id parameter with & $parameter_separator = '&'; - } - else - { + } else { //link doesn't contain a parameter yet, add course id parameter with ? $parameter_separator = '?'; } @@ -141,14 +112,11 @@ function show_navigation_menu() { $navigation_items = get_navigation_items(true); $course_id = api_get_course_id(); - if(api_get_setting('show_navigation_menu') == 'icons') - { + if(api_get_setting('show_navigation_menu') == 'icons') { echo '
'; show_navigation_tool_shortcuts($orientation = SHORTCUTS_VERTICAL); echo '
'; - } - else - { + } else { echo '
'; ?> '; - echo '
'; - foreach ($navigation_items as $key => $navigation_item) - { + 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)==true) - { + if (strpos($navigation_item['link'],'chat')!==false && api_get_course_setting('allow_open_chat_window',$course_id)==true) { echo '