The defined context in admin_settingpage does not always relate to the
system context. One example is the 'frontpagesettings' admin setting
page which specifies front page as it's default context. Therefore, the
page context in admin/settings.php should be consisent with the defined
context in the related admin_settingpage object to make sure that the
expected navigation menus are being displayed and properly highlighted.
Additionally, the code in admin/settings.php related to the breadcrumb
structure specific to 'frontpagesettings' has been removed as it is no
longer relevant.
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.
Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
Make sure we always checks for failed validation, before redirecting.
A positive return value does not signal that all settings were able
to be written, only that at least one was - errors still need to be
checked!
Added methods that allow a navigation cache to be marked as volatile so that it is destroyed on shutdown, forcing the next page to load to completely regenerate the navigation structure.
Caches are marked as volatile automatically if the load is within the system context, and can optionally be marked as volatile by calling PAGE->navigation->clear_cache() if desired.
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.
Start calling $PAGE->set_url in all the places it will be necessary
Start of a stub implementation of $PAGE->blocks to stop other things breaking
Remove some of the special case methods in admin_page