Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved breadcrumbs on editing pages

  • Loading branch information...
commit 267ef6f28f53d719b857153cb1d9c6214db5a9c9 1 parent 5a96391
gustav_delius authored
Showing with 16 additions and 6 deletions.
  1. +7 −3 mod/quiz/edit.php
  2. +9 −3 mod/quiz/question.php
View
10 mod/quiz/edit.php
@@ -170,16 +170,20 @@
$strediting = get_string(isset($modform->instance) ? "editingquiz" : "editquestions", "quiz");
$strheading = empty($modform->name) ? $strediting : $modform->name;
- print_header_simple($strediting, '',
- "<a href=\"$CFG->wwwroot/mod/quiz/index.php?id=$course->id\">$strquizzes</a> -> $strediting");
-
// Print basic page layout.
if (!isset($modform->instance)) {
+ print_header_simple($strediting, '',
+ "<a href=\"index.php?id=$course->id\">$strquizzes</a>".
+ " -> $strediting");
echo '<table align="center" border="0" cellpadding="2" cellspacing="0">';
echo '<tr><td valign="top">';
} else {
+ print_header_simple($strediting, '',
+ "<a href=\"index.php?id=$course->id\">$strquizzes</a>".
+ " -> <a href=\"view.php?q=$modform->instance\">$modform->name</a>".
+ " -> $strediting");
echo '<table border="0" width="100%" cellpadding="2" cellspacing="0">';
echo '<tr><td width="50%" valign="top">';
print_simple_box_start("center", "100%", $THEME->cellcontent2);
View
12 mod/quiz/question.php
@@ -55,12 +55,18 @@
}
$strquizzes = get_string('modulenameplural', 'quiz');
- $streditingquiz = get_string(isset($SESSION->modform->instance) ? "editingquiz" : "editquestions", "quiz");
- $streditingquestion = get_string("editingquestion", "quiz");
+ if (isset($SESSION->modform->instance)) {
+ $strediting = '<a href="edit.php">'.get_string('editingquiz', 'quiz').'</a> ->'.
+ get_string('editingquestion', 'quiz');
+ } else {
+ $strediting = '<a href="edit.php?courseid='.$course->id.'">'.
+ get_string("editingquestions", "quiz").'</a> -> '.
+ get_string('editingquestion', 'quiz');
+ }
print_header_simple("$streditingquestion", "$streditingquestion",
"<a href=\"$CFG->wwwroot/mod/quiz/index.php?id=$course->id\">$strquizzes</a>".
- " -> <a href=\"edit.php\">$streditingquiz</a> -> $streditingquestion");
+ " -> ".$strediting);
if (isset($delete)) {
if (isset($confirm)) {
Please sign in to comment.
Something went wrong with that request. Please try again.