81 Commits

Author SHA1 Message Date
Paul Holden
bf39fc43b4
MDL-80014 reportbuilder: entity method to retrieve all table aliases. 2023-12-13 10:06:19 +00:00
Paul Holden
fb53d081da
MDL-79397 reportbuilder: always auto-generate entity table aliases.
As the number of report entity classes has grown, each having their own
manually defined table aliases, it becomes harder to ensure each of the
aliases are always unique across report sources.

We can remove that burden by ensuring table aliases are automatically
generated upon request.
2023-12-07 17:19:01 +00:00
Paul Holden
0d9b79fb20
MDL-79216 files: new report filter type for filesize data. 2023-12-01 09:39:01 +00:00
Paul Holden
6a9eadceb6
MDL-79998 reportbuilder: user entity method to get identity fields. 2023-11-10 10:22:51 +00:00
Paul Holden
e19c4e89d1
MDL-79446 reportbuilder: optional $suffix for generated alias/params.
Allows for, and documents, intended usage when the result of these
methods is used elsewhere (e.g. in `$DB->get_in_or_equal`).
2023-10-11 15:10:39 +01:00
Sara Arjona
999fbc3bdd
Merge branch 'MDL-75855' of https://github.com/paulholden/moodle 2023-08-24 16:49:34 +02:00
Ilya Tregubov
60693cd9b6
Merge branch 'MDL-77067' of https://github.com/paulholden/moodle 2023-08-24 09:59:58 +08:00
Paul Holden
b9a5a3626e
MDL-77067 reportbuilder: indicate when audiences are used in schedules.
Indicate in each audience card whether it's used as part of a report
schedule, and inform user again upon deletion of said audience.
2023-08-23 16:09:17 +01:00
Paul Holden
8fe1f83fe1
MDL-75855 reportbuilder: don't allow condition/filter duplication.
Custom reports shouldn't allow the same condition and/or filter
instance to exist more that once per report.
2023-08-22 18:47:33 +01:00
Paul Holden
3ca41c77e4
MDL-76902 reportbuilder: entity method for defining table join alias. 2023-08-22 15:16:31 +01:00
Sara Arjona
df5d62eac2
Merge branch 'MDL-78844' of https://github.com/paulholden/moodle 2023-08-17 09:10:51 +02:00
Paul Holden
c9f689ae6c
MDL-78844 reportbuilder: external validate system report access method. 2023-08-09 13:49:27 +01:00
Paul Holden
9c108c8d88
MDL-78758 reportbuilder: stricter checking of source default sorting. 2023-08-07 10:21:51 +01:00
Ilya Tregubov
c5bbb46886
Merge branch 'MDL-78807' of https://github.com/paulholden/moodle 2023-08-03 09:33:04 +08:00
Paul Holden
e4e7e59d90
MDL-78807 reportbuilder: ensure report base conditions are non-empty. 2023-08-02 13:50:50 +01:00
Jun Pataleta
f8aa9a6504
Merge branch 'MDL-78117' of https://github.com/paulholden/moodle 2023-08-02 16:24:50 +08:00
Paul Holden
d8df4ad675
MDL-78117 reportbuilder: use context entity in report sources.
Deprecate existing columns, to be replaced by corresponding elements
from the new entity.
2023-08-02 08:05:50 +01:00
Andrew Nicols
30f7e50770
Merge branch 'MDL-78575-master' of https://github.com/snake/moodle 2023-08-01 09:38:15 +08:00
Paul Holden
36ab5e5d1a
MDL-78532 reportbuilder: external method for retrieving system report. 2023-07-18 12:05:07 +01:00
Jake Dallimore
348e347f79
MDL-78575 core_reportbuilder: allow reports to override the zerostate
Allow report implementations to control what is shown when no results
are found for the current report+filters. Allow setting to null to
allow calling code to omit this notice entirely.
2023-07-10 15:55:56 +08:00
Paul Holden
e8ae9680bc
MDL-75810 reportbuilder: entity method for returning tag SQL joins. 2023-06-16 18:21:24 +01:00
Paul Holden
f500b2d878
MDL-76900 course: add enrolment/role entities to participants source.
Deprecate columns/filters from current enrolment entity, to be
replaced by corresponding elements from each of the new entities.
2023-05-17 08:02:44 +01:00
Paul Holden
8f7bff9789
MDL-76900 reportbuilder: allow for deprecation of entity elements.
Don't allow deprecated columns/filters to be added to new custom
reports. Where they already exist, emit deprecation debugging.
2023-05-17 08:02:06 +01:00
Paul Holden
6312467346
MDL-77614 reportbuilder: throw exception if entity name already exists. 2023-04-25 12:55:09 +01:00
Paul Holden
5d0f34bde2
MDL-77555 reportbuilder: improve SQL generation within filters.
Use native ANSI SQL syntax for numeric comparisons where possible,
define filter API for the case where filters must re-use the given
field SQL while ensuring uniqueness of any field parameters.

Currently only necessary in the category filter type.
2023-04-05 09:37:37 +01:00
Paul Holden
4146329063
MDL-77555 reportbuilder: method to ensure unique parameters in SQL. 2023-03-27 10:29:25 +01:00
Andrew Nicols
5a896a722c Merge branch 'MDL-76815' of https://github.com/paulholden/moodle 2023-02-23 09:14:03 +08:00
Paul Holden
b3a50f4a82 MDL-76815 reportbuilder: avoid duplication getting audience component.
The component the audience belongs to is used by the cards exporter
for rendering the editing interface. Avoid duplication in determining
this value by defining appropriate method in the base class.
2023-02-16 12:15:52 +00:00
Paul Holden
650b6caf83 MDL-77201 reportbuilder: pass current aggregation to column callbacks. 2023-02-14 11:03:03 +00:00
Paul Holden
5b644bfd30 MDL-77091 reportbuilder: set base time in schedule test generator.
The base time allows for the setting of the "current time" for the
purposes of the schedule test against recurrence configuration.

We should ensure the generator method allows this property so that
it can be used when calculating the initial "next send time" of the
schedule upon creation (and avoiding excessive recursion when the
actual current time is used for the calculation).
2023-02-01 14:39:21 +00:00
Sara Arjona
b92b0b6cea Merge branch 'MDL-76221' of https://github.com/paulholden/moodle 2023-01-04 13:08:44 +01:00
Paul Holden
45818da292 MDL-76221 reportbuilder: improve report test generator methods.
Test generators for creating report columns, filters and conditions
now allow for setting all persistent properties.
2023-01-04 10:56:27 +00:00
Paul Holden
5162a7882d MDL-76181 reportbuilder: sort columns during stress testing. 2022-12-29 13:59:31 +00:00
Sara Arjona
69ffc40621 Merge branch 'MDL-76304-master-add_pagesize_to_webservice' of https://github.com/alexmorrisnz/moodle 2022-12-28 10:23:42 +01:00
Alex Morris
ab03eb210d
MDL-76304 reportbuilder: Add pagesize parameter to get webservice 2022-12-19 16:59:27 +13:00
Paul Holden
2d5b6d0e01 MDL-74145 reportbuilder: system report API for adding row checkboxes. 2022-12-16 12:09:28 +00:00
Mikel Martín
97be42d99b MDL-75943 reportbuilder: Refactor scss to support force card/table view 2022-12-14 13:52:44 +01:00
Mikel Martín
91cc98ed3d MDL-75943 reportbuilder: Add custom attributes to reports 2022-12-14 13:50:40 +01:00
Marina Glancy
064eccd4fc MDL-75525 reportbuilder: specify initial sorting for datasources 2022-11-07 15:43:45 +01:00
Sara Arjona
f0e2d12533 Merge branch 'MDL-75165' of https://github.com/paulholden/moodle 2022-10-27 16:50:09 +02:00
Sara Arjona
e31c9d3f84 Merge branch 'MDL-75931' of https://github.com/paulholden/moodle 2022-10-21 09:07:58 +03:00
Paul Holden
f1c3aca7ea MDL-75165 reportbuilder: entity method to override multiple aliases. 2022-10-19 14:46:21 +01:00
Ilya Tregubov
c3d7241ea3 Merge branch 'MDL-74956' of https://github.com/paulholden/moodle 2022-10-12 11:42:04 +03:00
Paul Holden
8822089877 MDL-74956 reportbuilder: external method for retrieving custom report. 2022-10-12 09:36:23 +01:00
Jun Pataleta
36e4ca71c6 Merge branch 'MDL-75034' of https://github.com/paulholden/moodle 2022-10-12 14:24:35 +08:00
Jun Pataleta
5ed4ea149a Merge branch 'MDL-74913' of https://github.com/lostrogit/moodle 2022-10-11 12:18:46 +08:00
Paul Holden
045eb42c9d MDL-75931 reportbuilder: use datasource for custom report exporters.
Make the related data property of the custom report exporters expect
an actual custom report instance, rather than the root base type.
2022-10-10 17:41:00 +01:00
Paul Holden
b3828cebd2 MDL-75034 reportbuilder: move classes into consistent namespace.
Use `reportbuilder` level two namespace for report related classes
(entities, system reports, etc) within components and sub-systems.
2022-10-07 15:05:34 +01:00
Paul Holden
28cf1fa8a1 MDL-74955 reportbuilder: external method for listing custom reports. 2022-10-03 13:57:36 +01:00
Paul Holden
77018b7359 MDL-74955 reportbuilder: re-factor retrieving user reports to helper. 2022-10-03 13:22:10 +01:00