Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
# core_reportbuilder (subsystem) Upgrade notes
2
 
3
## 5.0
4
 
5
### Added
6
 
7
- New `report` helper class `get_report_row_count` method for retrieving row count of custom or system report, without having to retrieve the report content
8
 
9
  For more information see [MDL-74488](https://tracker.moodle.org/browse/MDL-74488)
10
- New `get_deprecated_tables` method in base entity, to be overridden when an entity no longer uses a table (due to column/filter re-factoring, etc) in order to avoid breaking third-party reports
11
 
12
  For more information see [MDL-78118](https://tracker.moodle.org/browse/MDL-78118)
13
- The base report class, used by both `\core_reportbuilder\system_report` and `\core_reportbuilder\datasource`, contains new methods for enhancing report rendering
14
 
15
  * `set_report_action` allows for an action button to belong to your report, and be rendered alongside the filters button;
16
  * `set_report_info_container` allows for content to be rendered by your report, between the action buttons and the table content
17
 
18
  For more information see [MDL-82936](https://tracker.moodle.org/browse/MDL-82936)
19
- The base aggregation class has a new `column_groupby` method, to be implemented in aggregation types to determime whether report tables should group by the fields of the aggregated column
20
 
21
  For more information see [MDL-83361](https://tracker.moodle.org/browse/MDL-83361)
22
- There is a new `date` aggregation type, that can be applied in custom and system reports
23
 
24
  For more information see [MDL-83361](https://tracker.moodle.org/browse/MDL-83361)
25
- The `core_reportbuilder_testcase` class has been moved to new autoloaded `core_reportbuilder\tests\core_reportbuilder_testcase` location, affected tests no longer have to manually require `/reportbuilder/tests/helpers.php`
26
 
27
  For more information see [MDL-84000](https://tracker.moodle.org/browse/MDL-84000)
28
- Columns added to system reports can render help icons in table headers via `[set|get]_help_icon` column instance methods
29
 
30
  For more information see [MDL-84016](https://tracker.moodle.org/browse/MDL-84016)
31
- The `groupconcat[distinct]` aggregation types support optional `'separator'` value to specify the text to display between aggregated items
32
 
33
  For more information see [MDL-84537](https://tracker.moodle.org/browse/MDL-84537)
34
 
35
### Changed
36
 
37
- The `get_active_conditions` method of the base report class has a new `$checkavailable` parameter to determine whether to check the returned conditions availability
38
 
39
  For more information see [MDL-82809](https://tracker.moodle.org/browse/MDL-82809)
40
- When the `select` filter contains upto two options only then the operator field is removed, switching to a simpler value selection field only (this may affect your Behat scenarios)
41
 
42
  For more information see [MDL-82913](https://tracker.moodle.org/browse/MDL-82913)
43
- Report table instances no longer populate the `countsql` and `countparams` class properties. Instead calling code can access `totalrows` to obtain the same value, or by calling the helper method `report::get_report_row_count`
44
 
45
  For more information see [MDL-83718](https://tracker.moodle.org/browse/MDL-83718)
46
- For columns implementing custom sorting via their `set_is_sortable` method, the specified sort fields must also be part of the columns initially selected fields
47
 
48
  For more information see [MDL-83718](https://tracker.moodle.org/browse/MDL-83718)
49
- The `select` filter type is now stricter in it's filtering, in that it will now discard values that aren't present in available filter options
50
 
51
  For more information see [MDL-84213](https://tracker.moodle.org/browse/MDL-84213)
52
- Aggregation types can access passed options set via the base class constructor in the `$this->options[]` class property. As such, their `format_value` method is no longer static and is always called from an instantiated class instance
53
 
54
  For more information see [MDL-84537](https://tracker.moodle.org/browse/MDL-84537)
55
- New `$options` argument added to the `column::set_aggregation` method for system reports, to set aggregation type-specific options
56
 
57
  Report entities can call new `column::set_aggregation_options` to achieve the same
58
 
59
  For more information see [MDL-84537](https://tracker.moodle.org/browse/MDL-84537)
60
 
61
### Deprecated
62
 
63
- The `schedule` helper class `get_schedule_report_count` method is now deprecated, existing code should instead use `report::get_report_row_count`
64
 
65
  For more information see [MDL-74488](https://tracker.moodle.org/browse/MDL-74488)
66
- The `render_new_report_button` method of the `core_reportbuilder` renderer has been deprecated. Instead, refer to the report instance `set_report_action` method
67
 
68
  For more information see [MDL-82936](https://tracker.moodle.org/browse/MDL-82936)
69
- Use of the `course_completion` table is deprecated in the `completion` entity, please use `course_completions` instead
70
 
71
  For more information see [MDL-84135](https://tracker.moodle.org/browse/MDL-84135)
72
 
73
### Removed
74
 
75
- The following deprecated report entity elements have been removed:
76
 
77
  - `comment:context`
78
  - `comment:contexturl`
79
  - `enrolment:method` (plus enrolment formatter `enrolment_name` method)
80
  - `enrolment:role`
81
  - `file:context`
82
  - `file:contexturl`
83
  - `instance:context` (tag)
84
  - `instance:contexturl` (tag)
85
 
86
  Use of the `context` table is also deprecated in the `file` and `instance` (tag) entities
87
 
88
  For more information see [MDL-78118](https://tracker.moodle.org/browse/MDL-78118)
89
- Various Oracle-specific support/workarounds in APIs and component report entities have been removed
90
 
91
  For more information see [MDL-80173](https://tracker.moodle.org/browse/MDL-80173)
92
- Final removal of support for `get_default_table_aliases` method. Entities must now implement `get_default_tables`, which is now abstract, to define the tables they use
93
 
94
  For more information see [MDL-80430](https://tracker.moodle.org/browse/MDL-80430)
95
 
96
## 4.5
97
 
98
### Added
99
 
100
- The return type of the `set_checkbox_toggleall` callback, defined by system reports, can now be null. Use if the checkbox should not be shown for the row.
101
 
102
  For more information see [MDL-52046](https://tracker.moodle.org/browse/MDL-52046)
103
- System reports now support native entity column aggregation via each columns `set_aggregation()` method
104
 
105
  For more information see [MDL-76392](https://tracker.moodle.org/browse/MDL-76392)
106
- The following external methods now return tags data relevant to each custom report:
107
    - `core_reportbuilder_list_reports`
108
    - `core_reportbuilder_retrieve_report`
109
 
110
  For more information see [MDL-81433](https://tracker.moodle.org/browse/MDL-81433)
111
- Added a new database helper method `sql_replace_parameters` to help ensure uniqueness of parameters within a SQL expression.
112
 
113
  For more information see [MDL-81434](https://tracker.moodle.org/browse/MDL-81434)
114
- A new static method, `\core_reportbuilder\local\helpers\format::format_time()`, has been added for use in column callbacks that represent a duration of time (for example "3 days 4 hours").
115
 
116
  For more information see [MDL-82466](https://tracker.moodle.org/browse/MDL-82466)
117
- The following methods have been moved from `\core_reportbuilder\datasource` class to its parent class `\core_reportbuilder\base` to make them available for use in system reports:
118
 
119
    - `add_columns_from_entity()`
120
    - `add_filters_from_entity()`
121
    - `report_element_search()`
122
 
123
  For more information see [MDL-82529](https://tracker.moodle.org/browse/MDL-82529)
124
 
125
### Changed
126
 
127
- In order to better support float values in filter forms, the following filter types now cast given SQL prior to comparison:
128
 
129
    - `duration`
130
    - `filesize`
131
    - `number`
132
 
133
  For more information see [MDL-81168](https://tracker.moodle.org/browse/MDL-81168)
134
- The base datasource `\core_reportbuilder\datasource::add_all_from_entities()` method accepts a new optional `array $entitynames` parameter to specify which entities to add elements from.
135
 
136
  For more information see [MDL-81330](https://tracker.moodle.org/browse/MDL-81330)
137
- All time-related code has been updated to the PSR-20 Clock interface, as such the following methods no longer accept a `$timenow` parameter (instead please use `\core\clock` dependency injection):
138
  - `core_reportbuilder_generator::create_schedule`
139
  - `core_reportbuilder\local\helpers\schedule::create_schedule()`
140
  - `core_reportbuilder\local\helpers\schedule::calculate_next_send_time()`
141
 
142
  For more information see [MDL-82041](https://tracker.moodle.org/browse/MDL-82041)
143
- The following classes have been moved to use the new exception API as a L2 namespace:
144
 
145
  | Old class                                           | New class                                                     |
146
  | -----------                                         | -----------                                                   |
147
  | `\core_reportbuilder\report_access_exception`       | `\core_reportbuilder\exception\report_access_exception`       |
148
  | `\core_reportbuilder\source_invalid_exception`      | `\core_reportbuilder\exception\source_invalid_exception`      |
149
  | `\core_reportbuilder\source_unavailable_exception`  | `\core_reportbuilder\exception\source_unavailable_exception`  |
150
 
151
  For more information see [MDL-82133](https://tracker.moodle.org/browse/MDL-82133)
152
 
153
### Removed
154
 
155
- Support for the following entity classes, renamed since 4.1, have now been removed completely:
156
 
157
  - `\core_admin\local\entities\task_log`
158
  - `\core_cohort\local\entities\cohort`
159
  - `\core_cohort\local\entities\cohort_member`
160
  - `\core_course\local\entities\course_category`
161
  - `\report_configlog\local\entities\config_change`
162
 
163
  For more information see [MDL-74583](https://tracker.moodle.org/browse/MDL-74583)
164
- The following previously deprecated local helper methods have been removed and can no longer be used:
165
    - `\core_reportbuilder\local\helpers\audience::get_all_audiences_menu_types()`
166
    - `\core_reportbuilder\local\helpers\report::get_available_columns()`
167
 
168
  For more information see [MDL-76690](https://tracker.moodle.org/browse/MDL-76690)