Skip to content

Commit b1a133f

Browse files
committed
Fixing bread crumbs
1 parent 1d3161e commit b1a133f

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

main/document/document.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,11 @@ function confirmation (name) {
361361
if ($is_certificate_mode) {
362362
$interbreadcrumb[]= array('url' => '../gradebook/index.php', 'name' => get_lang('Gradebook'));
363363
} else {
364-
$interbreadcrumb[]= array('url' => '', 'name' => get_lang('Documents'));
364+
if ( (isset($_GET['id']) && $_GET['id'] != 0) || isset($_GET['curdirpath'])) {
365+
$interbreadcrumb[]= array('url' => 'document.php', 'name' => get_lang('Documents'));
366+
} else {
367+
$interbreadcrumb[]= array('url' => '#', 'name' => get_lang('Documents'));
368+
}
365369
}
366370

367371
// Interbreadcrumb for the current directory root path
@@ -390,6 +394,9 @@ function confirmation (name) {
390394
if ($is_certificate_mode) {
391395
$interbreadcrumb[] = array('url' => $url_dir.'&selectcat='.Security::remove_XSS($_GET['selectcat']), 'name' => $url_to_who);
392396
} else {
397+
if( $i == $array_len - 1 && !isset($_GET['createdir']) ) {
398+
$url_dir = '#';
399+
}
393400
$interbreadcrumb[] = array('url' => $url_dir, 'name' => $url_to_who);
394401
}
395402
//does not repeat the name group in the url
@@ -400,7 +407,7 @@ function confirmation (name) {
400407
}
401408

402409
if (isset($_GET['createdir'])) {
403-
$interbreadcrumb[] = array('url' => '', 'name' => get_lang('CreateDir'));
410+
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
404411
}
405412

406413
Display::display_header('','Doc');

main/exercice/exercice_submit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@
421421
}
422422

423423
$interbreadcrumb[] = array ("url" => "exercice.php?gradebook=$gradebook", "name" => get_lang('Exercices'));
424-
$interbreadcrumb[] = array ("url" => api_get_self()."?gradebook=$gradebook","name" => $objExercise->selectTitle());
424+
$interbreadcrumb[] = array ("url" => "#","name" => $objExercise->selectTitle());
425425

426426
if ($origin != 'learnpath') { //so we are not in learnpath tool
427427
//$htmlHeadXtra[] = $objExercise->show_lp_javascript();

main/exercice/qti2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}
2929

3030
// the breadcrumbs
31-
$interbreadcrumb[]= array ("url"=>"./exercice.php", "name"=> get_lang('Exercices'));
31+
$interbreadcrumb[]= array ("url"=>"exercice.php", "name"=> get_lang('Exercices'));
3232
$is_allowedToEdit = api_is_allowed_to_edit(null, true);
3333

3434
/**
@@ -91,7 +91,7 @@ function ch_qti2_import_file($array_file) {
9191
}
9292

9393
// display header
94-
Display::display_header($name_tools, get_lang('Exercise'));
94+
Display::display_header(get_lang('ImportQtiQuiz'), 'Exercises');
9595

9696
// display qti form
9797
ch_qti2_display_form();

main/exercice/upload_exercise.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@
4141
// Action handling
4242
lp_upload_quiz_action_handling();
4343

44+
$interbreadcrumb[]= array ("url"=>"exercice.php", "name"=> get_lang('Exercices'));
45+
4446
// Display the header
4547
if ($origin != 'learnpath') {
4648
//so we are not in learnpath tool
47-
Display :: display_header($nameTools, get_lang('Exercise'));
49+
Display :: display_header(get_lang('ImportExcelQuiz'), 'Exercises');
4850
if (isset ($_GET['message'])) {
4951
if (in_array($_GET['message'], array ('ExerciseEdited'))) {
5052
Display :: display_confirmation_message(get_lang($_GET['message']));

0 commit comments

Comments
 (0)