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:
jamiesensei 2008-06-24 08:59:29 +00:00
parent 4b4a5710a2
commit c386eaa3df
6 changed files with 7 additions and 8 deletions

View file

@ -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');