-
Improvement
-
Resolution: Deferred
-
Major
-
None
-
3.8
MDL-66075 added the export feature, controlled by a cap.
The changes to lib here:
https://github.com/lameze/moodle/commit/75af28c73fa19174cdd3f8a9ff1c77f10b7096af#diff-968b624e975ad3df52446c206926d60aR5251
Add an extra DB call as it fetches the forum (entities/forum object) from the repository. The entity is used by the capability manager later on here:
https://github.com/lameze/moodle/commit/75af28c73fa19174cdd3f8a9ff1c77f10b7096af#diff-968b624e975ad3df52446c206926d60aR5389
Given, there's a call to fetch a forumobject (a stdClass) right at the start of this method, and then the vault/repo code fetches from the DB AGAIN, I think this needs improving. Perhaps we can ONLY use the entity and just refactor the method code to suit - I'm not sure.
Just using has_cap instead of the manager work (reduces reads), but this isn't ideal. We want to be using the cap manager.
- has been marked as being related by
-
MDL-66075 Epic: Create forum export functionality
- Closed