- Fix focus after adding conditions in the editor
- Fix focus after adding Filters in the editor
- Fix focus after applying sorting settings in editor
- Fix focus after selecting column aggregation in editor
This change overcomes limitations in certain DB engines (such as
MySQL[1]) which can lead to truncation of data when applying group
concatenation to columns.
Ensure we account for that by validating that we are able to extract
the expected number of fields from each concatenated value.
[1] https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_group_concat_max_len
This option allows report creators to avoid duplicate data being
displayed in their report. It is applied only when no columns in the
report currently have aggregation methods applied.
- Show a toast notification when saving an audience
- Add form change checker when adding a new audience to prevent user from navigating away if it is not saved
- Remove expand/collapse animation in audience sidebar to be consistent with editor
Co-authored-By: Paul Holden <paulh@moodle.com>
- Don't allow to set a report name containing only blank spaces when
creating a new report or editing an existing report name.
- Removed TODO from code related to MDL-71086
We should gracefully handle invalid element models that refer to
columns, filters, conditions that are no longer defined within the
report/entity they are linked to.
Use delimeters that are less likely to conflict with genuine row
content, for both column fields and field values, in the group
concatenation aggregation methods.
Statically cache list of loaded reports during request lifecycle,
this ensures that computationally heavy initialisation routines
in system reports are only executed once (e.g. the access tab).
This fixes an issue for system reports that are initialised with
parameters (such as the access report). Previously these parameters
were not preserved, when sorting/paging them via AJAX requests.
We now defer the initialisation of the report until the table
filterset has been set, ensuring all parameters are available.
This tab includes a system report that provides a listing of all
users who can access the report, taking into account all audiences
that have been created for it. Update page of users available
reports to obey audience configuration.
Fix filters JS form to ensure it is only loaded once.
Co-authored-by: Mikel Martín <mikel@moodle.com>
Add new tab to editor, allowing user to select from available audience
types in order to grant access to their reports.
Co-authored-by: David Matamoros <davidmc@moodle.com>
Create the base audience class, to be extended by all audience types
across the site. Implement types allowing audiences to be created per
user, cohort or system role assignment.
The helper class is used for interrogating report audience instances
and retrieving access lists of those users able to view specific
reports.
Co-authored-by: Paul Holden <paulh@moodle.com>
In preparation for further tabs in this interface, convert the report
editor to use the Dynamic tabs API.
At the same time, update the editor JS and it's modules to add listeners
on `document` instead of the report element itself, which will move in
and out of the current DOM in the future as tabs are switched.
Co-authored-by: Paul Holden <paulh@moodle.com>
Create new entity for exposing report data on course categories,
joining it to the course entity to provide data for the reportbuilder
editor.
Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
The group concatenation types now consistently sort the returned values
and support aggregating columns containing multiple fields and those
with defined callbacks.