Browse Source

Fixing bread crumbs

Julio Montoya 14 years ago
parent
commit
b1a133ff49

+ 9 - 2
main/document/document.php

@@ -361,7 +361,11 @@ $image_files_only = '';
 if ($is_certificate_mode) {
     $interbreadcrumb[]= array('url' => '../gradebook/index.php', 'name' => get_lang('Gradebook'));
 } else {
-    $interbreadcrumb[]= array('url' => '', 'name' => get_lang('Documents'));
+    if ( (isset($_GET['id']) && $_GET['id'] != 0) || isset($_GET['curdirpath'])) {
+        $interbreadcrumb[]= array('url' => 'document.php', 'name' => get_lang('Documents'));
+    } else {
+        $interbreadcrumb[]= array('url' => '#', 'name' => get_lang('Documents'));
+    }
 }
 
 // Interbreadcrumb for the current directory root path
@@ -390,6 +394,9 @@ for ($i = 0; $i < $array_len; $i++) {
     if ($is_certificate_mode) {
         $interbreadcrumb[] = array('url' => $url_dir.'&amp;selectcat='.Security::remove_XSS($_GET['selectcat']), 'name' => $url_to_who);
     } else {
+        if( $i == $array_len - 1 && !isset($_GET['createdir']) ) {
+            $url_dir = '#';
+        }
         $interbreadcrumb[] = array('url' => $url_dir, 'name' => $url_to_who);
     }
     //does not repeat the name group in the url
@@ -400,7 +407,7 @@ for ($i = 0; $i < $array_len; $i++) {
 }
 
 if (isset($_GET['createdir'])) {
-    $interbreadcrumb[] = array('url' => '', 'name' => get_lang('CreateDir'));
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
 }
 
 Display::display_header('','Doc');

+ 1 - 1
main/exercice/exercice_submit.php

@@ -421,7 +421,7 @@ if (!empty ($gradebook) && $gradebook == 'view') {
 }
 
 $interbreadcrumb[] = array ("url" => "exercice.php?gradebook=$gradebook",	"name" => get_lang('Exercices'));
-$interbreadcrumb[] = array ("url" => api_get_self()."?gradebook=$gradebook","name" => $objExercise->selectTitle());
+$interbreadcrumb[] = array ("url" => "#","name" => $objExercise->selectTitle());
 
 if ($origin != 'learnpath') { //so we are not in learnpath tool
     //$htmlHeadXtra[] = $objExercise->show_lp_javascript();    

+ 2 - 2
main/exercice/qti2.php

@@ -28,7 +28,7 @@ if (!api_is_allowed_to_edit(null, true)) {
 }
 
 // the breadcrumbs
-$interbreadcrumb[]= array ("url"=>"./exercice.php", "name"=> get_lang('Exercices'));
+$interbreadcrumb[]= array ("url"=>"exercice.php", "name"=> get_lang('Exercices'));
 $is_allowedToEdit = api_is_allowed_to_edit(null, true);
 
 /**
@@ -91,7 +91,7 @@ if ((api_is_allowed_to_edit(null, true))) {
 }
 
 // display header
-Display::display_header($name_tools, get_lang('Exercise'));
+Display::display_header(get_lang('ImportQtiQuiz'), 'Exercises');
 
 // display qti form
 ch_qti2_display_form();

+ 3 - 1
main/exercice/upload_exercise.php

@@ -41,10 +41,12 @@ $htmlHeadXtra[] = "<script type='text/javascript'>
 // Action handling
 lp_upload_quiz_action_handling();
 
+$interbreadcrumb[]= array ("url"=>"exercice.php", "name"=> get_lang('Exercices'));
+
 // Display the header
 if ($origin != 'learnpath') {
     //so we are not in learnpath tool
-    Display :: display_header($nameTools, get_lang('Exercise'));
+    Display :: display_header(get_lang('ImportExcelQuiz'), 'Exercises');
     if (isset ($_GET['message'])) {
         if (in_array($_GET['message'], array ('ExerciseEdited'))) {
             Display :: display_confirmation_message(get_lang($_GET['message']));