Commit graph

201 commits

Author SHA1 Message Date
David Matamoros
8cc2a86b1b MDL-73983 reportbuilder: Don't add empty report action links 2022-02-28 13:36:08 +01:00
Eloy Lafuente (stronk7)
fa2121e333 Merge branch 'MDL-73745' of https://github.com/paulholden/moodle 2022-02-28 11:29:03 +01:00
Paul Holden
425f372044 MDL-73996 reportbuilder: sort caught messages prior to assertions. 2022-02-25 09:58:21 +00:00
Paul Holden
600cd22b0f MDL-73745 reportbuilder: check for presence of active column headers. 2022-02-24 16:26:56 +00:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Sara Arjona
9d1b516807 Merge branch 'MDL-72061-master' of https://github.com/dravek/moodle 2022-02-21 16:00:44 +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
Sara Arjona
944bebb35c Merge branch 'MDL-73887' of git://github.com/paulholden/moodle 2022-02-17 10:48:58 +01:00
Jun Pataleta
5f8718e35c Merge branch 'MDL-73835' of git://github.com/paulholden/moodle 2022-02-16 22:01:00 +08:00
Ilya Tregubov
249bf250fd Merge branch 'MDL-73837' of git://github.com/paulholden/moodle 2022-02-16 13:52:47 +02:00
Paul Holden
be54872a2c MDL-73887 reportbuilder: make the select filter easier to extend.
Allow custom filters to extend the filter, and override/set the
operators/values fields internally.
2022-02-15 11:21:11 +00:00
Paul Holden
d8158c4532 MDL-73835 reportbuilder: ensure same report instance is exported.
The exported system report should be re-created using all properties
of the persistent, as well as any passed parameters.
2022-02-14 11:51:57 +00:00
David Matamoros
af84b168b6 MDL-73869 reportbuilder: Fix casting to string in report actions 2022-02-14 12:02:22 +01:00
Eloy Lafuente (stronk7)
057a21e381 Merge branch 'MDL-73836' of https://github.com/paulholden/moodle 2022-02-10 21:12:19 +01:00
Jun Pataleta
9dd8909360 Merge branch 'MDL-73811' of https://github.com/paulholden/moodle 2022-02-10 22:41:47 +08:00
Paul Holden
b393248400 MDL-73837 reportbuilder: use column attributes in system reports. 2022-02-10 13:17:01 +00:00
Paul Holden
14b6334133 MDL-73836 reportbuilder: allow pre-defined action title attribute. 2022-02-10 12:38:25 +00:00
David Matamoros
ad35d520c8 MDL-72061 reportbuilder: Fix lost focus on action menu items 2022-02-09 17:19:48 +01:00
David Matamoros
48a6e92700 MDL-72061 reportbuilder: Report actions are shown in action menus 2022-02-09 15:55:08 +01:00
Paul Holden
683fc4d9d1 MDL-73811 reportbuilder: ensure audience cards are uniquely keyed. 2022-02-08 16:35:59 +00:00
Andrew Nicols
68ae89ccc4 Merge branch 'MDL-73631' of https://github.com/paulholden/moodle 2022-02-08 12:03:42 +08:00
Mikel Martín
268157743f MDL-73116 reportbuilder: Use triggerElement parameter to return focus 2022-02-07 11:33:35 +01:00
Paul Holden
108feb6ffa MDL-73631 reportbuilder: singular, pivoted Behat data generators. 2022-02-03 08:31:01 +00:00
Paul Holden
a73d989a65 MDL-73682 reportbuilder: allow columns to define how they're sorted. 2022-02-02 10:17:56 +00:00
Paul Holden
f37b67564a MDL-73682 reportbuilder: move active columns method to datasource.
This is consistent with similar methods for retrieving the active
filters and conditions of a given custom report.
2022-02-02 09:30:00 +00:00
Ilya Tregubov
c94d463afa Merge branch 'MDL-73706' of git://github.com/paulholden/moodle 2022-01-31 16:59:15 +02:00
Ilya Tregubov
2708e7ef60 Merge branch 'MDL-72756' of git://github.com/paulholden/moodle 2022-01-31 15:12:21 +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
fd452f2fa2 Merge branch 'MDL-73470' of https://github.com/roland04/moodle 2022-01-28 11:02:01 +08:00
Paul Holden
9626002d56 MDL-72756 reportbuilder: implement tests covering privacy updates. 2022-01-27 12:04:05 +00:00
David Matamoros
ed55c7ecd6 MDL-72756 reportbuilder: Implement privacy provider
Co-authored-by: Paul Holden <paulh@moodle.com>
2022-01-27 12:04:03 +00:00
Mikel Martín
795087462f MDL-73470 core: Move toggle template to core 2022-01-25 18:04:58 +01:00
Jun Pataleta
fbc3e7568e Merge branch 'MDL-73493' of git://github.com/paulholden/moodle 2022-01-24 17:32:32 +08:00
Andrew Nicols
6bec1964cc Merge branch 'MDL-73598' of https://github.com/paulholden/moodle 2022-01-24 11:29:48 +08:00
Jake Dallimore
1fa04d2e06 Merge branch 'MDL-73180' of git://github.com/paulholden/moodle 2022-01-24 10:37:53 +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
Mikel Martín
eb65298bcd MDL-73166 core_reportbuilder: Fix action links accessibility 2022-01-20 09:48:29 +01:00
Paul Holden
335012580b MDL-73598 reportbuilder: feature switch for custom reports. 2022-01-19 23:20:52 +00:00
Carlos Castillo
3d8620854a MDL-73493 reportbuilder: Consider users without profile field defined
Include users who haven't defined text/checkbox custom profile field
in filter operators: 'Is not empty', 'Does not contain' and 'Is not equal to'.
2022-01-19 08:47:26 -05: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
Ilya Tregubov
c10cf765d0 Merge branch 'MDL-73495-master' of https://github.com/dravek/moodle 2022-01-17 09:14:48 +02:00
Shamim Rezaie
c4706a93ea Merge branch 'MDL-72757-master' of https://github.com/dravek/moodle 2022-01-13 18:29:28 +11:00
Jun Pataleta
8b73145310 Merge branch 'MDL-73467' of git://github.com/paulholden/moodle 2022-01-13 11:43:32 +08:00
Paul Holden
b625b9ffed MDL-73467 reportbuilder: consistent scheduled report export class.
Use the same dataformat exporter in scheduled reports as that used
when downloading reports, from 7d753bed.
2022-01-12 17:41:41 +00:00
Mikel Martín
142277dfcb MDL-73469 reportbuilder: Fix clipped corners
- Fix clipped corners in toggle cards
- Fix left corners in left sidebar search input
2022-01-12 15:27:48 +01: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
David Matamoros
c6bf7d791e MDL-73495 reportbuilder: Fix generation of dynamic tabs 2022-01-05 13:16:13 +01:00
David Matamoros
39b90208e1 MDL-72757 reportbuilder: Events for CRUD operations on report models 2022-01-05 09:55:36 +01:00