-
Improvement
-
Resolution: Fixed
-
Minor
-
5.0
-
MOODLE_500_STABLE
-
MOODLE_500_STABLE
-
MDL-83542-main -
-
-
-
3
-
HQ 2024 Sprint I4.2 Moppies
The course editor uses a frontend cache to prevent unnecessary reloadings. However, if there is some chang in the course, the backend can call core_courseformat\base::session_cache_reset or core_courseformat\base::session_cache_reset_all to force reloading the frontend cache.
When the cache was implemented, Moodle did not have a proper hooks implementation, and many of the session cache resets were introduced in all the places where the course is edited.
This issue involves reviewing all places where the cache reset is triggered and relocating them to hooks. In many cases, the hooks already exist; in others, it presents an excellent opportunity to create useful new hooks.
All listeners should be placed in course/format/classes/hook_listener.php created in MDL-83185.