Commit graph

618 commits

Author SHA1 Message Date
Carlos Castillo
5f93155c8c MDL-82133 reportbuilder: Move out RB exceptions to the L2 namespace 2024-06-12 09:02:29 +02:00
Jun Pataleta
7751f509ef
Merge branch 'MDL-76392' of https://github.com/paulholden/moodle 2024-06-11 17:23:55 +08:00
Paul Holden
78f56cffde
MDL-76392 reportbuilder: migrate manual to native report aggregation.
Now that system reports support aggregation natively, we can replace
a whole bunch of similar code containing hand-rolled versions with much
simpler/consistent use of API.
2024-06-07 16:08:22 +01:00
Dan Marsden
963afc4516
MDL-76392 reportbuilder: allow aggregation in system reports.
Co-authored-by: Paul Holden <paulh@moodle.com>
2024-06-07 01:05:35 +01:00
Paul Holden
7c3b8c0a40
MDL-82068 reportbuilder: re-factor SQL JOIN collection to trait.
Replace identical implementation of the same in various classes with
usage of the new trait. Implement constructor property promotion in
modified classes at the same time, to help clean up/clarify class
properties.
2024-06-05 13:36:22 +01:00
Paul Holden
a33e54c08f
MDL-82041 reportbuilder: switch time-sensitive code to new Clock API.
Where current implementation, and more specifically tests, rely on the
current time then replace that with the PSR-20 Clock from 298c13ac3b.

Applicable updates to the date filter and report scheduling calculation.
2024-05-31 15:37:42 +01:00
Sara Arjona
5d6c6bf81c
NOBUG: Add upgrade notes 2024-05-30 17:00:19 +02:00
Ilya Tregubov
8f9e93f5a3 NOBUG: Add upgrade notes 2024-05-24 10:51:52 +08:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Sara Arjona
a7097cd8d4
Merge branch 'MDL-81168' of https://github.com/paulholden/moodle 2024-05-14 17:36:52 +02:00
Paul Holden
9b827c09ce
MDL-81434 reportbuilder: ensure filter/condition parameter uniqueness.
This change fixes an edge case that could be triggered by creating a
custom report that contained a filter instance that was active as both
a filter and condition, where the filter instance provides parameters
to it's SQL fragment.

There is only one such filter present currently with which we can test
this, see 2f9001cbe9.
2024-05-10 09:48:52 +01:00
Paul Holden
d9f05b81d0
MDL-81168 reportbuilder: better float input support in filters.
Support localised float values in filter forms, so that locales that
use different decimal separators work as expected.

Note lack of current support in the date filter.
2024-05-10 09:47:21 +01:00
Jun Pataleta
53a059fb9b
Merge branch 'MDL-81330' of https://github.com/paulholden/moodle 2024-05-09 11:49:18 +08:00
Jun Pataleta
823c7d752e
Merge branch 'MDL-81399' of https://github.com/paulholden/moodle 2024-05-09 11:45:45 +08:00
Jun Pataleta
44db44564e
Merge branch 'MDL-76690' of https://github.com/paulholden/moodle 2024-05-09 11:35:52 +08:00
Ilya Tregubov
7c535198ea Merge branch 'MDL-81433' of https://github.com/paulholden/moodle 2024-05-09 10:54:40 +08:00
Ilya Tregubov
52f49f3d7e Merge branch 'MDL-81754' of https://github.com/paulholden/moodle 2024-05-09 10:51:27 +08:00
Paul Holden
0fd8376451
MDL-76690 reportbuilder: final removal of deprecated helper methods. 2024-05-08 11:28:13 +01:00
Marina Glancy
49ab83c1a4 MDL-80907 various: fixes to incorrect column selectors in behat 2024-05-07 19:27:14 +01:00
David Carrillo
45b43d137f
MDL-81776 reportbuilder: Check tagarea enabled when check availability
- When checking availability for a column/filter we need to assert
tagarea is enabled because it can return also null value.
2024-05-03 11:40:35 +02:00
Paul Holden
260b786d53
MDL-81754 reportbuilder: consistent filter field comparison labels. 2024-05-01 11:19:16 +01:00
Paul Holden
bfde1fe687
MDL-81433 reportbuilder: return custom report tag data in WS calls. 2024-04-29 11:17:29 +01:00
Paul Holden
0a9715a88a
MDL-81330 reportbuilder: add cohort data to participants report source.
This is consistent with data added to similar sources that include user
attainment data, in this case users' course completion.
2024-04-29 11:14:16 +01:00
Paul Holden
e95cf00523
MDL-81399 reportbuilder: add language/timezone reporting for users. 2024-04-29 11:12:01 +01:00
Paul Holden
25780157bf
MDL-81603 reportbuilder: don't rely on real entity in datasource test. 2024-04-22 09:52:20 +01:00
Paul Holden
17fd4fe8f5
Merge branch 'MDL-81489' of https://github.com/lostrogit/moodle into main 2024-04-10 14:03:10 +01:00
Carlos Castillo
92211f291f MDL-81489 reportbuilder: Optional tags when create/update reports
Make tags property optional when create/update report.
2024-04-10 10:17:22 +02:00
David Carrillo
45d366d463
MDL-81488 reportbuilder: Fix incorrect string in report number filter 2024-04-10 09:23:10 +02:00
Shamim Rezaie
278ccdb7c4 Merge branch 'MDL-81126' of https://github.com/paulholden/moodle 2024-03-27 16:59:56 +11:00
Daniel Ziegenberg
08027e408c
MDL-81281 phpunit: assertObjectHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."

So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:45 +01:00
Daniel Ziegenberg
87267da39d
MDL-81281 phpunit: assertObjectNotHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectNotHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectNotHasProperty() instead."

So we replace all instances of assertObjectNotHasAttribute with
assertObjectNotHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:07 +01:00
Jun Pataleta
e366db6c55
Merge branch 'MDL-80843' of https://github.com/paulholden/moodle 2024-03-22 11:34:23 +08:00
Sara Arjona
484e52f6ae
Merge branch 'MDL-80245' of https://github.com/paulholden/moodle 2024-03-21 15:01:18 +01:00
Paul Holden
fbfcb6733d
MDL-80245 reportbuilder: implement interface elements for report tags.
Allow them to be edited during report creation/updating, display in
report listings table with filtering, and implement tag callback to
allow them to be discoverable across the site.
2024-03-21 13:11:22 +00:00
Sara Arjona
05dd0cd384
Merge branch 'MDL-80204-master' of https://github.com/izendegi/moodle 2024-03-13 12:24:41 +01:00
Iñigo Zendegi
a840d06652 MDL-80204 lang: Polysemic lang strings to & from
AMOS BEGIN
 CPY [to,moodle],[todate,moodle]
 MOV [to,moodle],[torecipient,moodle]
 CPY [from,moodle],[fromdate,moodle]
 MOV [from,moodle],[fromsender,moodle]
AMOS END
2024-03-12 11:51:03 +01:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
Ilya Tregubov
82859f1848 Merge branch 'MDL-80943' of https://github.com/paulholden/moodle 2024-03-08 09:21:44 +08:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Ilya Tregubov
a6fd25485e Merge branch 'MDL-80342' of https://github.com/paulholden/moodle 2024-03-07 08:51:25 +08:00
Paul Holden
47790ea315
MDL-80245 tag: allow for tags filter to operate in component mode.
This allows the filter to be more easily re-used for component system
reports that want to filter by their own tags.
2024-03-06 20:31:07 +00:00
Paul Holden
a1f064339d
MDL-80245 reportbuilder: define custom report tags area. 2024-03-06 20:31:07 +00:00
Paul Holden
4bd8f3a0dc
MDL-80943 reportbuilder: select-type customfields should be text.
The column type determines the available aggregation options present
for the column. Custom fields of type "select" should be considered as
text fields for this purpose, because their stored value represents
the index to their available options, rather than having any distinct
meaning of it's own for display.
2024-03-06 10:34:45 +00:00
Paul Holden
6eb1688887
MDL-81126 reportbuilder: relative date filter for after given period.
This is the inverse of the "before" date filter added in 198db552.
2024-03-05 11:51:00 +00:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Paul Holden
d3557d9483
MDL-80843 reportbuilder: consistent user auth report entity data.
Tidy up unit tests for user report, removing some redundancy and
duplication.
2024-02-23 09:28:44 +00:00
Paul Holden
7f342377bb
MDL-80342 cohort: new report filter class for selecting cohorts. 2024-02-21 16:34:35 +00:00
Sara Arjona
4a9be9001d
Merge branch 'MDL-80912' of https://github.com/paulholden/moodle 2024-02-20 15:39:18 +01:00
Huong Nguyen
f406ea8b76
Merge branch 'MDL-80936' of https://github.com/paulholden/moodle 2024-02-20 10:28:10 +07:00
Paul Holden
1acca870d9
MDL-80912 reportbuilder: output table caption when rendering reports.
Move the `get_name` method to the base report class, so that it can be
implemented by all report types. Provide a default implementation for
system reports based on the name of the class.

Use the name of the report as the caption. Target via Behat selectors.
2024-02-19 11:57:51 +00:00