1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-17 22:45:54 +02:00

fix for MDL-10835 Results and Preview Tabs broken - requred param 'cmid' missing (for quiz with no questions)

This commit is contained in:
jamiesensei 2007-08-14 02:50:56 +00:00
parent ab3444d79d
commit 9f877cb072
2 changed files with 5 additions and 5 deletions

@ -62,7 +62,7 @@
// if no questions have been set up yet redirect to edit.php
if (!$quiz->questions and has_capability('mod/quiz:manage', $context)) {
redirect('edit.php?quizid=' . $quiz->id);
redirect('edit.php?cmid='.$cm->id);
}
// Get number for the next or unfinished attempt
@ -412,9 +412,9 @@
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
$navlinks[] = array('name' => $strattemptnum, 'link' => '', 'type' => 'title');
$navigation = build_navigation($navlinks);
print_header_simple(format_string($quiz->name), "", $navigation, "", $headtags, true, $strupdatemodule);
}

@ -41,10 +41,10 @@
// if no questions have been set up yet redirect to edit.php
if (!$quiz->questions and has_capability('mod/quiz:manage', $context)) {
redirect('edit.php?quizid='.$quiz->id);
redirect('edit.php?cmid='.$cm->id);
}
// Upgrade any attempts that have not yet been upgraded to the
// Upgrade any attempts that have not yet been upgraded to the
// Moodle 1.5 model (they will not yet have the timestamp set)
if ($attempts = get_records_sql("SELECT a.*".
" FROM {$CFG->prefix}quiz_attempts a, {$CFG->prefix}question_states s".