2021-12-07 16:01:41 +01:00
|
|
|
This file describes API changes in /reportbuilder/*
|
|
|
|
Information provided here is intended especially for developers.
|
|
|
|
|
2022-10-20 12:27:27 +02:00
|
|
|
=== 4.2 ===
|
2022-07-13 21:57:07 +01:00
|
|
|
|
|
|
|
* New method `set_checkbox_toggleall` in system report class to allow reports to easily create checkbox toggle columns
|
2022-10-20 12:27:27 +02:00
|
|
|
* New methods `[add|get]_attributes` added to report base class, for including custom attributes in report container HTML
|
2022-10-20 12:28:49 +02:00
|
|
|
* The following attributes can be added to custom reports in order to control card view display (via the `add_attributes` method):
|
|
|
|
- `data-force-card` to force cards view
|
|
|
|
- `data-force-table` to force table view
|
2022-11-15 13:56:31 +13:00
|
|
|
* New optional parameter `pagesize` in external method `core_reportbuilder_reports_get` to set the displayed rows per page.
|
|
|
|
* Javascript reports repository module method `getReport` updated to accept new pagesize parameter.
|
2022-11-02 20:40:14 +00:00
|
|
|
* The `datasource_stress_test_columns` test helper now enables sorting on those columns that support it
|
2022-11-17 21:54:37 +00:00
|
|
|
* The `create_[column|filter|condition]` test generator methods now allow for setting all persistent properties
|
2022-10-20 12:27:27 +02:00
|
|
|
|
2021-12-07 16:01:41 +01:00
|
|
|
=== 4.1 ===
|
2022-07-13 21:57:07 +01:00
|
|
|
|
2022-08-08 10:55:11 -05:00
|
|
|
* New method `add_action_divider()` in base system report class, to allow adding a divider to the action menu.
|
2022-07-15 12:56:20 +01:00
|
|
|
* New external method `core_reportbuilder_set_filters` for setting report filter values (plus `setFilters` AJAX repository
|
|
|
|
export for calling from Javascript modules)
|
2022-07-15 14:09:37 +01:00
|
|
|
* New method `set_filter_form_default` in base system report class, to override whether the default filters form
|
|
|
|
should be shown for a report
|
2022-07-11 21:03:36 +01:00
|
|
|
* The external `core_reportbuilder_filters_reset` method now accepts an optional `parameters` argument, required by
|
|
|
|
some system reports
|
2022-06-23 22:25:51 +01:00
|
|
|
* New external methods for retrieving custom report data:
|
2022-06-24 09:22:02 +01:00
|
|
|
- `core_reportbuilder_list_reports`
|
2022-10-10 10:33:23 +01:00
|
|
|
- `core_reportbuilder_retrieve_report`
|
2022-06-23 22:25:51 +01:00
|
|
|
- `core_reportbuilder_view_report`
|
2022-09-12 16:59:26 +01:00
|
|
|
* For consistency, the following entity classes have moved namespace (usage of previous namespace will generate debugging):
|
|
|
|
- `core_admin\{ => reportbuilder}\local\entities\task_log`
|
|
|
|
- `core_cohort\{ => reportbuilder}\local\entities\cohort`
|
|
|
|
- `core_cohort\{ => reportbuilder}\local\entities\cohort_member`
|
|
|
|
- `core_course\{ => reportbuilder}\local\entities\course_category`
|
|
|
|
- `report_configlog\{ => reportbuilder}\local\entities\config_change`
|
2021-12-07 16:01:41 +01:00
|
|
|
* 'set_default_per_page' and 'get_default_per_page' methods have been added to \local\report\base class
|
2022-05-05 17:10:30 +01:00
|
|
|
to manage the default displayed rows per page.
|
2022-04-19 15:33:52 +02:00
|
|
|
* Added two new methods in the datasource class:
|
2022-07-15 12:56:20 +01:00
|
|
|
- add_all_from_entity() to add all columns/filters/conditions from the given entity to the report at once
|
|
|
|
- add_all_from_entities() to add all columns/filters/conditions from all the entities added to the report at once
|
2022-03-10 17:24:45 +00:00
|
|
|
* New database helper methods for generating multiple unique values: `generate_aliases` and `generate_param_names`
|
2022-05-05 17:10:30 +01:00
|
|
|
* The base aggregation `format_value` method has a `$columntype` argument in order to preserve type during aggregation. When
|
|
|
|
defining column callbacks, strict typing will now be preserved in your callback methods when the column is being aggregated
|
2022-02-18 17:34:53 +00:00
|
|
|
* The method `get_joins()` in the base entity class is now public, allowing for easier joins within reports
|
2022-07-05 16:43:14 +01:00
|
|
|
* New method `set_table_aliases` in base entity class, for overriding multiple table aliases in a single call
|
2022-04-28 09:59:14 +01:00
|
|
|
* The following local helper methods have been deprecated, their implementation moved to exporters:
|
|
|
|
- `audience::get_all_audiences_menu_types` -> `custom_report_audience_cards_exporter`
|
|
|
|
- `report::get_available_columns` -> `custom_report_column_cards_exporter`
|
2022-05-09 21:29:44 +01:00
|
|
|
* The `custom_report_exporter` class now defines its editor element properties as optional, rather than each of those exporters
|
|
|
|
defining their own properties as optional. In turn, this means the structure of the following external methods will always be
|
|
|
|
present and consistent:
|
|
|
|
- `core_reportbuilder_columns_*`
|
|
|
|
- `core_reportbuilder_conditions_*`
|
|
|
|
- `core_reportbuilder_filters_*`
|
2022-10-10 17:37:48 +01:00
|
|
|
* The `custom_report_*` exporters now accept only classes that extend datasource as part of their related data properties
|
2022-04-28 16:11:50 +01:00
|
|
|
* The following permission methods now accept an optional `$context` parameter (default system context):
|
|
|
|
- `[require_]can_view_reports_list`
|
|
|
|
- `[require_]can_create_report`
|
2022-02-17 11:57:44 +01:00
|
|
|
* New method `get_default_condition_values()` in base datasource class, to be overridden by sources that wish to
|
|
|
|
define default values for conditions upon report creation.
|
2022-07-22 12:34:50 +01:00
|
|
|
* New methods `get_identity_[column|filter]` in user entity, for retrieving user identity field report elements
|
2022-10-03 13:19:02 +01:00
|
|
|
* New method `user_reports_list_access_sql` in audience helper for retrieving list of all reports for given user
|
2022-05-17 11:26:10 +01:00
|
|
|
* New report filter types:
|
|
|
|
- `category` for reports containing course categories
|
|
|
|
- `tags` for reports containing entities with support for core_tag API
|
2022-07-12 20:58:24 +10:00
|
|
|
- `autocomplete` for reports that contain pre-defined values for selection.
|
2022-08-19 13:19:27 +01:00
|
|
|
* New method `get_sample_values()` added to base filter class, to be overridden in all filter types to support stress testing
|
2022-03-11 10:53:35 +00:00
|
|
|
* New test helpers for automated stress testing of report sources:
|
|
|
|
- `datasource_stress_test_columns`
|
|
|
|
- `datasource_stress_test_columns_aggregation`
|
|
|
|
- `datasource_stress_test_conditions`
|
2022-08-19 13:19:27 +01:00
|
|
|
* The test helper method `get_custom_report_content()` now accepts a list of filter values and applies them to the report
|
2022-10-26 10:02:40 +02:00
|
|
|
* New method `get_default_column_sorting` in base datasource class, to be overridden by sources that wish to
|
|
|
|
define default columns sort order upon report creation.
|