course)) { error("Course is misconfigured"); } if (! $quiz = get_record("quiz", "id", $cm->instance)) { error("Course module is incorrect"); } } else { if (! $quiz = get_record("quiz", "id", $q)) { error("Course module is incorrect"); } if (! $course = get_record("course", "id", $quiz->course)) { error("Course is misconfigured"); } if (! $cm = get_coursemodule_from_instance("quiz", $quiz->id, $course->id)) { error("Course Module ID was incorrect"); } } require_login($course->id); if (!isteacher($course->id)) { error("You are not allowed to use this script"); } add_to_log($course->id, "quiz", "report", "report.php?id=$cm->id", "$quiz->id", "$cm->id"); /// Print the page header if (empty($noheader)) { if ($course->category) { $navigation = "id\">$course->shortname ->"; } $strquizzes = get_string("modulenameplural", "quiz"); $strquiz = get_string("modulename", "quiz"); $strreport = get_string("report", "quiz"); print_header("$course->shortname: $quiz->name", "$course->fullname", "$navigation id>$strquizzes -> id\">$quiz->name -> $strreport", "", "", true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm)); print_heading($quiz->name); /// Print list of available quiz reports $allreports = get_list_of_plugins("mod/quiz/report"); $reportlist = array ("overview", "regrade"); // Standard reports we want to show first foreach ($allreports as $report) { if (!in_array($report, $reportlist)) { $reportlist[] = $report; } } echo "
$strreport | "; } else { echo "id&mode=$report\">$strreport | "; } } echo "