[svn r18625] breadcrumd for gradebook in work and learnpath see FS#3696

skala
Carlos Vargas 16 years ago
parent 9ef00d3f6b
commit 2ef8cbe65c
  1. 2
      main/gradebook/lib/be/learnpathlink.class.php
  2. 2
      main/gradebook/lib/be/studentpublicationlink.class.php
  3. 8
      main/newscorm/lp_build.php
  4. 12
      main/work/work.lib.php
  5. 13
      main/work/work.php

@ -175,7 +175,7 @@ class LearnpathLink extends AbstractLink
public function get_link()
{
$url = api_get_path(WEB_PATH)
.'main/newscorm/lp_controller.php?cidReq='.$this->get_course_code();
.'main/newscorm/lp_controller.php?cidReq='.$this->get_course_code().'&gradebook=view';
if (!api_is_allowed_to_create_course()
&& $this->calc_score(api_get_user_id()) == null)
{

@ -253,7 +253,7 @@ class StudentPublicationLink extends AbstractLink
public function get_link() {
$url = api_get_path(WEB_PATH)
.'main/work/work.php?cidReq='.$this->get_course_code();
.'main/work/work.php?cidReq='.$this->get_course_code().'&gradebook=view';
if (!api_is_allowed_to_create_course()
&& $this->calc_score(api_get_user_id()) == null) {
$url .= '&curdirpath=/'.$this->get_ref_id();

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

@ -1,4 +1,4 @@
<?php //$Id: work.lib.php 18439 2009-02-11 17:24:28Z cvargas1 $
<?php //$Id: work.lib.php 18625 2009-02-20 20:18:56Z cvargas1 $
/* For licensing terms, see /dokeos_license.txt */
/**
* @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 Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management
* @version $Id: work.lib.php 18439 2009-02-11 17:24:28Z cvargas1 $
* @version $Id: work.lib.php 18625 2009-02-20 20:18:56Z cvargas1 $
*/
/**
* Displays action links (for admins, authorized groups members and authorized students)
@ -598,7 +598,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[] = '<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.'&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='.$_GET['gradebook'].'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a>'.$add_to_name.'<br>'.$cant_files.' '.$text_file.$dirtext;
} 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;
}
@ -618,7 +618,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
if( $is_allowed_to_edit) {
$action .= '<a href="'.api_get_self().'?cidReq='.api_get_course_id().
'&curdirpath='.$my_sub_dir.'&origin='.$origin.'&edit_dir='.$mydir.'"><img src="../img/edit.gif" alt="'.get_lang('Modify').'" title="'.get_lang('Modify').'"></a>';
'&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>';
$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;
} else {
@ -675,7 +675,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
if( $is_allowed_to_edit) {
$action = '';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&amp;origin='.$origin.'&amp;edit='.$work->id.'&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='.$_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;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') {
@ -687,7 +687,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$row[] = $action;
} elseif($is_author) {
$action = '';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&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='.$_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>';
$row[] = $action;

@ -1,4 +1,4 @@
<?php //$Id: work.php 18439 2009-02-11 17:24:28Z cvargas1 $
<?php //$Id: work.php 18625 2009-02-20 20:18:56Z cvargas1 $
/* For licensing terms, see /dokeos_license.txt */
/**
* @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 Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management
* @version $Id: work.php 18439 2009-02-11 17:24:28Z cvargas1 $
* @version $Id: work.php 18625 2009-02-20 20:18:56Z cvargas1 $
*
* @todo refactor more code into functions, use quickforms, coding standards, ...
*/
@ -247,6 +247,7 @@ if(isset($_GET['action']) && $_GET['action']=="downloadfolder")
Header
-----------------------------------------------------------
*/
isset($_GET['gradebook'])?$gradebook=$_GET['gradebook']:$gradebook='';
if (!empty($_SESSION['toolgroup'])){
$_clean['toolgroup']=(int)$_SESSION['toolgroup'];
@ -300,6 +301,12 @@ if (!empty($_SESSION['toolgroup'])){
if (isset($origin) && $origin != 'learnpath') {
if (isset($_GET['gradebook']) and $_GET['gradebook']=='view'){
$interbreadcrumb[]= array (
'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
'name' => get_lang('Gradebook'));
}
$url_dir ='';
$interbreadcrumb[] = array ('url' => $url_dir,'name' => get_lang('StudentPublications'));
@ -1083,7 +1090,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),'/') . "&origin=$origin", '', 'enctype="multipart/form-data"');
$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"');
if (!empty ($error_message)) {
Display :: display_error_message($error_message);

Loading…
Cancel
Save