[svn r20164] fixed breadcrumb in gradebook and fixed show links in learnpath see FS#3696 y FS#4083

skala
Carlos Vargas 17 years ago
parent 27f3d537d5
commit 6712e321a2
  1. 12
      main/forum/editpost.php
  2. 2
      main/forum/forumfunction.inc.php
  3. 22
      main/forum/viewforum.php
  4. 5
      main/forum/viewpost.php
  5. 2
      main/forum/viewthread_flat.inc.php
  6. 2
      main/gradebook/lib/be/studentpublicationlink.class.php
  7. 19
      main/newscorm/learnpath.class.php
  8. 11
      main/newscorm/lp_add.php
  9. 10
      main/newscorm/lp_add_item.php
  10. 10
      main/newscorm/lp_admin_view.php
  11. 17
      main/newscorm/lp_build.php
  12. 10
      main/newscorm/lp_content.php
  13. 11
      main/newscorm/lp_edit.php
  14. 10
      main/newscorm/lp_edit_item.php
  15. 10
      main/newscorm/lp_edit_item_prereq.php
  16. 10
      main/newscorm/lp_header.php
  17. 12
      main/newscorm/lp_list_search.php
  18. 10
      main/newscorm/lp_move_item.php
  19. 10
      main/newscorm/lp_view_item.php
  20. 11
      main/newscorm/resourcelinker.php
  21. 28
      main/work/work.lib.php
  22. 11
      main/work/work.php

@ -231,11 +231,13 @@ if (!api_is_allowed_to_edit() AND $current_forum['allow_edit']==0) {
// action links // action links
echo '<div class="actions">'; if ($origin!='learnpath') {
echo '<span style="float:right;">'.search_link().'</span>'; echo '<div class="actions">';
echo '<a href="index.php?gradebook='.$gradebook.'">'.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').'</a>'; echo '<span style="float:right;">'.search_link().'</span>';
echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'">'.Display::return_icon('forum.gif').' '.get_lang('BackToForum').'</a>'; echo '<a href="index.php?gradebook='.$gradebook.'">'.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').'</a>';
echo '</div>'; echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'">'.Display::return_icon('forum.gif').' '.get_lang('BackToForum').'</a>';
echo '</div>';
}
/* /*
----------------------------------------------------------- -----------------------------------------------------------

@ -1883,7 +1883,7 @@ function show_add_post_form($action='', $id='', $form_values='') {
$my_forum = isset($_GET['forum']) ? $_GET['forum']:''; $my_forum = isset($_GET['forum']) ? $_GET['forum']:'';
$my_action = isset($_GET['action']) ? $_GET['action']:''; $my_action = isset($_GET['action']) ? $_GET['action']:'';
$my_post = isset($_GET['post']) ? $_GET['post']:''; $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 = 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')); $form->setConstants(array('forum' => '5'));

@ -308,23 +308,25 @@ if (!empty($message)) {
Action Links Action Links
----------------------------------------------------------- -----------------------------------------------------------
*/ */
echo '<div class="actions">'; if ($origin!='learnpath') {
if (empty($_SESSION['toolgroup'])){ echo '<div class="actions">';
if (empty($_SESSION['toolgroup'])){
echo '<span style="float:right;">'.search_link().'</span>'; echo '<span style="float:right;">'.search_link().'</span>';
} }
echo '<a href="index.php">'.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').'</a>'; echo '<a href="index.php">'.Display::return_icon('back.png').' '.get_lang('BackToForumOverview').'</a>';
// The link should appear when // The link should appear when
// 1. the course admin is here // 1. the course admin is here
// 2. the course member is here and new threads are allowed // 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 // 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 (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) { if ($current_forum['locked'] <> 1 AND $current_forum['locked'] <> 1) {
echo '<a href="newthread.php?'.api_get_cidreq().'&forum='.Security::remove_XSS($my_forum).$origin_string.'">'.Display::return_icon('forumthread_new.gif',get_lang('NewTopic')).' '.get_lang('NewTopic').'</a>'; echo '<a href="newthread.php?'.api_get_cidreq().'&forum='.Security::remove_XSS($my_forum).$origin_string.'">'.Display::return_icon('forumthread_new.gif',get_lang('NewTopic')).' '.get_lang('NewTopic').'</a>';
} else { } else {
echo get_lang('ForumLocked'); echo get_lang('ForumLocked');
} }
}
echo '</div>';
} }
echo '</div>';
/* /*
----------------------------------------------------------- -----------------------------------------------------------

@ -94,12 +94,7 @@ if ($origin=='learnpath') {
} else { } else {
$interbreadcrumb[]=array("url" => "index.php?gradebook=$gradebook&search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => $nameTools); $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']."&amp;search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => prepare4display($current_forum_category['cat_title'])); $interbreadcrumb[]=array("url" => "viewforumcategory.php?forumcategory=".$current_forum_category['cat_id']."&amp;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']."&amp;origin=".$origin."&amp;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'])."&amp;origin=".$origin."&amp;search=".Security::remove_XSS(urlencode($_GET['search'])),"name" => prepare4display($current_forum['forum_title'])); $interbreadcrumb[]=array("url" => "viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&amp;origin=".$origin."&amp;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 // the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
Display :: display_header(''); Display :: display_header('');

@ -85,7 +85,7 @@ foreach ($rows as $row) {
if( isset($_GET['gradebook'])){ if( isset($_GET['gradebook'])){
if ($increment>0 && $user_status!=1 ) { if ($increment>0 && $user_status!=1 ) {
$info_thread=get_thread_information(Security::remove_XSS($_GET['thread'])); $info_thread=get_thread_information(Security::remove_XSS($_GET['thread']));
echo "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$info_thread['forum_id']."&amp;thread=".Security::remove_XSS($_GET['thread'])."&amp;action=list&amp;post=".$row['post_id']."&amp;user=".$row['poster_id']."&user_id=".$row['poster_id']."&origin=".$origin."&idtextqualify=".$current_qualify_thread."&gradebook=".$_GET['gradebook']."\" >".icon('../img/new_test_small.gif',get_lang('Qualify'))."</a>\n"; echo "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$info_thread['forum_id']."&amp;thread=".Security::remove_XSS($_GET['thread'])."&amp;action=list&amp;post=".$row['post_id']."&amp;user=".$row['poster_id']."&user_id=".$row['poster_id']."&origin=".$origin."&idtextqualify=".$current_qualify_thread."&gradebook=".Security::remove_XSS($_GET['gradebook'])."\" >".icon('../img/new_test_small.gif',get_lang('Qualify'))."</a>\n";
} }
} else { } else {
if ($increment>0 && $user_status!=1 ) { if ($increment>0 && $user_status!=1 ) {

@ -255,7 +255,7 @@ class StudentPublicationLink extends AbstractLink
public function get_link() { public function get_link() {
$url = api_get_path(WEB_PATH) $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() if (!api_is_allowed_to_create_course()
&& $this->calc_score(api_get_user_id()) == null) { && $this->calc_score(api_get_user_id()) == null) {
$url .= '&curdirpath=/'.$this->get_ref_id(); $url .= '&curdirpath=/'.$this->get_ref_id();

@ -2663,10 +2663,11 @@ class learnpath {
// build, display // build, display
if(api_is_allowed_to_edit()) if(api_is_allowed_to_edit())
{ {
$gradebook=Security::remove_XSS($_GET['gradebook']);
$html .='<div class="actions_lp">'; $html .='<div class="actions_lp">';
//the icon it was removed in display (build) //the icon it was removed in display (build)
//$html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=build&amp;lp_id=".$this->lp_id."' target='_parent'>".Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.mb_convert_encoding(get_lang('Build'),$this->encoding,$mych)."</a>"; //$html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=build&amp;lp_id=".$this->lp_id."' target='_parent'>".Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.mb_convert_encoding(get_lang('Build'),$this->encoding,$mych)."</a>";
$html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=build&amp;lp_id=".$this->lp_id."' target='_parent'>".mb_convert_encoding(get_lang('Build'),$this->encoding,$mych)."</a>"; $html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;gradebook=$gradebook&amp;action=build&amp;lp_id=".$this->lp_id."' target='_parent'>".mb_convert_encoding(get_lang('Build'),$this->encoding,$mych)."</a>";
//the icon it was removed in display (organize) //the icon it was removed in display (organize)
//$html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=admin_view&amp;lp_id=".$this->lp_id."' target='_parent'>".Display::return_icon('learnpath_organize.gif', get_lang('BasicOverview')).' '.mb_convert_encoding(get_lang('BasicOverview'),$this->encoding,$mych)."</a>"; //$html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=admin_view&amp;lp_id=".$this->lp_id."' target='_parent'>".Display::return_icon('learnpath_organize.gif', get_lang('BasicOverview')).' '.mb_convert_encoding(get_lang('BasicOverview'),$this->encoding,$mych)."</a>";
$html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=admin_view&amp;lp_id=".$this->lp_id."' target='_parent'>".mb_convert_encoding(get_lang('BasicOverview'),$this->encoding,$mych)."</a>"; $html .= "<a href='lp_controller.php?".api_get_cidreq()."&amp;action=admin_view&amp;lp_id=".$this->lp_id."' target='_parent'>".mb_convert_encoding(get_lang('BasicOverview'),$this->encoding,$mych)."</a>";
@ -4369,6 +4370,7 @@ class learnpath {
{ {
if($this->debug>0){error_log('New LP - In learnpath::overview()',0);} if($this->debug>0){error_log('New LP - In learnpath::overview()',0);}
global $charset, $_course; global $charset, $_course;
$_SESSION['gradebook']=Security::remove_XSS($_GET['gradebook']);
$return = ''; $return = '';
$tbl_lp_item = Database::get_course_table('lp_item'); $tbl_lp_item = Database::get_course_table('lp_item');
@ -4412,8 +4414,9 @@ class learnpath {
if(api_is_allowed_to_edit()) if(api_is_allowed_to_edit())
{ {
$gradebook=Security::remove_XSS($_GET['gradebook']);
$return .= '<div class="actions">'; $return .= '<div class="actions">';
$return .= '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=build&amp;lp_id=' . $this->lp_id . '">'.Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.get_lang('Build').'</a>'; $return .= '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;gradebook='.$gradebook.'&amp;action=build&amp;lp_id=' . $this->lp_id . '">'.Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.get_lang('Build').'</a>';
$return .= '<span>'.Display::return_icon('learnpath_organize.gif', get_lang("BasicOverview")).' '.get_lang("BasicOverview").'</span>'; $return .= '<span>'.Display::return_icon('learnpath_organize.gif', get_lang("BasicOverview")).' '.get_lang("BasicOverview").'</span>';
@ -4579,14 +4582,14 @@ class learnpath {
* This function builds the action menu * This function builds the action menu
* *
* */ * */
function build_action_menu() function build_action_menu() {
{ $gradebook=Security::remove_XSS($_GET['gradebook']);
echo '<div class="actions">'; echo '<div class="actions">';
echo '<span>'.Display::return_icon('learnpath_build.gif').' '.get_lang('Build').'</span>'; echo '<span>'.Display::return_icon('learnpath_build.gif').' '.get_lang('Build').'</span>';
echo '<a href="' .api_get_self(). '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.Display::return_icon('learnpath_organize.gif').' '.get_lang("BasicOverview").'</a>'; echo '<a href="' .api_get_self(). '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.Display::return_icon('learnpath_organize.gif').' '.get_lang("BasicOverview").'</a>';
echo '<a href="lp_controller.php?cidReq='.Security::remove_XSS($_GET['cidReq']).'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.Display::return_icon('learnpath_view.gif').' '.get_lang('Display').'</a>'; echo '<a href="lp_controller.php?cidReq='.Security::remove_XSS($_GET['cidReq']).'&amp;gradebook='.$gradebook.'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.Display::return_icon('learnpath_view.gif').' '.get_lang('Display').'</a>';
echo '<a href="' .api_get_self(). '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewChapter").'"><img alt="'.get_lang("NewChapter").'" src="../img/lp_dokeos_chapter_add.png" title="'.get_lang("NewChapter").'" />'.get_lang("NewChapter").'</a>'; echo '<a href="' .api_get_self(). '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewChapter").'"><img alt="'.get_lang("NewChapter").'" src="../img/lp_dokeos_chapter_add.png" title="'.get_lang("NewChapter").'" />'.get_lang("NewChapter").'</a>';
echo '<a href="' .api_get_self(). '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewStep").'"><img alt="'.get_lang("NewStep").'" src="../img/lp_dokeos_step_add.png" title="'.get_lang("NewStep").'" />'.get_lang("NewStep").'</a>'; echo '<a href="' .api_get_self(). '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewStep").'"><img alt="'.get_lang("NewStep").'" src="../img/lp_dokeos_step_add.png" title="'.get_lang("NewStep").'" />'.get_lang("NewStep").'</a>';
echo '</div>'; echo '</div>';
} }

@ -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) - 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"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));
$interbreadcrumb[]= array ("url"=>"#", "name"=> get_lang("_add_learnpath")); $interbreadcrumb[]= array ("url"=>"#", "name"=> get_lang("_add_learnpath"));

@ -149,6 +149,16 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
SHOWING THE ADMIN TOOLS 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"=>"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']}")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));

@ -120,6 +120,16 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
prerequisites setting end 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"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));

@ -143,13 +143,20 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
prerequisites setting end prerequisites setting end
==================================================*/ ==================================================*/
if (!empty($_GET['gradebook']) && $_GET['gradebook']=='view' ) {
if (isset($_GET['gradebook']) and $_GET['gradebook']=='view'){ $_SESSION['gradebook']=Security::remove_XSS($_GET['gradebook']);
$interbreadcrumb[]= array ( $gradebook= $_SESSION['gradebook'];
'url' => '../gradebook/'.$_SESSION['gradebook_dest'], } elseif (empty($_GET['gradebook'])) {
'name' => get_lang('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"=>"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']}")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));

@ -75,6 +75,16 @@ if ($dokeos_chapter) {
if($debug>0){error_log('New lp - In lp_content.php - File url is '.$src,0);} if($debug>0){error_log('New lp - In lp_content.php - File url is '.$src,0);}
$_SESSION['oLP']->set_previous_item($lp_item_id); $_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 // Define the 'doc.inc.php' as language file
$nameTools = $_SESSION['oLP']->get_name(); $nameTools = $_SESSION['oLP']->get_name();
$interbreadcrumb[]= array ("url"=>"./lp_list.php", "name"=> get_lang('Doc')); $interbreadcrumb[]= array ("url"=>"./lp_list.php", "name"=> get_lang('Doc'));

@ -12,6 +12,17 @@ $show_description_field = false; //for now
$nameTools = get_lang("Doc"); $nameTools = get_lang("Doc");
event_access_tool(TOOL_LEARNPATH); event_access_tool(TOOL_LEARNPATH);
if (! $is_allowed_in_course) api_not_allowed(); 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"=>"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()); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$learnpath_id", "name" => $_SESSION['oLP']->get_name());

@ -154,6 +154,16 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
prerequisites setting end 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"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));

@ -123,6 +123,16 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
prerequisites setting end 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"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));

@ -48,6 +48,16 @@ if(!api_is_allowed_to_edit()) //if the user has no edit permission (simple user)
$show_link = false; $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; $header_hide_main_div = true;
if($show_link) if($show_link)

@ -14,6 +14,18 @@ $htmlHeadXtra[] = '
<link rel="stylesheet" type="text/css" href="'. api_get_path(WEB_PATH) .'main/newscorm/lp_list_search.css" /> <link rel="stylesheet" type="text/css" href="'. api_get_path(WEB_PATH) .'main/newscorm/lp_list_search.css" />
'; ';
event_access_tool(TOOL_SEARCH); 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))); $interbreadcrumb[]= array ("url"=>"./index.php", "name"=> get_lang(ucfirst(TOOL_SEARCH)));
search_widget_prepare(&$htmlHeadXtra); search_widget_prepare(&$htmlHeadXtra);
Display::display_header(null,'Path'); Display::display_header(null,'Path');

@ -129,6 +129,16 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
prerequisites setting end 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"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));

@ -132,6 +132,16 @@ $therow=Database::fetch_array($result);
/*================================================== /*==================================================
prerequisites setting end 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"=>"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']}")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));

@ -381,6 +381,17 @@ if ($add)
By doing this, you can easily control which pages can access the toollinker and which not. 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"]) if ($_GET["source_id"])
{ {
switch ($_GET["source_id"]) switch ($_GET["source_id"])

@ -1,4 +1,4 @@
<?php //$Id: work.lib.php 20124 2009-04-27 16:16:59Z juliomontoya $ <?php //$Id: work.lib.php 20164 2009-04-28 21:02:46Z cvargas1 $
/* For licensing terms, see /dokeos_license.txt */ /* For licensing terms, see /dokeos_license.txt */
/** /**
* @package dokeos.work * @package dokeos.work
@ -6,7 +6,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Patrick Cool <patrick.cool@UGent.be>, 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 Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management * @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) * Displays action links (for admins, authorized groups members and authorized students)
@ -21,12 +21,6 @@ require_once '../inc/lib/fileDisplay.lib.php';
function display_action_links($cur_dir_path, $always_show_tool_options, $always_show_upload_form) function display_action_links($cur_dir_path, $always_show_tool_options, $always_show_upload_form)
{ {
echo '<div class="actions">';
if ($_GET['display_tool_options'] == 'true' OR $_GET['display_upload_form'] == 'true' )
{
echo '<a href="work.php">'.Display::return_icon('back.png').' '.get_lang('BackToWorksList').'</a>';
}
$display_output = ""; $display_output = "";
isset($_GET['origin'])?$origin = Security::remove_XSS($_GET['origin']):$origin=''; isset($_GET['origin'])?$origin = Security::remove_XSS($_GET['origin']):$origin='';
@ -34,7 +28,13 @@ function display_action_links($cur_dir_path, $always_show_tool_options, $always_
$parent_dir = dirname($cur_dir_path); $parent_dir = dirname($cur_dir_path);
$display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&curdirpath='.$parent_dir.'">'.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Up').'</a>'; $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&curdirpath='.$parent_dir.'">'.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Up').'</a>';
} }
echo '<div class="actions">';
if ($_GET['display_tool_options'] == 'true' OR $_GET['display_upload_form'] == 'true' )
{
if ($origin!='learnpath') {
echo '<a href="work.php">'.Display::return_icon('back.png').' '.get_lang('BackToWorksList').'</a>';
}
}
if (! $always_show_tool_options && api_is_allowed_to_edit()) { if (! $always_show_tool_options && api_is_allowed_to_edit()) {
// Create dir // Create dir
$display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;toolgroup='.$_GET['toolgroup'].'&amp;curdirpath='.$cur_dir_path.'&amp;createdir=1&origin='.$origin.'"><img src="../img/folder_new.gif" border="0" alt="'.get_lang('CreateDir').'" title ="'.get_lang('CreateDir').'" /> '.get_lang('CreateAssignment').' </a>'; $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;toolgroup='.$_GET['toolgroup'].'&amp;curdirpath='.$cur_dir_path.'&amp;createdir=1&origin='.$origin.'"><img src="../img/folder_new.gif" border="0" alt="'.get_lang('CreateDir').'" title ="'.get_lang('CreateDir').'" /> '.get_lang('CreateAssignment').' </a>';
@ -436,7 +436,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$form_folder -> addElement('html','<div class="row"> $form_folder -> addElement('html','<div class="row">
<div class="label">&nbsp;</div> <div class="label">&nbsp;</div>
<div class="formw"> <div class="formw">
<a href="javascript://" onclick=" return plus();" ><span id="plus">&nbsp;<img src="../img/nolines_plus.gif" alt="" />&nbsp;'.get_lang('AdvancedParameters').'</span></a> <a href="javascript://" onclick=" return plus();" ><span id="plus">&nbsp;<img src="../img/div_show.gif" alt="" />&nbsp;'.get_lang('AdvancedParameters').'</span></a>
</div> </div>
</div> '); </div> ');
@ -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 $show_as_icon = get_work_id($mydir); //true or false
if ($show_as_icon) { if ($show_as_icon) {
$row[] = '<a href="'.api_get_self().'?cidReq='.api_get_course_id().'&action=downloadfolder&path=/'.$mydir.'"><img src="../img/zip_save.gif" style="float:right;" alt="'.get_lang('Save').'" title="'.get_lang('Save').'" width="17" height="17"/></a><a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&gradebook='.$_GET['gradebook'].'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a>'.$add_to_name.'<br>'.$cant_files.' '.$text_file.$dirtext; $row[] = '<a href="'.api_get_self().'?cidReq='.api_get_course_id().'&action=downloadfolder&path=/'.$mydir.'"><img src="../img/zip_save.gif" style="float:right;" alt="'.get_lang('Save').'" title="'.get_lang('Save').'" width="17" height="17"/></a><a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a>'.$add_to_name.'<br>'.$cant_files.' '.$text_file.$dirtext;
} else { } else {
$row[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a>'.$add_to_name.'<br>'.$cant_files.' '.$text_file.$dirtext; $row[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a>'.$add_to_name.'<br>'.$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) { if( $is_allowed_to_edit) {
$action .= '<a href="'.api_get_self().'?cidReq='.api_get_course_id(). $action .= '<a href="'.api_get_self().'?cidReq='.api_get_course_id().
'&curdirpath='.$my_sub_dir.'&origin='.$origin.'&gradebook='.$_GET['gradebook'].'&edit_dir='.$mydir.'"><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>'; '&curdirpath='.$my_sub_dir.'&origin='.$origin.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&edit_dir='.$mydir.'"><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&delete_dir='.$mydir.'&delete2='.$id2.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('DirDelete').'" ><img src="'.api_get_path(WEB_IMG_PATH).'delete.gif" alt="'.get_lang('DirDelete').'" title="'.get_lang('DirDelete').'"></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&delete_dir='.$mydir.'&delete2='.$id2.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('DirDelete').'" ><img src="'.api_get_path(WEB_IMG_PATH).'delete.gif" alt="'.get_lang('DirDelete').'" title="'.get_lang('DirDelete').'"></a>';
$row[] = $action; $row[] = $action;
} else { } else {
@ -691,7 +691,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
if( $is_allowed_to_edit) { if( $is_allowed_to_edit) {
$action = ''; $action = '';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;edit='.$work->id.'&gradebook='.$_GET['gradebook'].'&amp;parent_id='.$work->parent_id.'" title="'.get_lang('Modify').'" ><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;edit='.$work->id.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;parent_id='.$work->parent_id.'" title="'.get_lang('Modify').'" ><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;delete='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('WorkDelete').'" ><img src="../img/delete.gif" alt="'.get_lang('WorkDelete').'" title="'.get_lang('WorkDelete').'"></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;delete='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('WorkDelete').'" ><img src="../img/delete.gif" alt="'.get_lang('WorkDelete').'" title="'.get_lang('WorkDelete').'"></a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;move='.$work->id.'" title="'.get_lang('Move').'"><img src="../img/deplacer_fichier.gif" border="0" title="'.get_lang('Move').'" alt="'.get_lang('Move').'" /></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;move='.$work->id.'" title="'.get_lang('Move').'"><img src="../img/deplacer_fichier.gif" border="0" title="'.get_lang('Move').'" alt="'.get_lang('Move').'" /></a>';
if($work->accepted == '1') { if($work->accepted == '1') {
@ -703,7 +703,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$row[] = $action; $row[] = $action;
} elseif($is_author) { } elseif($is_author) {
$action = ''; $action = '';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&gradebook='.$_GET['gradebook'].'&amp;origin='.$origin.'&amp;edit='.$work->id.'" title="'.get_lang('Modify').'" ><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;origin='.$origin.'&amp;edit='.$work->id.'" title="'.get_lang('Modify').'" ><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;delete='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('WorkDelete').'" ><img src="../img/delete.gif" alt="'.get_lang('WorkDelete').'" title="'.get_lang('WorkDelete').'" ></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;delete='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('WorkDelete').'" ><img src="../img/delete.gif" alt="'.get_lang('WorkDelete').'" title="'.get_lang('WorkDelete').'" ></a>';
$row[] = $action; $row[] = $action;

@ -1,4 +1,4 @@
<?php //$Id: work.php 20124 2009-04-27 16:16:59Z juliomontoya $ <?php //$Id: work.php 20164 2009-04-28 21:02:46Z cvargas1 $
/* For licensing terms, see /dokeos_license.txt */ /* For licensing terms, see /dokeos_license.txt */
/** /**
* @package dokeos.work * @package dokeos.work
@ -6,7 +6,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Patrick Cool <patrick.cool@UGent.be>, 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 Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management * @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, ... * @todo refactor more code into functions, use quickforms, coding standards, ...
*/ */
@ -247,7 +247,7 @@ if(isset($_GET['action']) && $_GET['action']=="downloadfolder")
Header Header
----------------------------------------------------------- -----------------------------------------------------------
*/ */
isset($_GET['gradebook'])?$gradebook=$_GET['gradebook']:$gradebook=''; isset($_GET['gradebook'])?$gradebook=Security::remove_XSS($_GET['gradebook']):$gradebook='';
if (!empty($_SESSION['toolgroup'])){ if (!empty($_SESSION['toolgroup'])){
$_clean['toolgroup']=(int)$_SESSION['toolgroup']; $_clean['toolgroup']=(int)$_SESSION['toolgroup'];
@ -316,7 +316,6 @@ if (!empty($_SESSION['toolgroup'])){
} }
$url_dir =''; $url_dir ='';
$interbreadcrumb[] = array ('url' => $url_dir,'name' => get_lang('StudentPublications')); $interbreadcrumb[] = array ('url' => $url_dir,'name' => get_lang('StudentPublications'));
//if (!$display_tool_options && !$display_upload_form) //if (!$display_tool_options && !$display_upload_form)
//{ //{
//------interbreadcrumb for the current directory root path //------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) . 'formvalidator/FormValidator.class.php');
require_once (api_get_path(LIBRARY_PATH) . 'fileDisplay.lib.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 // form title
if ($edit) if ($edit)
@ -1190,7 +1189,7 @@ if ($is_course_member) {
} }
if (!empty($_POST['submitWork']) || $edit) { 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'); $form->add_real_progress_bar('uploadWork', 'DownloadFile');

Loading…
Cancel
Save