[svn r20227] completing beradcrumb in gradebook see FS#3696

skala
Carlos Vargas 16 years ago
parent 7e655913f7
commit 80275405ca
  1. 23
      main/exercice/exercice_submit.php
  2. 3
      main/gradebook/exercise_jump.php
  3. 6
      main/work/work.lib.php
  4. 26
      main/work/work.php

@ -1,4 +1,4 @@
<?php // $Id: exercice_submit.php 20200 2009-04-29 22:14:55Z cvargas1 $
<?php // $Id: exercice_submit.php 20227 2009-04-30 16:40:35Z cvargas1 $
/*
==============================================================================
@ -42,7 +42,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert
* @author Julio Montoya multiple fill in blank option added
* @version $Id: exercice_submit.php 20200 2009-04-29 22:14:55Z cvargas1 $
* @version $Id: exercice_submit.php 20227 2009-04-30 16:40:35Z cvargas1 $
*/
@ -702,20 +702,23 @@ if(!$questionNum || $_POST['questionNum']) {
}
}
if (isset($_SESSION['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' => '../gradebook/' . $_SESSION['gradebook_dest'],
'name' => get_lang('Gradebook')
);
}
//$nameTools=get_lang('Exercice');
$interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices'));
$interbreadcrumb[]=array("url" => "exercice.php?gradebook=$gradebook","name" => get_lang('Exercices'));
$interbreadcrumb[]=array("url" => "#","name" => $exerciseTitle);
if ($origin != 'learnpath') { //so we are not in learnpath tool

@ -41,6 +41,7 @@ $course_code = api_get_course_id();
$course_info = Database::get_course_info($course_code);
$course_title = $course_info['title'];
$course_code = $return_result['code'];
$gradebook=Security::remove_XSS($_GET['gradebook']);
$dbname = $course_info['db_name'];
@ -48,7 +49,7 @@ $_course['name'] = $course_title;
$_course['official_code'] = $course_code;
if (isset($_GET['doexercise'])) {
header('Location: ../exercice/exercice_submit.php?cidReq='.$cidReq.'&origin=&learnpath_id=&learnpath_item_id=&exerciseId='.Security::remove_XSS($_GET['doexercise']));
header('Location: ../exercice/exercice_submit.php?cidReq='.$cidReq.'&gradebook='.$gradebook.'&origin=&learnpath_id=&learnpath_item_id=&exerciseId='.Security::remove_XSS($_GET['doexercise']));
exit;
} else {
if (isset($_GET['gradebook'])) {

@ -1,4 +1,4 @@
<?php //$Id: work.lib.php 20209 2009-04-30 00:11:19Z cvargas1 $
<?php //$Id: work.lib.php 20227 2009-04-30 16:40:35Z 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 20209 2009-04-30 00:11:19Z cvargas1 $
* @version $Id: work.lib.php 20227 2009-04-30 16:40:35Z cvargas1 $
*/
/**
* Displays action links (for admins, authorized groups members and authorized students)
@ -32,7 +32,7 @@ function display_action_links($cur_dir_path, $always_show_tool_options, $always_
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>';
echo '<a href="work.php?gradebook='.$gradebook.'">'.Display::return_icon('back.png').' '.get_lang('BackToWorksList').'</a>';
}
}
if (! $always_show_tool_options && api_is_allowed_to_edit()) {

@ -1,4 +1,4 @@
<?php //$Id: work.php 20209 2009-04-30 00:11:19Z cvargas1 $
<?php //$Id: work.php 20227 2009-04-30 16:40:35Z 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 20209 2009-04-30 00:11:19Z cvargas1 $
* @version $Id: work.php 20227 2009-04-30 16:40:35Z cvargas1 $
*
* @todo refactor more code into functions, use quickforms, coding standards, ...
*/
@ -249,7 +249,7 @@ if(isset($_GET['action']) && $_GET['action']=="downloadfolder")
*/
if (isset($_GET['gradebook']) && $_GET['gradebook']='view' ) {
if (!empty($_GET['gradebook']) && $_GET['gradebook']='view' ) {
$_SESSION['gradebook']=Security::remove_XSS($_GET['gradebook']);
$gradebook= $_SESSION['gradebook'];
} elseif (empty($_GET['gradebook'])) {
@ -278,13 +278,13 @@ if (!empty($_SESSION['toolgroup'])){
//------interbreadcrumb for the current directory root path
$dir_array = explode("/", $cur_dir_path);
$array_len = count($dir_array);
/*
if ($array_len > 0) {
$url_dir = 'work.php?&curdirpath=/';
$interbreadcrumb[] = array (
'url' => $url_dir,
'name' => get_lang('HomeDirectory'));
}
}*/
$dir_acum = '';
for ($i = 0; $i < $array_len; $i++) {
@ -323,23 +323,23 @@ if (!empty($_SESSION['toolgroup'])){
if (isset($origin) && $origin != 'learnpath') {
$url_dir ='';
$interbreadcrumb[] = array ('url' => $url_dir,'name' => get_lang('StudentPublications'));
$interbreadcrumb[] = array ('url' => $url_dir.'?gradebook='.$gradebook,'name' => get_lang('StudentPublications'));
//if (!$display_tool_options && !$display_upload_form)
//{
//------interbreadcrumb for the current directory root path
$dir_array = explode("/", $cur_dir_path);
$array_len = count($dir_array);
if ($array_len > 0) {
$url_dir = 'work.php?&curdirpath=/';
/*if ($array_len > 0) {
$url_dir = 'work.php?gradebook='.$gradebook.'&curdirpath=/';
$interbreadcrumb[] = array (
'url' => $url_dir,
'name' => get_lang('HomeDirectory'));
}
}*/
$dir_acum = '';
for ($i = 0; $i < $array_len; $i++) {
$url_dir = 'work.php?&curdirpath=' . $dir_acum . $dir_array[$i];
$url_dir = 'work.php?gradebook='.$gradebook.'&curdirpath=' . $dir_acum . $dir_array[$i];
$interbreadcrumb[] = array (
'url' => $url_dir,
'name' => $dir_array[$i]
@ -350,19 +350,19 @@ if (!empty($_SESSION['toolgroup'])){
if ($display_upload_form) {
$interbreadcrumb[] = array (
"url" => "work.php",
"url" => "work.php?gradebook=$gradebook",
"name" => get_lang('UploadADocument'));
}
if ($display_tool_options) {
$interbreadcrumb[] = array (
"url" => "work.php",
"url" => "work.php?gradebook=$gradebook",
"name" => get_lang('EditToolOptions'));
}
if ($_GET['createdir'] == 1)
{
$interbreadcrumb[] = array (
"url" => "work.php",
"url" => "work.php?gradebook=$gradebook",
"name" => get_lang('CreateDir'));
}

Loading…
Cancel
Save