-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.18, 4.1.19, 4.5.5
-
None
-
2024051300
-
MOODLE_401_STABLE, MOODLE_405_STABLE
Steps to reproduce
- Go to the report management in the "Configurable reports" block.
- Create a new SQL report or edit an existing SQL report.
- Go to the "Custom SQL" tab.
- Scroll down the page to the following fields:
- 1) Choose a remote report categories
- 2) Choose a report form the list
- SQL query
- Try to select the SQL query category and query.
Actual behavior
You can select a query category, but no queries appear in the query drop-down list, and there are no query categories there either. As a result, you cannot load a SQL query from the repository into the corresponding field.
Expected behavior
When you select a query category, queries from the selected category appear in the query drop-down list. You can select a query and it will appear in the "SQL query" field for queries loaded from the repository.
Additional information
Seems like most JS has been moved to AMD (moved in 3.3.0 (2019121900) and 3.6.0 (2019021500)) but there is still some in /blocks/configurable_reports/js/configurable_reports.js which starts with "TODO needs to be converted to AMD and converted to vanila JS" and contains functions onchange_reportcategories and onchange_reportsincategory that are not functional now.
It's probably time to complete the AMD transition and restore SQL query functionality.