When updating/deleting a section/module, the system now only
invalidate of the element (section/module), not the whole course cache
Also, the system now only recalculate the cache for element (section/module)
if necessary, not the whole course cache
Move module/section purging to course_modinfo:
+ course_modinfo::purge_course_section_cache_by_id was created to purge section by id
+ course_modinfo::purge_course_section_cache_by_number was created to purge section by number
+ course_modinfo::purge_course_module_cache was created to purge module
For legacy reasons, the course renderings uses a format setting to know
if the page is multiple sections per page or a single section per page.
This format specific dependency is not solved using a get_course_display
format method any plugin can extend.
Now content and course index sections have special mutations to store
the collapsed preferences. This way the backend implementation is
independent of the frontend one and can use caches or other kind of
optimizations of necessary.
Move the section visible logic to the format base class. This way format
plugins can decide whenever a section is visible or not instead of using
format custom settings from core.
The course index is the first UI component that implements the new
drawers and the reactive components. The course index uses the course
state to present the current course structure and changes whenever
that structure change.