480 Commits

Author SHA1 Message Date
Andrew Nicols
349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
David Matamoros
0457fb6675 MDL-70795 reportbuilder: allow user to view custom reports.
Reports can be viewed via two methods. Non-editing users can
access them via their report listing page, and report editors
can switch between editing and preview mode while working on
their reports.

Clean up remaining string definitions.

Co-authored-by: Mikel Martín <mikel@moodle.com>
2021-10-19 13:57:30 +01:00
Paul Holden
f47e89a9bd MDL-70795 reportbuilder: editor elements to set column aggregation.
Aggregation of report columns allows the report editor to perform
common types of data aggregation (concatenation, sum, count, etc)
on given columns.
2021-10-19 13:56:05 +01:00
David Matamoros
db7102eba5 MDL-70795 reportbuilder: report configuration for default sorting.
Co-authored-By: Mikel Martín <mikel@moodle.com>
2021-10-19 13:56:05 +01:00
Mikel Martín
9000d8d1a0 MDL-70795 reportbuilder: theme updates for custom report editor.
Includes nice interactions for element drag & drop, consistent
styling for templates and tidy up of element alignment/spacing.
2021-10-19 13:56:04 +01:00
David Matamoros
09b69d04e3 MDL-70795 reportbuilder: custom report filters editor.
Implement module for filters editing, allowing the report
editor to define which filters are available when users
are viewing the report.

These filters allow those users viewing the report to further
limit the data being displayed (after conditions have been
applied), by selecting their own values for each filter.

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-10-19 13:56:04 +01:00
Paul Holden
ab596ec11a MDL-70795 reportbuilder: custom report condition editor.
Report conditions allow report creators to limit which data
is displayed when the report is viewed. Users viewing the
report cannot override these condition values.
2021-10-19 13:56:04 +01:00
Paul Holden
8ca9e04f9a MDL-70795 reportbuilder: beginnings of the report editor.
Implement UI elements for editing columns of a report, taking their
definitions from the selected datasource.

Co-authored-By: David Matamoros <davidmc@moodle.com>
Co-authored-By: Mikel Martín <mikel@moodle.com>
2021-10-19 13:56:02 +01:00
David Matamoros
22d896e063 MDL-70795 reportbuilder: add interface for creating reports.
Implement elements for creating/editing reports, along with
new system report for listing and accompanying JS modules for
user interaction.

Create "Users" datasource as proof-of-concept.

Co-authored-By: Paul Holden <paulh@moodle.com>
2021-10-19 13:55:30 +01:00
Paul Holden
95967d62d5 MDL-70795 reportbuilder: define updated schema for custom reports.
Define new filter/column models, and updated database schema to
match.
2021-10-19 13:48:27 +01:00
Paul Holden
15d5f7a919 MDL-72774 reportbuilder: consistent layout of date/duration filters. 2021-10-13 13:33:49 +01:00
Jun Pataleta
34b2639c70 Merge branch 'MDL-72682' of git://github.com/paulholden/moodle 2021-10-07 14:33:38 +08:00
Ilya Tregubov
af94d5b09c Merge branch 'MDL-72662' of git://github.com/paulholden/moodle 2021-10-06 14:01:21 +07:00
Paul Holden
3aecdf42ec MDL-72682 reportbuilder: indicate count of applied report filters. 2021-10-06 01:29:58 +01:00
Carlos Castillo
a9f45b0842 MDL-72691 reportbuilder: Encode popup data inside report actions.
Encode all popup data for report actions inside the action link
itself, because previously reloading a report via AJAX meant
actions no longer opened in popups, because the required JS was
absent from the page.
2021-10-04 09:59:42 -05:00
Paul Holden
e55abd713e MDL-72662 reportbuilder: add relative date options to date filter.
Allow user to filter dates relative to the current date, e.g dates
within the previous year, the current week or next month.
2021-10-03 11:53:11 +01:00
Andrew Nicols
29662c3488 Merge branch 'MDL-72329-master' of https://github.com/dravek/moodle 2021-10-01 11:02:28 +08:00
Andrew Nicols
26f7355965 Merge branch 'MDL-72545' of https://github.com/paulholden/moodle 2021-09-30 12:17:06 +08:00
Paul Holden
8f3c7e6e8c MDL-72545 reportbuilder: reload form fragment after filter reset.
Instead of performing a page reload after resetting report filters,
we can use the fragment API to re-render the form after the user
presses the reset button.
2021-09-24 08:20:38 +01:00
Paul Holden
bd258be549 MDL-67686 reportbuilder: new duration filter type.
This report filter can be used for filtering reports by given
duration, via selection of time value and unit (seconds, minutes,
hours, etc).
2021-09-24 08:14:37 +01:00
David Matamoros
ab4d4b4724 MDL-72329 reportbuilder: Remove custom persistent getter 2021-09-24 08:45:09 +02:00
Paul Holden
a23eb3784e MDL-72315 reportbuilder: fix/improve module jsdoc. 2021-08-11 09:13:12 +01:00
Paul Holden
a4a3721081 MDL-71070 reportbuilder: consistent user fullname columns sorting.
Report columns that display the fullname of users should behave
in a consistent manner with current functionality of tables, in
regards to sorting by each individual component of a name (first
name, middle name, surname, etc).

To facilitate this, instead of a hard-coded assumption that such
columns are always named 'fullname', table classes can now define
additional columns containing a users name.
2021-08-03 12:05:59 +01:00
Paul Holden
ef3c605b02 MDL-70794 reportbuilder: user interface for using report filters.
The report filter form is implemented as a dynamic form. Implement
accompanying AMD module for interacting with it here (applying and
resetting report filters).

Co-Authored-By: Mikel Martín <mikel@moodle.com>
2021-07-28 16:40:50 +01:00
David Matamoros
9f814ffec0 MDL-70794 reportbuilder: privacy provider implementation.
Note that although system report persistents store user modified
and created fields, these are not the values of the user who did
either. Merely the user who first viewed the report.
2021-07-28 16:40:50 +01:00
Sara Arjona
7a63ff9f0b MDL-70794 reportbuilder: introduce the concept of report entities.
Entities are re-usable collections of report columns and filters. When
creating system reports, we can re-use those elements from entities
without having to know specific details about their implementation.

They can be joined to reports, or other entities, using standard SQL
query syntax.

Define base classes, and create two example entities: course and user.

Co-Authored-By: David Matamoros <davidmc@moodle.com>
2021-07-28 16:40:50 +01:00
Paul Holden
514caaa4ea MDL-70794 reportbuilder: output components and classes.
This change contains most of the output components required for
reports such as exporters, templates, AMD modules.

Also included are classes within the component table namespace which
are required for extending the dynamic table API.
2021-07-28 16:40:50 +01:00
Paul Holden
93025be2e7 MDL-70794 reportbuilder: management and further utility classes.
We define the base classes and APIs for reports, that can contain
columns and filters instances themselves.
2021-07-28 16:40:50 +01:00
David Matamoros
2a20238924 MDL-70794 reportbuilder: implement report filters and filter types.
Implement base filter classes as well as commonly used filter types
(e.g. text, date, select, etc).

Filters are used in reports to allow users to narrow down the data
that is being displayed.

Co-Authored-By: Paul Holden <paulh@moodle.com>
2021-07-28 16:40:50 +01:00
Paul Holden
907ff8555f MDL-70794 reportbuilder: implement report column and action classes.
The column class encapsulates all data related to a report column. It
allows developers to define the type of data contained within it, in
addition to how that data is retrieved and formatted for users.

Report actions are used to define action elements that are added to
each report row. They define an icon and link, and can be used to
direct users to related pages according to the current row data.
2021-07-28 16:40:50 +01:00