. /* * 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/game/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. /** * the default report. * * @package mod_game * @copyright 2007 Vasilis Daloukas * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * default report * * @package mod_game * @copyright 2014 Vasilis Daloukas * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class game_default_report { /** * Display * * @param stdClass $cm * @param stdClass $course * @param stdClass $game */ public function display($cm, $course, $game) { // This function just displays the report. return true; } /** * print header and tabs * * @param stdClass $cm * @param stdClass $course * @param stdClass $game * @param string $reportmode * @param string $meta */ public function print_header_and_tabs($cm, $course, $game, $reportmode = "overview", $meta = "") { global $CFG; // Define some strings. $strgames = get_string("modulenameplural", "game"); $strgame = get_string("modulename", "game"); // Print the page header. if (function_exists( 'build_navigation')) { $navigation = build_navigation('', $cm); echo $OUTPUT->heading( $course->shortname, $course->shortname, $navigation); } else { echo $OUTPUT->heading(format_string($game->name), "", "id\">$strgames -> ".format_string($game->name), '', $meta, true, update_module_button($cm->id, $course->id, $strgame), navmenu($course, $cm)); } // Print the tabs. $currenttab = 'reports'; $mode = $reportmode; require('tabs.php'); } }