Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
=== 4.5 Onwards ===
2
 
3
This file has been replaced by UPGRADING.md. See MDL-81125 for further information.
4
 
5
===
1 efrain 6
This files describes API changes for quiz report plugins.
7
 
8
Overview of this plugin type at http://docs.moodle.org/dev/Quiz_reports
9
 
10
=== 4.4 ===
11
 
12
* The function quiz_grading_report::format_count_for_table now requires a string identifier and
13
  a component identifier so that it is possible to address strings outside of
14
  quiz/report/grading/lang/en/quiz_grading.php.
15
 
16
* The function quiz_grading_renderer::render_grade_link now requires a string identifier and
17
  a component identifier so that it is possible to address strings outside of
18
  quiz/report/grading/lang/en/quiz_grading.php.
19
 
20
=== 4.2 ===
21
 
22
* There was an ill-advised, never documented, API change in quiz_report_get_significant_questions
23
  in Moodle 4.0. The API has now been reverted to how it was before 4.0. Hopefully this
24
  will not cause anyone a problem. (The API revert did not require any changes in any automated tests
25
  or standard quiz reports.)
26
 
27
* The quiz has a lot of old classes in lib.php files. These have now been moved into the classes folder,
28
  and so are now in namespaces. Because of Moodle's class renaming support, your code should continue
29
  working, but output deprecated warnings, so you probably want to update. This should mostly be
30
  doable by adding use statements, and a search/replace.
31
  - quiz_default_report => mod_quiz\local\reports\report_base
32
  - quiz_attempts_report => mod_quiz\local\reports\attempts_report
33
  - mod_quiz_attempts_report_form => mod_quiz\local\reports\attempts_report_options_form
34
  - mod_quiz_attempts_report_options => mod_quiz\local\reports\attempts_report_options
35
  - quiz_attempts_report_table => mod_quiz\local\reports\attempts_report_table
36
 
37
  As part of the clean-up, the following files are no longer required, and if you try to
38
  include them, you will get a debugging notices telling you not to:
39
  - mod/quiz/report/attemptsreport.php
40
  - mod/quiz/report/attemptsreport_form.php
41
  - mod/quiz/report/attemptsreport_options.php
42
  - mod/quiz/report/attemptsreport_table.php
43
  - mod/quiz/report/default.php
44
 
45
* Final deprecation (complete removal) of the following functions which were deprecated long ago:
46
  - attempts_report::load_relevant_students - deprecated in 3.2
47
  - quiz_statistics_graph_get_new_colour - deprecated since 3.2
48
  - The file mod/quiz/report/overview/overviewgraph.php - deprecated since 3.2
49
  - The file mod/quiz/report/statistics/statistics_graph.php - deprecated since 3.2
50
 
51
 
52
=== 3.9 ===
53
 
54
* Quiz report plugins defining capabilities used to require an extra string like
55
    $string['statistics:componentname'] = 'Quiz statistics report';
56
in addition to
57
    $string['pluginname'] = 'Statistics';
58
This is no longer required.
59
 
60
=== 3.8 ===
61
 
62
* New quiz_attempts_report_table method: \quiz_attempts_report_table::checkbox_col_header()
63
  This generates a column header containing a checkbox that toggles the checked state of all the checkboxes corresponding to the
64
  entries listed on a given quiz report table. It requires the name of the checkbox column as a parameter in order to disable
65
  sorting on the checkbox column.
66
 
67
=== 3.2 ===
68
 
69
* A code refactoring based on new sql functions in MDL-31243 and removing
70
get_users_by_capability from the quiz reports in MDL-27072. The class
71
quiz_attempts_report is now initialised to return \core\dml\sql_join (joins,
72
wheres, params) rather than arrays of userids. This allows the use of joins
73
in quiz report queries and is very important when there
74
are larger numbers of enrolled users. The signature of many quiz report
75
methods now includes '$studentsjoins', rather than '$students' and similar
76
for '$groupstudentsjoins', '$allowedjoins' and '$usersjoins'. For clear
77
examples of the use of these changes please see attemptsreport_table.php
78
base_sql() or almost any function in overview/report.php. The protected
79
function quiz_attempts_report::load_relevant_students is deprecated,
80
please use quiz_attempts_report::get_students_joins() instead.
81
 
82
=== 2.6 ===
83
 
84
* Improving the display page and heading levels to have a proper nesting.
85
We are reducing the amount of white spaces for the top report by making
86
'separate group' options and attempts to be displayed inline.
87
In grading report, we are changing 'no questions' from using heading to
88
notification message. (MDL-41615)
89
 
90
=== 2.3 ===
91
 
92
* Support for the old way of doing cron in a separate cron.php file has been removed.
93
Instead, you need a lib.php file inside the plugin with a cron function
94
called quiz_myreportname_cron(). The statistics report is an example of how
95
it should be done.
96
 
97
* There was a big refactor of the quiz reports, in issues MDL-32300, MDL-32322 and MDL-3030.
98
It is difficult to explain the changes. Probably the best way to understand what
99
happened is to look at
100
    git log mod/quiz/report/overview
101
    git log mod/quiz/report/responses
102
and so on. Here are some notes on a few of the changes:
103
 
104
The class quiz_attempt_report was renamed to quiz_attempts_report (with an extra s).
105
 
106
Some globally defined constants with the prefix QUIZ_REPORT_ATTEMPTS_ moved into
107
the quiz_attempts_report class. Specifically
108
 
109
quiz_attempts_report::ALL_WITH         replaces QUIZ_REPORT_ATTEMPTS_ALL
110
quiz_attempts_report::ENROLLED_ALL     replaces QUIZ_REPORT_ATTEMPTS_ALL_STUDENTS
111
quiz_attempts_report::ENROLLED_WITH    replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH
112
quiz_attempts_report::ENROLLED_WITHOUT replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH_NO
113
 
114
Your if you have a table class, it needs to be renamed like
115
quiz_report_myreportname_table -> quiz_myreportname_table. That is, all the
116
class names in your plugin should start with the frankenstyle plugin name
117
quiz_myreportname.
118
 
119
 
120
=== 2.2 ===
121
 
122
* Plugins should be converted to implement cron in the standard way. In lib.php,
123
define a
124
function quiz_myreportname_cron() {};
125
This replaces the old way of having a separate cron.php file. Also, the cron
126
frequency should be defined in version.php, not in the quiz_reports table.
127
 
128
 
129
=== earlier versions ===
130
 
131
* ... API changes were not documented properly. Sorry. (There weren't many!)