3 ////////////////////////////////////////////////////////////////////
4 /// Default class for report plugins
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.
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
24 function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview", $meta=""){
26 /// Define some strings
27 $strquizzes = get_string("modulenameplural", "quiz");
28 $strquiz = get_string("modulename", "quiz");
29 /// Print the page header
30 $navigation = build_navigation('', $cm);
32 print_header_simple(format_string($quiz->name
), "", $navigation,
33 '', $meta, true, update_module_button($cm->id
, $course->id
, $strquiz), navmenu($course, $cm));
35 $currenttab = 'reports';
37 require($CFG->dirroot
. '/mod/quiz/tabs.php');
38 $course_context = get_context_instance(CONTEXT_COURSE
, $course->id
);
39 if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
40 echo '<div class="allcoursegrades"><a href="' . $CFG->wwwroot
. '/grade/report/grader/index.php?id=' . $course->id
. '">'
41 . get_string('seeallcoursegrades', 'grades') . '</a></div>';