diff --git a/main/forum/editpost.php b/main/forum/editpost.php index 1e78875541..1e933b85d1 100644 --- a/main/forum/editpost.php +++ b/main/forum/editpost.php @@ -231,11 +231,13 @@ if (!api_is_allowed_to_edit() AND $current_forum['allow_edit']==0) { // action links -echo '
'; -echo ''.search_link().''; -echo ''.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').''; -echo ''.Display::return_icon('forum.gif').' '.get_lang('BackToForum').''; -echo '
'; +if ($origin!='learnpath') { + echo '
'; + echo ''.search_link().''; + echo ''.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').''; + echo ''.Display::return_icon('forum.gif').' '.get_lang('BackToForum').''; + echo '
'; +} /* ----------------------------------------------------------- diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index ecdb369f38..396314ec58 100644 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -1883,7 +1883,7 @@ function show_add_post_form($action='', $id='', $form_values='') { $my_forum = isset($_GET['forum']) ? $_GET['forum']:''; $my_action = isset($_GET['action']) ? $_GET['action']:''; $my_post = isset($_GET['post']) ? $_GET['post']:''; - $my_gradebook = isset($_GET['gradebook']) ? $_GET['gradebook']:''; + $my_gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']):''; $form = new FormValidator('thread', 'post', api_get_self().'?forum='.Security::remove_XSS($my_forum).'&gradebook='.$gradebook.'&thread='.Security::remove_XSS($my_thread).'&post='.Security::remove_XSS($my_post).'&action='.Security::remove_XSS($my_action).'&origin='.$origin); $form->setConstants(array('forum' => '5')); diff --git a/main/forum/viewforum.php b/main/forum/viewforum.php index 9fa0769c36..7caab76d2f 100644 --- a/main/forum/viewforum.php +++ b/main/forum/viewforum.php @@ -308,23 +308,25 @@ if (!empty($message)) { Action Links ----------------------------------------------------------- */ -echo '
'; -if (empty($_SESSION['toolgroup'])){ - echo ''.search_link().''; -} -echo ''.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').''; -// The link should appear when -// 1. the course admin is here -// 2. the course member is here and new threads are allowed -// 3. a visitor is here and new threads AND allowed AND anonymous posts are allowed -if (api_is_allowed_to_edit(false,true) OR ($current_forum['allow_new_threads']==1 AND isset($_user['user_id'])) OR ($current_forum['allow_new_threads']==1 AND !isset($_user['user_id']) AND $current_forum['allow_anonymous']==1)) { - if ($current_forum['locked'] <> 1 AND $current_forum['locked'] <> 1) { - echo ''.Display::return_icon('forumthread_new.gif',get_lang('NewTopic')).' '.get_lang('NewTopic').''; - } else { - echo get_lang('ForumLocked'); +if ($origin!='learnpath') { + echo '
'; + if (empty($_SESSION['toolgroup'])){ + echo ''.search_link().''; + } + echo ''.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').''; + // The link should appear when + // 1. the course admin is here + // 2. the course member is here and new threads are allowed + // 3. a visitor is here and new threads AND allowed AND anonymous posts are allowed + if (api_is_allowed_to_edit(false,true) OR ($current_forum['allow_new_threads']==1 AND isset($_user['user_id'])) OR ($current_forum['allow_new_threads']==1 AND !isset($_user['user_id']) AND $current_forum['allow_anonymous']==1)) { + if ($current_forum['locked'] <> 1 AND $current_forum['locked'] <> 1) { + echo ''.Display::return_icon('forumthread_new.gif',get_lang('NewTopic')).' '.get_lang('NewTopic').''; + } else { + echo get_lang('ForumLocked'); + } } + echo '
'; } -echo '
'; /* ----------------------------------------------------------- diff --git a/main/forum/viewpost.php b/main/forum/viewpost.php index 6914aba531..b7f5a7d913 100644 --- a/main/forum/viewpost.php +++ b/main/forum/viewpost.php @@ -94,12 +94,7 @@ if ($origin=='learnpath') { } else { $interbreadcrumb[]=array("url" => "index.php?gradebook=$gradebook&search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => $nameTools); $interbreadcrumb[]=array("url" => "viewforumcategory.php?forumcategory=".$current_forum_category['cat_id']."&search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => prepare4display($current_forum_category['cat_title'])); - if (isset($_GET['gradebook']) and $_GET['gradebook']=='view') { - $info_thread=get_thread_information(Security::remove_XSS($_GET['thread'])); - $interbreadcrumb[]=array("url" => "viewforum.php?forum=".$info_thread['forum_id']."&origin=".$origin."&search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => prepare4display($current_forum['forum_title'])); - } else { - $interbreadcrumb[]=array("url" => "viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&origin=".$origin."&search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => prepare4display($current_forum['forum_title'])); - } + $interbreadcrumb[]=array("url" => "viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&origin=".$origin."&search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => prepare4display($current_forum['forum_title'])); // the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string Display :: display_header(''); diff --git a/main/forum/viewthread_flat.inc.php b/main/forum/viewthread_flat.inc.php index 7d07b4e9a2..ba30dacd58 100644 --- a/main/forum/viewthread_flat.inc.php +++ b/main/forum/viewthread_flat.inc.php @@ -85,7 +85,7 @@ foreach ($rows as $row) { if( isset($_GET['gradebook'])){ if ($increment>0 && $user_status!=1 ) { $info_thread=get_thread_information(Security::remove_XSS($_GET['thread'])); - echo "".icon('../img/new_test_small.gif',get_lang('Qualify'))."\n"; + echo "".icon('../img/new_test_small.gif',get_lang('Qualify'))."\n"; } } else { if ($increment>0 && $user_status!=1 ) { diff --git a/main/gradebook/lib/be/studentpublicationlink.class.php b/main/gradebook/lib/be/studentpublicationlink.class.php index 416ceee8e5..958fd21522 100644 --- a/main/gradebook/lib/be/studentpublicationlink.class.php +++ b/main/gradebook/lib/be/studentpublicationlink.class.php @@ -255,7 +255,7 @@ class StudentPublicationLink extends AbstractLink public function get_link() { $url = api_get_path(WEB_PATH) - .'main/work/work.php?cidReq='.$this->get_course_code().'&gradebook=view'; + .'main/work/work.php?cidReq='.$this->get_course_code().'&gradebook=view&breadcrumb_gradebook=view&curdirpath='.substr($this->exercise_data['url'], 1); if (!api_is_allowed_to_create_course() && $this->calc_score(api_get_user_id()) == null) { $url .= '&curdirpath=/'.$this->get_ref_id(); diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 2b765f1c0c..06d8aff396 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -2663,10 +2663,11 @@ class learnpath { // build, display if(api_is_allowed_to_edit()) { + $gradebook=Security::remove_XSS($_GET['gradebook']); $html .='
'; //the icon it was removed in display (build) //$html .= "".Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.mb_convert_encoding(get_lang('Build'),$this->encoding,$mych).""; - $html .= "".mb_convert_encoding(get_lang('Build'),$this->encoding,$mych).""; + $html .= "".mb_convert_encoding(get_lang('Build'),$this->encoding,$mych).""; //the icon it was removed in display (organize) //$html .= "".Display::return_icon('learnpath_organize.gif', get_lang('BasicOverview')).' '.mb_convert_encoding(get_lang('BasicOverview'),$this->encoding,$mych).""; $html .= "".mb_convert_encoding(get_lang('BasicOverview'),$this->encoding,$mych).""; @@ -4369,6 +4370,7 @@ class learnpath { { if($this->debug>0){error_log('New LP - In learnpath::overview()',0);} global $charset, $_course; + $_SESSION['gradebook']=Security::remove_XSS($_GET['gradebook']); $return = ''; $tbl_lp_item = Database::get_course_table('lp_item'); @@ -4412,8 +4414,9 @@ class learnpath { if(api_is_allowed_to_edit()) { + $gradebook=Security::remove_XSS($_GET['gradebook']); $return .= '
'; - $return .= ''.Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.get_lang('Build').''; + $return .= ''.Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.get_lang('Build').''; $return .= ''.Display::return_icon('learnpath_organize.gif', get_lang("BasicOverview")).' '.get_lang("BasicOverview").''; @@ -4579,14 +4582,14 @@ class learnpath { * This function builds the action menu * * */ - function build_action_menu() - { + function build_action_menu() { + $gradebook=Security::remove_XSS($_GET['gradebook']); echo ''; } diff --git a/main/newscorm/lp_add.php b/main/newscorm/lp_add.php index c0364f1450..0a3a291f05 100644 --- a/main/newscorm/lp_add.php +++ b/main/newscorm/lp_add.php @@ -107,6 +107,17 @@ $therow=Database::fetch_array($result); - all the functions not available for students - always available in this case (page only shown to admin) ----------------------------------------------------------- */ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} + $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); $interbreadcrumb[]= array ("url"=>"#", "name"=> get_lang("_add_learnpath")); diff --git a/main/newscorm/lp_add_item.php b/main/newscorm/lp_add_item.php index d5c1d7844d..cf18326ddc 100644 --- a/main/newscorm/lp_add_item.php +++ b/main/newscorm/lp_add_item.php @@ -149,6 +149,16 @@ $therow=Database::fetch_array($result); /*================================================== SHOWING THE ADMIN TOOLS ==================================================*/ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); diff --git a/main/newscorm/lp_admin_view.php b/main/newscorm/lp_admin_view.php index 8e58e4323d..1fc9198dd2 100644 --- a/main/newscorm/lp_admin_view.php +++ b/main/newscorm/lp_admin_view.php @@ -120,6 +120,16 @@ $therow=Database::fetch_array($result); /*================================================== prerequisites setting end ==================================================*/ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); diff --git a/main/newscorm/lp_build.php b/main/newscorm/lp_build.php index f37aa10f22..e14e6923f0 100644 --- a/main/newscorm/lp_build.php +++ b/main/newscorm/lp_build.php @@ -143,13 +143,20 @@ $therow=Database::fetch_array($result); /*================================================== prerequisites setting end ==================================================*/ - -if (isset($_GET['gradebook']) and $_GET['gradebook']=='view'){ - $interbreadcrumb[]= array ( - 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], - 'name' => get_lang('Gradebook')); -} - +if (!empty($_GET['gradebook']) && $_GET['gradebook']=='view' ) { + $_SESSION['gradebook']=Security::remove_XSS($_GET['gradebook']); + $gradebook= $_SESSION['gradebook']; +} elseif (empty($_GET['gradebook'])) { + unset($_SESSION['gradebook']); + $gradebook= ''; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[] = array ( + 'url' => '../gradebook/' . $_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); diff --git a/main/newscorm/lp_content.php b/main/newscorm/lp_content.php index 2e8c4fc0bb..abd99dd4ae 100644 --- a/main/newscorm/lp_content.php +++ b/main/newscorm/lp_content.php @@ -75,6 +75,16 @@ if ($dokeos_chapter) { if($debug>0){error_log('New lp - In lp_content.php - File url is '.$src,0);} $_SESSION['oLP']->set_previous_item($lp_item_id); +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} // Define the 'doc.inc.php' as language file $nameTools = $_SESSION['oLP']->get_name(); $interbreadcrumb[]= array ("url"=>"./lp_list.php", "name"=> get_lang('Doc')); diff --git a/main/newscorm/lp_edit.php b/main/newscorm/lp_edit.php index a2e612f4b7..b758ad49e2 100644 --- a/main/newscorm/lp_edit.php +++ b/main/newscorm/lp_edit.php @@ -12,6 +12,17 @@ $show_description_field = false; //for now $nameTools = get_lang("Doc"); event_access_tool(TOOL_LEARNPATH); if (! $is_allowed_in_course) api_not_allowed(); + +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$learnpath_id", "name" => $_SESSION['oLP']->get_name()); diff --git a/main/newscorm/lp_edit_item.php b/main/newscorm/lp_edit_item.php index 74dc131702..131b59ead4 100644 --- a/main/newscorm/lp_edit_item.php +++ b/main/newscorm/lp_edit_item.php @@ -154,6 +154,16 @@ $therow=Database::fetch_array($result); /*================================================== prerequisites setting end ==================================================*/ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); diff --git a/main/newscorm/lp_edit_item_prereq.php b/main/newscorm/lp_edit_item_prereq.php index 53d4d2100a..0dd72cca43 100644 --- a/main/newscorm/lp_edit_item_prereq.php +++ b/main/newscorm/lp_edit_item_prereq.php @@ -123,6 +123,16 @@ $therow=Database::fetch_array($result); /*================================================== prerequisites setting end ==================================================*/ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); diff --git a/main/newscorm/lp_header.php b/main/newscorm/lp_header.php index b865823d66..af31edcfdb 100644 --- a/main/newscorm/lp_header.php +++ b/main/newscorm/lp_header.php @@ -48,6 +48,16 @@ if(!api_is_allowed_to_edit()) //if the user has no edit permission (simple user) $show_link = false; } } +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $header_hide_main_div = true; if($show_link) diff --git a/main/newscorm/lp_list_search.php b/main/newscorm/lp_list_search.php index af5358a891..b03245084a 100644 --- a/main/newscorm/lp_list_search.php +++ b/main/newscorm/lp_list_search.php @@ -14,6 +14,18 @@ $htmlHeadXtra[] = ' '; event_access_tool(TOOL_SEARCH); + +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} + $interbreadcrumb[]= array ("url"=>"./index.php", "name"=> get_lang(ucfirst(TOOL_SEARCH))); search_widget_prepare(&$htmlHeadXtra); Display::display_header(null,'Path'); diff --git a/main/newscorm/lp_move_item.php b/main/newscorm/lp_move_item.php index 2a0c19b3d7..59cf4f1da9 100644 --- a/main/newscorm/lp_move_item.php +++ b/main/newscorm/lp_move_item.php @@ -129,6 +129,16 @@ $therow=Database::fetch_array($result); /*================================================== prerequisites setting end ==================================================*/ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); diff --git a/main/newscorm/lp_view_item.php b/main/newscorm/lp_view_item.php index a43057cd83..775d9dfc3b 100644 --- a/main/newscorm/lp_view_item.php +++ b/main/newscorm/lp_view_item.php @@ -132,6 +132,16 @@ $therow=Database::fetch_array($result); /*================================================== prerequisites setting end ==================================================*/ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); diff --git a/main/newscorm/resourcelinker.php b/main/newscorm/resourcelinker.php index aab97c48a6..0f46ce38b7 100644 --- a/main/newscorm/resourcelinker.php +++ b/main/newscorm/resourcelinker.php @@ -381,6 +381,17 @@ if ($add) By doing this, you can easily control which pages can access the toollinker and which not. ============================================================================== */ +if (isset($_SESSION['gradebook'])){ + $gradebook= $_SESSION['gradebook']; +} + +if (!empty($gradebook) && $gradebook=='view') { + $interbreadcrumb[]= array ( + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'name' => get_lang('Gradebook') + ); +} + if ($_GET["source_id"]) { switch ($_GET["source_id"]) diff --git a/main/work/work.lib.php b/main/work/work.lib.php index f695474a24..6daf282e8e 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 20124 2009-04-27 16:16:59Z juliomontoya $ +* @version $Id: work.lib.php 20164 2009-04-28 21:02:46Z cvargas1 $ */ /** * Displays action links (for admins, authorized groups members and authorized students) @@ -21,20 +21,20 @@ require_once '../inc/lib/fileDisplay.lib.php'; function display_action_links($cur_dir_path, $always_show_tool_options, $always_show_upload_form) { - echo '
'; - - if ($_GET['display_tool_options'] == 'true' OR $_GET['display_upload_form'] == 'true' ) - { - echo ''.Display::return_icon('back.png').' '.get_lang('BackToWorksList').''; - } - + $display_output = ""; isset($_GET['origin'])?$origin = Security::remove_XSS($_GET['origin']):$origin=''; if (strlen($cur_dir_path) > 0 && $cur_dir_path != '/') { $parent_dir = dirname($cur_dir_path); $display_output .= ''.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Up').''; } - + echo '
'; + if ($_GET['display_tool_options'] == 'true' OR $_GET['display_upload_form'] == 'true' ) + { + if ($origin!='learnpath') { + echo ''.Display::return_icon('back.png').' '.get_lang('BackToWorksList').''; + } + } if (! $always_show_tool_options && api_is_allowed_to_edit()) { // Create dir $display_output .= ''.get_lang('CreateDir').' '.get_lang('CreateAssignment').' '; @@ -436,7 +436,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou $form_folder -> addElement('html',' '); @@ -614,7 +614,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou $show_as_icon = get_work_id($mydir); //true or false if ($show_as_icon) { - $row[] = ''.get_lang('Save').''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; + $row[] = ''.get_lang('Save').''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; } else { $row[] = ''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; } @@ -634,7 +634,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou if( $is_allowed_to_edit) { $action .= ''.get_lang('Modify').''; + '&curdirpath='.$my_sub_dir.'&origin='.$origin.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&edit_dir='.$mydir.'">'.get_lang('Modify').''; $action .= ''.get_lang('DirDelete').''; $row[] = $action; } else { @@ -691,7 +691,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou if( $is_allowed_to_edit) { $action = ''; - $action .= ''.get_lang('Modify').''; + $action .= ''.get_lang('Modify').''; $action .= ''.get_lang('WorkDelete').''; $action .= ''.get_lang('Move').''; if($work->accepted == '1') { @@ -703,7 +703,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou $row[] = $action; } elseif($is_author) { $action = ''; - $action .= ''.get_lang('Modify').''; + $action .= ''.get_lang('Modify').''; $action .= ''.get_lang('WorkDelete').''; $row[] = $action; diff --git a/main/work/work.php b/main/work/work.php index cbc11ceb9d..6f84fa2a41 100644 --- a/main/work/work.php +++ b/main/work/work.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.php 20124 2009-04-27 16:16:59Z juliomontoya $ +* @version $Id: work.php 20164 2009-04-28 21:02:46Z cvargas1 $ * * @todo refactor more code into functions, use quickforms, coding standards, ... */ @@ -247,7 +247,7 @@ if(isset($_GET['action']) && $_GET['action']=="downloadfolder") Header ----------------------------------------------------------- */ -isset($_GET['gradebook'])?$gradebook=$_GET['gradebook']:$gradebook=''; +isset($_GET['gradebook'])?$gradebook=Security::remove_XSS($_GET['gradebook']):$gradebook=''; if (!empty($_SESSION['toolgroup'])){ $_clean['toolgroup']=(int)$_SESSION['toolgroup']; @@ -316,7 +316,6 @@ if (!empty($_SESSION['toolgroup'])){ } $url_dir =''; $interbreadcrumb[] = array ('url' => $url_dir,'name' => get_lang('StudentPublications')); - //if (!$display_tool_options && !$display_upload_form) //{ //------interbreadcrumb for the current directory root path @@ -1109,7 +1108,7 @@ if ($is_course_member) { //require_once (api_get_path(LIBRARY_PATH) . 'formvalidator/FormValidator.class.php'); require_once (api_get_path(LIBRARY_PATH) . 'fileDisplay.lib.php'); - $form = new FormValidator('form', 'POST', api_get_self() . "?curdirpath=" . rtrim(Security :: remove_XSS($cur_dir_path),'/') . "&gradebook=".$_GET['gradebook']."&origin=$origin", '', 'enctype="multipart/form-data"'); + $form = new FormValidator('form', 'POST', api_get_self() . "?curdirpath=" . rtrim(Security :: remove_XSS($cur_dir_path),'/') . "&gradebook=".Security::remove_XSS($_GET['gradebook'])."&origin=$origin", '', 'enctype="multipart/form-data"'); // form title if ($edit) @@ -1190,7 +1189,7 @@ if ($is_course_member) { } if (!empty($_POST['submitWork']) || $edit) { - $form->addElement('submit', 'cancelForm', get_lang('Cancel')); + $form->addElement('style_submit_button', 'cancelForm', get_lang('Cancel'),'class="cancel"'); } $form->add_real_progress_bar('uploadWork', 'DownloadFile');