mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue