-
Improvement
-
Resolution: Fixed
-
Major
-
4.4
-
MOODLE_404_STABLE
-
MOODLE_404_STABLE
-
As our number of custom/system report entities has grown, so has the number of table aliases that are defined within them
The current API requires each entity to define the tables it uses, plus the default alias each should have - while trying to ensure each is unique
Take for example the 'context' table that is used by many entities, each trying to define a unique alias:
- https://github.com/moodle/moodle/blob/ecddfa6ccd8fa1390cf84a568baee78816b549aa/admin/roles/classes/reportbuilder/local/entities/role.php#L43
- https://github.com/moodle/moodle/blob/ecddfa6ccd8fa1390cf84a568baee78816b549aa/badges/classes/reportbuilder/local/entities/badge.php#L54
- https://github.com/moodle/moodle/blob/ecddfa6ccd8fa1390cf84a568baee78816b549aa/cohort/classes/reportbuilder/local/entities/cohort.php#L51
- The above is a sample of only 3 out of 12 instances, you get the idea...
This also leads to developers having to manually resolve any duplicate aliases themselves:
- https://github.com/moodle/moodle/blob/ecddfa6ccd8fa1390cf84a568baee78816b549aa/blog/classes/reportbuilder/datasource/blogs.php#L91-L95
- https://github.com/moodle/moodle/blob/ecddfa6ccd8fa1390cf84a568baee78816b549aa/course/classes/reportbuilder/datasource/categories.php#L63-L69
- https://github.com/moodle/moodle/blob/ecddfa6ccd8fa1390cf84a568baee78816b549aa/notes/classes/reportbuilder/datasource/notes.php#L71-L78
Simplify all of this by ensuring that all entity table aliases are auto-generated, so developers don't need to handle table alias uniqueness in their own entities, or duplication in their reports
Make sure it's backwards-compatible with current API, emitting developer debugging when necessary
- blocks
-
MDL-79496 Convert manage tokens report to system report
- Closed
-
MDL-79552 Add cohort data (columns/filters) to user-focused reports
- Closed
-
MDL-80014 Report entity method for retrieving all table aliases at once
- Closed
- has been marked as being related by
-
MDL-78427 New theme usage report
- Closed
- has to be done before
-
MDL-80430 Final removal of report builder default table alias support
- Waiting for integration review