Commit | Line | Data |
---|---|---|
c2f5e2ab TH |
1 | This files describes API changes for quiz report plugins. |
2 | ||
3 | Overview of this plugin type at http://docs.moodle.org/dev/Quiz_reports | |
4 | ||
5 | ||
6 | === earlier versions === | |
7 | ||
8 | * ... API changes were not documented properly. Sorry. (There weren't many!) | |
9 | ||
10 | ||
11 | === 2.2 === | |
12 | ||
13 | * Plugins should be converted to implement cron in the standard way. In lib.php, | |
14 | define a | |
15 | function quiz_myreportname_cron() {}; | |
16 | This replaces the old way of having a separate cron.php file. Also, the cron | |
17 | frequency should be defined in version.php, not in the quiz_reports table. | |
18 | ||
19 | ||
20 | === 2.3 === | |
21 | ||
22 | * Support for the old way of doing cron in a separate cron.php file has been removed. | |
99aaad06 K |
23 | You need a lib.php file inside the pluginneme (quiz report name) and a cron function |
24 | with the name quiz_pluginname_cron(), where pluginnme is the report name (e.g.: | |
25 | quiz_statistics_cron()). | |
26 | ||
27 | * Some globally defined constants with the prefix "QUIZ_REPORT_ATTEMPTS_" are put inside | |
28 | the abstract class "quiz_attempts_report" in Moodle 2.3.and they associate as follows: | |
29 | ||
30 | withis the classes drived from "quiz_attempts_report": | |
31 | ||
32 | parent::ALL_WITH replaces QUIZ_REPORT_ATTEMPTS_ALL | |
33 | parent::ENROLLED_ALL replaces QUIZ_REPORT_ATTEMPTS_ALL_STUDENTS | |
34 | parent::ENROLLED_WITH replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH | |
35 | parent::ENROLLED_WITHOUT replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH_NO | |
36 | ||
37 | anywhere else: | |
38 | quiz_attempts_report::ALL_WITH replaces QUIZ_REPORT_ATTEMPTS_ALL | |
39 | quiz_attempts_report::ENROLLED_ALL replaces QUIZ_REPORT_ATTEMPTS_ALL_STUDENTS | |
40 | quiz_attempts_report::ENROLLED_WITH replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH | |
41 | quiz_attempts_report::ENROLLED_WITHOUT replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH_NO | |
42 | ||
43 | * The clas "quiz_attempt_report" ahd been renbamed as "quiz_attempts_report" |