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.
- added class format_base as the base for all course formats
- added class format_site for the pseudo-format 'site' used for displaying activities on the front page
- added class format_legacy that overrides format_base functions with calling old-style 'callback_xxx' functions
- replaced all usage of 'callback_xxx' functions with format_base methods
- made arguments of get_section_name(), get_course_url() more flexible
- deprecated function get_generic_section_name(), it's contents is moved to format_base
- global_navigation::format_display_course_content() is removed, plugins can supress the sections navigations using extend_course_navigation()
Initially, the default section title was swapped within the course format
javascript functions. Though some section titles may be custom and does not
require swapping, in addition they may have links to single section view. This
introduces some callback functions for define what needs to be done in
sections libs and js files.
This removes duplicates and block actions remains. It also makes it
possible to include course/rest.php in such a way that it could be extended
by non-core modules wishing to overide parts of its functionality (e.g.
mod_subpage)
The code to print blocks in now in theme layout.php files. (Or in
moodle_core_renderer::handle_legacy_theme)
Code for printing blocks everywhere else has been stripped out.
(Total diffstat 1225 insertions, 2019 deletions)
The way the HTML for a block instance is generated has been cleaned
up a lot. Now, the block_instance generates a block_contents
object which gives a structured representation of the block,
and then $OUTPUT->block builds all the HTML from that.
How theme config.php files specify the layout template and block
regions by page general type has been changed to be even more flexible.
Further refinement for how the theme and block code gets initialised.
Ability for scrits to add 'pretend blocks' to the page. That is,
things that look like blocks, but are not normal block_instances.
(Like the add a new block UI.)
Things that are still broken:
* some pages in lesson, quiz and resource. I'm working on it.
* lots of developer debug notices pointing out things that
need to be updated.