63 Commits

Author SHA1 Message Date
Mikel Martín
ad14d58dc5 MDL-85077 theme_boost: Fix responsive tables after BS5 upgrade
- Replace class 'no-overflow' with 'table-responsive' for responsive tables.
- Fix dropdown positioning inside responsive tables.
- Fix visually-hidden elements inside tables generating incorrect page scrolling.
2025-04-10 10:28:23 +02:00
Paul Holden
b445a4ee1e
MDL-84789 reportbuilder: consistent user name sort by aliased field.
More work built upon e76d99f2, we need to perform the alias processing
earlier to ensure that it works for system reports where user sorting
isn't the default.
2025-03-10 13:31:33 +00:00
Mikel Martín
11657fe082 MDL-84692 theme_boost: Update .btn-icon class
- Update and improve styles for .btn-icon helper class for consistency.
- Added new $btn-icon-border-radius SCSS variable to cuztomize the btn-icon
border radius.
- Fix and simplify current .btn-icon usages
2025-03-04 10:23:00 +01:00
Mikel Martín
5416483611 MDL-75669 theme_boost: Refactor BS5 data attributes
Data attributes for all Bootstrap5 JavaScript plugins are now namespaced
to help distinguish Bootstrap functionality from third parties and your own code.
For example, data-bs-toggle instead of data-toggle.
This commit refactor all old Bootstrap data-attributes to the new syntax.

Co-authored-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-02-14 09:10:33 +01:00
Jun Pataleta
6b9e75f685
Merge branch 'MDL-84016' of https://github.com/paulholden/moodle 2025-02-06 09:36:07 +08:00
Paul Holden
dd3af70440
MDL-74488 reportbuilder: method for retrieving report row counts. 2025-02-05 17:38:21 +00:00
Paul Holden
0c090789f9
MDL-84016 reportbuilder: column methods for setting help icons.
This change exposes the underlying table library API for setting
help icon for table headers, via column instance getter/setter.

Support added for rendering said icons in system reports.
2025-01-29 11:50:10 +00:00
Paul Holden
812975e218
MDL-83361 reportbuilder: date aggregation for timestamp columns.
This change introduces updates to the existing aggregation API, to
allow types to define whether to group by fields of a column to which
the aggregation is applied.

The new date aggregation utilises this, to allow for creation of time
series reports, e.g. report data grouped by dates.

Co-authored-by: Daniel Neis Araujo <danielneis@gmail.com>
2024-12-13 12:36:22 +00:00
Mikel Martín
f9abc562f5 MDL-81825 theme_boost: Refactor .sr-only usages for BS5
- Add .visually-hidden to the Boostratp 5 bridge SCSS file
- Replace .sr-only occurrences with .visually-hidden
- Replace .dropzone-sr-only-focusable  with .dropzone-visually-hidden-focusable
  for consistency
2024-12-10 14:02:32 +01:00
Paul Holden
e76d99f29d
MDL-83718 reportbuilder: use aliased user fullname sort fields.
This is extending work started in 8f32e623 that removed duplicate
fields when sorting user fullname columns (to ensure compatibility
across supported DBs).

We must now refer to these sorted fields by their alias in order to
ensure they continue working when processed from the report table.

Co-authored-by: David Carrillo <davidmc@moodle.com>
2024-12-03 13:17:41 +00:00
Paul Holden
02186de904
MDL-83718 reportbuilder: use window count method to get table data.
Use the new "counted recordset" DML API from 42664ee49a to obtain
the raw table data for reports. For those databases with defined
support for count window functions, this should give a performance
benefit by combining the count and main query into one request.
2024-11-19 18:07:04 +00:00
Paul Holden
26bb378e88
MDL-82809 reportbuilder: always apply conditions to custom report.
Including those that are otherwise unavailable to the current user,
ensuring that they are always applied when viewing report output.
2024-10-16 10:51:36 +01:00
Paul Holden
e8f5f7d23d
MDL-80562 reportbuilder: switch to menu/ellipsis icon for actions. 2024-09-04 07:48:50 +01:00
Marina Glancy
bb466df202 MDL-82567 core: Add has_capability method
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
Co-authored-by: Jun Pataleta <jun@moodle.com>
2024-08-28 03:34:17 +00:00
Mikel Martín
6a5cb2e2a2 MDL-75671 theme_boost: Refactor border direction classes for BS5
- Add SCSS code for border direction utility classes to the Boostrap 5 bridge SCSS file
- Replace all occurrences in the codebase (border-left > border-start, border-right-0 > border-end-0, ...)
2024-08-09 07:40:18 +02: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
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
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
Paul Holden
8f32e623bb
MDL-79270 reportbuilder: remove duplicate columns from order clause.
This works around a problem in SQL Server, which caused it to throw a
DML exception if the same column is duplicated in `ORDER BY` clause.
2023-12-13 17:17:54 +00:00
Jake Dallimore
348e347f79
MDL-78575 core_reportbuilder: allow reports to override the zerostate
Allow report implementations to control what is shown when no results
are found for the current report+filters. Allow setting to null to
allow calling code to omit this notice entirely.
2023-07-10 15:55:56 +08:00
Paul Holden
8f7bff9789
MDL-76900 reportbuilder: allow for deprecation of entity elements.
Don't allow deprecated columns/filters to be added to new custom
reports. Where they already exist, emit deprecation debugging.
2023-05-17 08:02:06 +01:00
Mikel Martín
96215abdc8 MDL-77223 reportbuilder: Fix first report column as integer 2023-02-13 16:15:38 +01:00
Paul Holden
648b80c201 MDL-76591 comment: convert existing overview page to system report.
Re-use the entity definitions previously created in fdf2f8f3 for
custom reporting, to create a new system report class.
2023-01-30 15:53:59 +00:00
Paul Holden
2d5b6d0e01 MDL-74145 reportbuilder: system report API for adding row checkboxes. 2022-12-16 12:09:28 +00:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Ilya Tregubov
1a89fd6287 Merge branch 'MDL-72058' of https://github.com/paulholden/moodle 2022-10-20 15:43:02 +03:00
Jun Pataleta
5ed4ea149a Merge branch 'MDL-74913' of https://github.com/lostrogit/moodle 2022-10-11 12:18:46 +08:00
Víctor Déniz
42e53489d7 Merge branch 'MDL-75729' of https://github.com/paulholden/moodle 2022-10-05 21:31:59 +01:00
Paul Holden
5b353b73d6 MDL-72058 reportbuilder: replace custom dataformat export format.
The formatting of exported dataformat content is now always dependent
on whether the format supports HTML or not, so we no longer need our
custom export class for providing the same.
2022-10-03 09:16:06 +01:00
Carlos Castillo
a930def22b MDL-74913 core_reportbuilder: Add divider to the report action menu 2022-10-03 09:48:43 +02:00
Paul Holden
959cdefa40 MDL-75721 reportbuilder: select from main table in absence of columns.
Ensure any joins added to the report itself are also present.
2022-09-15 17:07:29 +01:00
Paul Holden
71a7537edd MDL-75729 reportbuilder: improve handling of card toggle button. 2022-09-14 10:18:52 +01:00
Paul Holden
8a657e6d23 MDL-74140 reportbuilder: debugging panel while editing reports. 2022-09-12 10:36:48 +01:00
Carlos Castillo
ac7713b7b0 MDL-74721 reportbuilder: Disabling live editing in custom reports 2022-07-10 16:52:25 -05:00
Paul Holden
6b6a040084 MDL-73184 reportbuilder: preserve pagesize property between requests.
Given that custom reports can now have defined pagesize properties, we
need to preserve that value in the table filterset so that it's always
available after AJAX requests.
2022-05-16 17:49:41 +02:00
Mikel Martín
0908a1bdeb MDL-73184 reportbuilder: Add default page size setting 2022-05-16 17:49:35 +02:00
Jun Pataleta
1aa65fbdfe Merge branch 'MDL-73902-master' of https://github.com/bmbrands/moodle 2022-03-04 18:28:18 +08:00
Bas Brands
729ae8f096 MDL-73902 theme_boost: prevent dropdowns being cut off 2022-03-03 09:44:33 +01:00
Jun Pataleta
37e6306cda Merge branch 'MDL-73983-master' of https://github.com/dravek/moodle 2022-03-01 09:48:18 +08: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
David Matamoros
8cc2a86b1b MDL-73983 reportbuilder: Don't add empty report action links 2022-02-28 13:36:08 +01:00
Paul Holden
600cd22b0f MDL-73745 reportbuilder: check for presence of active column headers. 2022-02-24 16:26:56 +00: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
b393248400 MDL-73837 reportbuilder: use column attributes in system reports. 2022-02-10 13:17:01 +00:00
David Matamoros
48a6e92700 MDL-72061 reportbuilder: Report actions are shown in action menus 2022-02-09 15:55:08 +01: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
Paul Holden
98e7d99720 MDL-73468 reportbuilder: observe configured sorting when editing.
Users preferred sorting (via clicking on column headers) should only
take effect when pre/viewing the report, not when editing it.
2021-12-30 11:35:07 +00:00
Paul Holden
7d753bed0b MDL-73275 reportbuilder: dataformat exporter for downloading.
If the current dataformat doesn't support HTML then clean the text
and remove all tags.
2021-12-06 10:41:29 +00:00
Paul Holden
be11216d30 MDL-72826 reportbuilder: per-report option to show only unique rows.
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.
2021-11-16 13:59:16 +00:00