MDL-10857 broken link in navlinks for question bank pointing to mod/modname/view.php with cmid param instead of id param

This commit is contained in:
jamiesensei 2007-08-15 11:36:01 +00:00
parent 66ef0471ae
commit 0cbddd850b
5 changed files with 6 additions and 8 deletions

View File

@ -75,23 +75,21 @@
} elseif ((!empty($param->delete) and (!$questionstomove) and confirm_sesskey())) {
$qcobject->delete_category($param->delete);//delete the category now no questions to move
}
$crumbs = array();
$navlinks = array();
if ($cm!==null) {
// Page header
$strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest())
? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
: "";
$navlinks = array();
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname),
'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$COURSE->id",
'type' => 'activity');
$navlinks[] = array('name' => format_string($module->name),
'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}",
'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?id={$cm->id}",
'type' => 'title');
} else {
// Print basic page layout.
$strupdatemodule = '';
$navlinks = array();
}
if (!$param->edit){

View File

@ -26,7 +26,7 @@
: "";
$navlinks = array();
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$COURSE->id", 'type' => 'activity');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?id={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
$navigation = build_navigation($navlinks);
print_header_simple($streditingquestions, '', $navigation, "", "", true, $strupdatemodule);

View File

@ -51,7 +51,7 @@
: "";
$navlinks = array();
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$COURSE->id", 'type' => 'activity');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?id={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => $txt->exportquestions, 'link' => '', 'type' => 'title');
$navigation = build_navigation($navlinks);
print_header_simple($txt->exportquestions, '', $navigation, "", "", true, $strupdatemodule);

View File

@ -60,7 +60,7 @@
: "";
$navlinks = array();
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$COURSE->id", 'type' => 'activity');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?id={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => $txt->importquestions, 'link' => '', 'type' => 'title');
$navigation = build_navigation($navlinks);
print_header_simple($txt->importquestions, '', $navigation, "", "", true, $strupdatemodule);

View File

@ -203,7 +203,7 @@ if ($mform->is_cancelled()){
: "";
$navlinks = array();
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$cm->course", 'type' => 'activity');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?id={$cm->id}", 'type' => 'title');
$navlinks[] = array('name' => get_string('editingquiz', 'quiz'), 'link' => $returnurl, 'type' => 'title');
$navlinks[] = array('name' => $streditingquestion, 'link' => '', 'type' => 'title');
$navigation = build_navigation($navlinks);