MDL-11517 reserved word MOD used in table alias in questions backup code
[moodle-pu.git] / mod / quiz / report / default.php
blob612069c16b28dfff83b936dacea6b313d859c0fb
1 <?php // $Id$
3 ////////////////////////////////////////////////////////////////////
4 /// Default class for report plugins
5 ///
6 /// Doesn't do anything on it's own -- it needs to be extended.
7 /// This class displays quiz reports. Because it is called from
8 /// within /mod/quiz/report.php you can assume that the page header
9 /// and footer are taken care of.
10 ///
11 /// This file can refer to itself as report.php to pass variables
12 /// to itself - all these will also be globally available. You must
13 /// pass "id=$cm->id" or q=$quiz->id", and "mode=reportname".
14 ////////////////////////////////////////////////////////////////////
16 // Included by ../report.php
18 class quiz_default_report {
20 function display($cm, $course, $quiz) { /// This function just displays the report
21 return true;
24 function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview", $meta=""){
25 global $CFG;
26 /// Define some strings
27 $strquizzes = get_string("modulenameplural", "quiz");
28 $strquiz = get_string("modulename", "quiz");
29 /// Print the page header
30 $navlinks = array();
31 $navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
32 $navlinks[] = array('name' => format_string($quiz->name), 'link' => '', 'type' => 'activityinstance');
33 $navigation = build_navigation($navlinks);
35 print_header_simple(format_string($quiz->name), "", $navigation,
36 '', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
37 /// Print the tabs
38 $currenttab = 'reports';
39 $mode = $reportmode;
40 require($CFG->dirroot . '/mod/quiz/tabs.php');