Commit graph

124 commits

Author SHA1 Message Date
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
aa1970ffa4 MDL-76479 reportbuilder: date filtering by hour. 2022-12-05 06:50:07 +00:00
Jun Pataleta
9bdfcc46d3 Merge branch 'MDL-75358-master' of https://github.com/marinaglancy/moodle 2022-10-31 10:10:16 +08:00
Sara Arjona
9000fd3037 Merge branch 'MDL-75449' of https://github.com/paulholden/moodle 2022-10-27 17:24:11 +02:00
Paul Holden
f1c3aca7ea MDL-75165 reportbuilder: entity method to override multiple aliases. 2022-10-19 14:46:21 +01:00
Víctor Déniz
587deee8f5 Merge branch 'MDL-72722' of https://github.com/paulholden/moodle 2022-10-18 00:26:24 +01:00
Paul Holden
fd01461b7a MDL-75449 reportbuilder: add no tags/exclude tags filter operators.
Allow user to filter for elements that either contain no tags, plus
those that don't contain selected tags.
2022-10-14 16:04:37 +01:00
Andrew Nicols
3589299d82 Merge branch 'MDL-74955' of https://github.com/paulholden/moodle 2022-10-06 09:39:45 +08:00
Víctor Déniz
aa0be15591 Merge branch 'MDL-75192' of https://github.com/paulholden/moodle 2022-10-06 01:08:37 +01:00
Paul Holden
77018b7359 MDL-74955 reportbuilder: re-factor retrieving user reports to helper. 2022-10-03 13:22:10 +01:00
Paul Holden
610d2b0812 MDL-75192 reportbuilder: observe start day in current week filter.
Ensure we observe the site configuration/preference for calendar
first day of the week, in the current week date filter.
2022-09-28 12:09:08 +01:00
Andrew Nicols
c3f0e19d67 Merge branch 'MDL-75447' of https://github.com/paulholden/moodle 2022-09-28 12:41:02 +08:00
Paul Holden
9a24440386 MDL-72722 reportbuilder: Oracle support for distinct group concat.
Requirements for Oracle were increased to 19c for Moodle 4.1 - now
with support for DISTINCT keyword within the LISTAGG function:

https://livesql.oracle.com/apex/livesql/file/content_HT1O85E4BHSBWN93G1B3M8SI2.html
2022-09-26 11:03:33 +01:00
Marina Glancy
4bb042c352 MDL-75358 reportbuilder: display nulls as empty cells in aggregation 2022-09-20 18:18:41 +02:00
David Matamoros
131a97406b
MDL-75639 reportbuilder: Add new option to date filter
- In the past: to filter by all dates in the past
- In the future: to filter by all dates in the future
2022-09-09 10:15:28 +02:00
Paul Holden
ff717ac87f MDL-75447 reportbuilder: return only valid audience instances. 2022-09-02 12:33:54 +01:00
Ilya Tregubov
96dbcc0840 Merge branch 'MDL-75245' of https://github.com/paulholden/moodle 2022-08-30 14:59:50 +04:00
Sara Arjona
87db68a0ce Merge branch 'MDL-75191' of https://github.com/paulholden/moodle 2022-08-30 09:48:29 +02:00
Víctor Déniz
e1c4d1644b Merge branch 'MDL-75290' of https://github.com/paulholden/moodle 2022-08-23 09:02:19 +01:00
Paul Holden
4b8f076560 MDL-75191 reportbuilder: use column callbacks in avg/sum aggregation.
When aggregating a column using either method, for numeric types we
should execute column callbacks to ensure consistent formatting.
2022-08-18 17:04:33 +01:00
Paul Holden
0304508926 MDL-75245 reportbuilder: re-factor current tag elements to new entity.
Update previous implementation of tags (9ebd801c) in report sources to
use equivalent tag entity columns and filters.
2022-08-18 17:01:21 +01:00
Nathan Nguyen
f32913dc65 MDL-67685 core_reportbuilder: Add autocomplete filter 2022-08-02 18:21:37 +07:00
Paul Holden
0d1aadc361 MDL-75290 reportbuilder: show user identity data on access tab.
Observe configured user identity for the site to determine additional
columns and filters to display on custom report access tab.
2022-07-28 20:35:34 +01:00
Paul Holden
5582bc2ded MDL-74656 reportbuilder: ensure nulls preserved in column callbacks.
When concatenating column fields in order to perform aggregation on
them (e.g. group concatenation), we need to preserve all null values
in the data passed to each column callback.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2022-07-19 08:23:54 +01:00
Paul Holden
721f7a01e8 MDL-74777 reportbuilder: report filter by category/sub-categories.
AMOS BEGIN
 CPY [choosecategory,core_grades],[categoryselect,core_reportbuilder]
AMOS END
2022-06-24 11:44:50 +01:00
Jun Pataleta
86676d6811 Merge branch 'MDL-72184' of https://github.com/paulholden/moodle 2022-06-15 10:27:56 +08:00
Paul Holden
9ebd801c07 MDL-73842 reportbuilder: add tags elements to course/user entities.
Both entities define columns and filters for related tags (referred
to as "interests" for users).

Create new generic tags filter type to facilitate this, which can be
re-used by any entities for components which support tagging.
2022-06-12 19:53:24 +01:00
Paul Holden
f9b4611156 MDL-72184 reportbuilder: make use of new methods moved to drivers. 2022-06-12 19:31:34 +01:00
Shamim Rezaie
0d61bf1b87 Merge branch 'MDL-73693' of https://github.com/paulholden/moodle 2022-06-10 13:12:35 +02:00
Paul Holden
9ec385a533 MDL-73693 reportbuilder: report filter by specific user. 2022-06-06 09:12:56 +01:00
Ilya Tregubov
3a9b097f5c Merge branch 'MDL-74600' of https://github.com/paulholden/moodle 2022-06-06 12:52:16 +06:00
Sara Arjona
7d317cdc5d Merge branch 'MDL-73988' of https://github.com/paulholden/moodle 2022-05-31 17:04:23 +02:00
Paul Holden
40c574cd74 MDL-73988 reportbuilder: support for getting entity joins in reports.
This allow reports using multiple entities to more easily define the
relationship between them, specifically when they share common joined
tables.
2022-05-19 16:35:09 +01:00
Paul Holden
ea45aefe62 MDL-74675 reportbuilder: preserve column type during aggregation.
When applying callbacks during the group concatenation aggregation
types, ensure the column type is preserved for it's default value.
2022-05-19 16:04:37 +01:00
Paul Holden
1e2dd85346 MDL-74600 reportbuilder: re-factor menu helper methods into exporters.
Encapsulate generation of column/audience menu card data, used in the
editor, from helper class methods to specific exporter classes.
2022-05-19 15:56:37 +01:00
Paul Holden
bc206fdec3 MDL-74165 reportbuilder: helpers to create multiple params/aliases. 2022-05-04 13:08:55 +01:00
Sara Arjona
d51c17a2ca Merge branch 'MDL-74076' of https://github.com/paulholden/moodle 2022-03-17 16:58:00 +01:00
Jun Pataleta
6e528ca463 MDL-74173 reportbuilder: Convert action links to action menu links 2022-03-11 18:35:16 +08:00
Paul Holden
2916f89d12 MDL-74106 reportbuilder: handle non-recurring schedules properly.
When a schedule is created with "No recurrence", it should only be
sent when both conditions are true: it's start time is after the
current time; and the time it was last sent is before it's start
time (either 0/never sent; or a time it was manually sent).
2022-03-07 15:47:33 +00:00
Paul Holden
ad7583cd33 MDL-74076 reportbuilder: deterministic ordering of schedule users.
Now that we have consistent ordering we can also revert 898f3d0a.
2022-03-04 15:25:22 +00:00
Eloy Lafuente (stronk7)
fba1593893 Merge branch 'MDL-73941' of https://github.com/paulholden/moodle 2022-03-01 16:10:37 +01:00
Paul Holden
0ead4cefd2 MDL-73983 reportbuilder: fix pre-defined action title attribute.
Since switching to report actions being displayed via action menus
in 48a6e927, pre-defined action titles weren't displayed.
2022-02-28 13:37:43 +01:00
Paul Holden
b95a655a33 MDL-73941 reportbuilder: return localised floats when aggregating.
As the 'average' and 'percentage' aggregation types both return
float values, we should ensure they are output with localised
formatting (e.g. decimal separator).
2022-02-20 07:43:32 +00:00
Paul Holden
a73d989a65 MDL-73682 reportbuilder: allow columns to define how they're sorted. 2022-02-02 10:17:56 +00:00
Ilya Tregubov
c94d463afa Merge branch 'MDL-73706' of git://github.com/paulholden/moodle 2022-01-31 16:59:15 +02:00
Paul Holden
eb2e261df4 MDL-73706 reportbuilder: fix count for columns with multiple fields.
When using the "Count distinct" aggregation type on a column that
selects multiple fields, we should account for each of them in the
returned SQL.

Move helper method to facilitate this to the base aggregation class
so it can be re-used between all types.
2022-01-28 15:38:40 +00:00
Jun Pataleta
fbc3e7568e Merge branch 'MDL-73493' of git://github.com/paulholden/moodle 2022-01-24 17:32:32 +08:00
Paul Holden
628541b5e1 MDL-73493 reportbuilder: correct handling of empty string in filters.
This is specifically for Oracle, which treats empty strings and NULL
in an inconsistent manner unless passed as query parameters. Increase
test coverage of the same.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2022-01-21 15:43:01 +00:00
Paul Holden
a844d885b2 MDL-73180 reportbuilder: improve relative date filter definitions.
Changes since the original implementation in e55abd71 mean that
relative date filtering (by last/next day/week, etc) is now based
on the actual current time, rather than the start or end of the
current time unit.
2022-01-19 08:22:03 +00:00
Paul Holden
ee566b88a8 MDL-72757 reportbuilder: improve model event tests.
Remove some boilerplate/duplication in the current test methods
using @depends annotation to pass persistents between them.
2022-01-10 17:21:23 +01:00