Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | List of all members
quiz_default_report Class Reference

Base class for quiz report plugins. More...

Inheritance diagram for quiz_default_report:
quiz_attempts_report quiz_grading_report quiz_statistics_report quiz_overview_report quiz_responses_report testable_quiz_attempts_report

Public Member Functions

 display ($cm, $course, $quiz)
 Override this function to displays the report. More...
 
 get_current_group ($cm, $course, $context)
 Get the current group for the user user looking at the report. More...
 
 print_header_and_tabs ($cm, $course, $quiz, $reportmode='overview')
 Initialise some parts of $PAGE and start output. More...
 

Public Attributes

const NO_GROUPS_ALLOWED = -2
 

Detailed Description

Base class for quiz 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". @copyright 1999 onwards Martin Dougiamas and others <a class="el externalurl" href="http://moodle.com">

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ display()

quiz_default_report::display (   $cm,
  $course,
  $quiz 
)
abstract

Override this function to displays the report.

Parameters
$cmthe course-module for this quiz.
$coursethe coures we are in.
$quizthis quiz.

Reimplemented in testable_quiz_attempts_report, quiz_grading_report, quiz_overview_report, quiz_responses_report, and quiz_statistics_report.

◆ get_current_group()

quiz_default_report::get_current_group (   $cm,
  $course,
  $context 
)

Get the current group for the user user looking at the report.

Parameters
object$cmthe course_module information.
object$couresthe course settings.
context$contextthe quiz context.
Return values
intthe current group id, if applicable. 0 for all users, NO_GROUPS_ALLOWED if the user cannot see any group.

◆ print_header_and_tabs()

quiz_default_report::print_header_and_tabs (   $cm,
  $course,
  $quiz,
  $reportmode = 'overview' 
)

Initialise some parts of $PAGE and start output.

Parameters
object$cmthe course_module information.
object$couresthe course settings.
object$quizthe quiz settings.
string$reportmodethe report name.

Reimplemented in quiz_grading_report.


The documentation for this class was generated from the following file: