- 'List of courses' is split into 'List of courses' (available) and 'Enrolled courses', CFG->disablemycourses is deprecated;
- CFG->frontpageloggedin by default shows list of available courses;
- There is separate item to display course search box
- CFG->maxcoursesincombo is deprecated
- CFG->maxcategorydepth changed default value to 2 since we have AJAX loading now
- FRONTPAGECOURSELIMIT is transformed to CFG->frontpagecourselimit
c
- Course categories caches are purged by event now
- session cache has additional 10 minutes ttl to clear itself and accomodate for permission changes that do not trigger event purging
- additional request-level cache for coursecat::get()
- We store only children of one category in one cache key
- Function coursecat::get_children() can return results sorted and/or paginated. Added tests
Also added a fix to the function course_page_type_list(). It was making a call to
get_context_info_array() which will generate an error if $currentcontext is not set.
Switching between categories view and edit no longer depend on global editing mode
/course/index.php and /course/category.php do not contain editing code
The central "content" region on My Home / user profile pages also needs to
be initialised in lib/ajax/blocks.php in order to allow blocks to be
dropped into that region successfully. Some tweaks were also necessary in
order to correct the "content" region's structure in order for drag-drop
to function on this region on these pages.
Non-standard block regions (including the central "content" region
used by My Home and user profile pages) were causing the temporary empty
block region used as a drop target to sometimes appear in the wrong place.
The call to init_requirements_data (which includes the block drag-drop JS)
happens at a late enough stage in page generation that we can simply
pass the context ID through to the JS, so that it can be sent as part of
the AJAX request. This prevents lib/ajax/blocks.php from having to try
to guess the context from the other bits of information it receives, so
block drag-drop should now work everywhere without issues.
The modname_get_types function is not always well implemented by
third-party plugins and some return poor data. This in turn leads to
incorrect module definitions, and can lead to problems in both the
'Add an activity...' dropdowns and the Activity chooser.
This will also prevent display of plugins which legitimately can have
subtypes but where no subtypes were found. Since such plugins cannot be
used in this fashion in any case, this is also beneficial.
Signed-off-by: Andrew Robert Nicols <andrew.nicols@lancaster.ac.uk>
Instead of repeating code all over the place because the original function delete_course_module only partially deletes data, we now place all the functionality needed to delete a module here.