// 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
$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);
}
// 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".