From cb31c654b9af9163fb9bbd071cf77a8a2696cef7 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Mon, 26 Jan 2009 20:36:45 +0100 Subject: [PATCH] [svn r18007] Minor - Logic change - teacher can see upload button in Assignments now - see FS#3534 --- main/work/work.lib.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/main/work/work.lib.php b/main/work/work.lib.php index 15bf0f0f2c..be6b1383f5 100644 --- a/main/work/work.lib.php +++ b/main/work/work.lib.php @@ -1,4 +1,4 @@ -, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Roan Embrechts, code refactoring and virtual course support * @author Frederic Vauthier, directories management -* @version $Id: work.lib.php 17989 2009-01-25 05:51:54Z yannoo $ +* @version $Id: work.lib.php 18007 2009-01-26 19:36:45Z cfasanando $ */ /** * Displays action links (for admins, authorized groups members and authorized students) @@ -19,7 +19,6 @@ require_once '../document/document.inc.php'; require_once '../inc/lib/fileDisplay.lib.php'; - function display_action_links($cur_dir_path, $always_show_tool_options, $always_show_upload_form) { echo '
'; @@ -29,21 +28,19 @@ function display_action_links($cur_dir_path, $always_show_tool_options, $always_ $parent_dir = dirname($cur_dir_path); $display_output .= ''.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Up').'  '; } - - if (! $always_show_upload_form ) { - $user_info = api_get_user_info(); - $user_status = $user_info['status']; - if ($user_status != 1) { - $display_output .= "  ".Display::return_icon('submit_file.gif', get_lang("UploadADocument"))." ". get_lang("UploadADocument") .'    '; - } - } - + if (! $always_show_tool_options && api_is_allowed_to_edit()) { // Create dir $display_output .= ''.get_lang('CreateDir').' '.get_lang('CreateDir').'   '; // Options $display_output .= "".Display::return_icon('acces_tool.gif', get_lang("EditToolOptions")).' ' . get_lang("EditToolOptions") . "  "; } + + if (! $always_show_upload_form ) { + + $display_output .= "  ".Display::return_icon('submit_file.gif', get_lang("UploadADocument"))." ". get_lang("UploadADocument") .'    '; + + } if ($display_output != "") {