[svn r11898] improve breadcrumbs

skala
Eric Marguin 18 years ago
parent fb95e6e19d
commit 16888bf7ea
  1. 6
      main/exercice/exercice.php
  2. 23
      main/exercice/exercise_show.php
  3. 8
      main/mySpace/myStudents.php

@ -24,7 +24,7 @@
* @author Olivier Brouckaert, original author
* @author Denes Nagy, HotPotatoes integration
* @author Wolfgang Schneider, code/html cleanup
* @version $Id: exercice.php 11884 2007-04-05 12:46:00Z elixir_julian $
* @version $Id: exercice.php 11898 2007-04-06 09:06:17Z elixir_inter $
*/
@ -248,9 +248,9 @@ $headers .= 'From: '.$from_name.' <'.$from.'>' . "\r\n";
$headers="From:$from_name\r\nReply-to: $to\r\nContent-type: text/html; charset=iso-8859-15";
//mail($emailid, $subject, $mess,$headers);
if($_GET['origin']=='tests'){
if(in_array($origin, array('tracking_course','user_course'))){
//Redirect to the reporting
header('location: ../mySpace/myStudents.php?student='.$_GET['student'].'&details=true&course='.$_GET['course']);
header('location: ../mySpace/myStudents.php?origin='.$origin.'&student='.$_GET['student'].'&details=true&course='.$_GET['course']);
}
}

@ -105,16 +105,19 @@ if ( empty ( $objExercise ) ) {
$is_allowedToEdit=$is_courseAdmin;
$nameTools=get_lang('CorrectTest');
if($origin=='' || $origin!='tests'){
$interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices'));
$this_section=SECTION_COURSES;
if($origin=='user_course')
{
$interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$_GET['course'], "name" => get_lang("Users"));
$interbreadcrumb[] = array("url" => "../mySpace/myStudents.php?student=".$_GET['student']."&course=".$_course['id']."&details=true&origin=".$_GET['origin'] , "name" => get_lang("DetailsStudentInCourse"));
}
else{
unset($_cid);
else if($origin=='tracking_course')
{
$interbreadcrumb[] = array ("url" => "../mySpace/index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array ("url" => "../mySpace/student.php", "name" => get_lang("MyStudents"));
$interbreadcrumb[] = array ("url" => "../mySpace/myStudents.php?student=".$_GET['student'].'&details=true&course='.$_GET['cidReq'].'', "name" => get_lang("StudentDetails"));
$this_section = "session_my_space";
$interbreadcrumb[] = array ("url" => "../mySpace/myStudents.php?student=".$_GET['student'].'&details=true&origin='.$origin.'&course='.$_GET['cidReq'], "name" => get_lang("DetailsStudentInCourse"));
}
else {
$interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices'));
$this_section=SECTION_COURSES;
}
Display::display_header($nameTools,"Exercise");
@ -858,8 +861,8 @@ $totalWeighting+=$questionWeighting;
?>
<?php
if($origin=='tests'){
echo ' <form name="myform" id="myform" action="exercice.php?show=result&comments=update&exeid='.$id.'&test='.$test.'&emailid='.$emailId.'&origin=tests&student='.$_GET['student'].'&details=true&course='.$_GET['cidReq'].'" method="post">';
if(in_array($origin, array('tracking_course','user_course'))){
echo ' <form name="myform" id="myform" action="exercice.php?show=result&comments=update&exeid='.$id.'&test='.$test.'&emailid='.$emailId.'&origin='.$origin.'&student='.$_GET['student'].'&details=true&course='.$_GET['cidReq'].'" method="post">';
}
else{
echo ' <form name="myform" id="myform" action="exercice.php?show=result&comments=update&exeid='.$id.'&test='.$test.'&emailid='.$emailId.'" method="post">';

@ -32,13 +32,15 @@ $csv_content = array();
if(!empty($_GET['origin']) && $_GET['origin'] == 'user_course')
{
$course_infos = CourseManager :: get_course_information($_GET['course']);
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_infos['directory'], 'name' => $course_infos['title']);
if(empty($cidReq))
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_infos['directory'], 'name' => $course_infos['title']);
$interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$_GET['course'], "name" => get_lang("Users"));
}
else if(!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course')
{
$course_infos = CourseManager :: get_course_information($_GET['course']);
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_infos['directory'], 'name' => $course_infos['title']);
if(empty($cidReq))
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_infos['directory'], 'name' => $course_infos['title']);
$interbreadcrumb[] = array ("url" => "../tracking/courseLog.php?cidReq=".$_GET['course'].'&studentlist=true', "name" => get_lang("Tracking"));
}
else
@ -650,7 +652,7 @@ if(!empty($_GET['student']))
<td align='center'>
";
if($a_essais['essais']>0)
echo '<a href="../exercice/exercise_show.php?id='.$a_exercices['id'].'&cidReq='.$a_infosCours['code'].'&student='.$_GET['student'].'&origin=tests"> <img src="'.api_get_path(WEB_IMG_PATH).'quiz.gif" border="0"> </a>';
echo '<a href="../exercice/exercise_show.php?id='.$a_exercices['id'].'&cidReq='.$a_infosCours['code'].'&student='.$_GET['student'].'&origin='.(empty($_GET['origin']) ? 'tracking' : $_GET['origin']).'"> <img src="'.api_get_path(WEB_IMG_PATH).'quiz.gif" border="0"> </a>';
echo " </td>
</tr>
";

Loading…
Cancel
Save