mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-15384 'change name of quiz report classes to "quiz_{reportname}_report"' easy to do, changed class name of all reports and changed the code in report.php which instantiates the correct class.
This commit is contained in:
parent
4b4a5710a2
commit
c386eaa3df
6 changed files with 7 additions and 8 deletions
|
@ -59,8 +59,6 @@
|
|||
|
||||
/// Open the selected quiz report and display it
|
||||
|
||||
$mode = clean_param($mode, PARAM_SAFEDIR);
|
||||
|
||||
if (! is_readable("report/$mode/report.php")) {
|
||||
print_error('reportnotfound', 'quiz', '', $mode);
|
||||
}
|
||||
|
@ -68,7 +66,8 @@
|
|||
include("report/default.php"); // Parent class
|
||||
include("report/$mode/report.php");
|
||||
|
||||
$report = new quiz_report();
|
||||
$reportclassname = "quiz_{$mode}_report";
|
||||
$report = new $reportclassname();
|
||||
|
||||
if (! $report->display($quiz, $cm, $course)) { // Run the report!
|
||||
print_error("preprocesserror", 'quiz');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require_once($CFG->libdir.'/tablelib.php');
|
||||
|
||||
/// Item analysis displays a table of quiz questions and their performance
|
||||
class quiz_report extends quiz_default_report {
|
||||
class quiz_analysis_report extends quiz_default_report {
|
||||
|
||||
function display($quiz, $cm, $course) { /// This function just displays the report
|
||||
global $CFG, $SESSION, $QTYPES, $DB;
|
||||
|
|
|
@ -23,7 +23,7 @@ require_once($CFG->libdir . '/tablelib.php');
|
|||
* @package quiz
|
||||
* @subpackage reports
|
||||
*/
|
||||
class quiz_report extends quiz_default_report {
|
||||
class quiz_grading_report extends quiz_default_report {
|
||||
/**
|
||||
* Displays the report.
|
||||
*/
|
||||
|
|
|
@ -12,7 +12,7 @@ require_once($CFG->libdir.'/tablelib.php');
|
|||
require_once($CFG->dirroot.'/mod/quiz/report/overview/overviewsettings_form.php');
|
||||
require_once($CFG->dirroot.'/mod/quiz/report/overview/overview_table.php');
|
||||
|
||||
class quiz_report extends quiz_default_report {
|
||||
class quiz_overview_report extends quiz_default_report {
|
||||
|
||||
/**
|
||||
* Display the report.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// This script regrades all attempts at this quiz
|
||||
require_once($CFG->libdir.'/tablelib.php');
|
||||
|
||||
class quiz_report extends quiz_default_report {
|
||||
class quiz_regrade_report extends quiz_default_report {
|
||||
|
||||
function display($quiz, $cm, $course) {
|
||||
global $CFG, $DB;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
require_once($CFG->dirroot.'/mod/quiz/report/statistics/statistics_form.php');
|
||||
require_once($CFG->dirroot.'/mod/quiz/report/statistics/statistics_table.php');
|
||||
|
||||
class quiz_report extends quiz_default_report {
|
||||
class quiz_statistics_report extends quiz_default_report {
|
||||
|
||||
/**
|
||||
* Display the report.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue