moodle/mod/quiz/report/default.php
tjhunt 38e179a4ed MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.
This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.
2007-10-12 15:55:49 +00:00

42 lines
1.6 KiB
PHP

<?php // $Id$
////////////////////////////////////////////////////////////////////
/// Default class for report plugins
///
/// Doesn't do anything on it's own -- it needs to be extended.
/// This class displays quiz reports. Because it is called from
/// within /mod/quiz/report.php you can assume that the page header
/// and footer are taken care of.
///
/// This file can refer to itself as report.php to pass variables
/// to itself - all these will also be globally available. You must
/// pass "id=$cm->id" or q=$quiz->id", and "mode=reportname".
////////////////////////////////////////////////////////////////////
// Included by ../report.php
class quiz_default_report {
function display($cm, $course, $quiz) { /// This function just displays the report
return true;
}
function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview", $meta=""){
global $CFG;
/// Define some strings
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");
/// Print the page header
$navigation = build_navigation('', $cm);
print_header_simple(format_string($quiz->name), "", $navigation,
'', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
/// Print the tabs
$currenttab = 'reports';
$mode = $reportmode;
require($CFG->dirroot . '/mod/quiz/tabs.php');
}
}
?>