That was becuase not enough information was being passed in for the blocks editing controls to construct the right URL to reload the page.
It is also now possible for admin external pages to add some UI next to the turn blocks editing on/off button. For example, when you are editing the list of course catgories, the turn editing off button is now in the right place.
* Note: this would never lead to problems with default role definions.
* Also ended up mostly rewriting delete_category_form to simplify the messages that are displayed.
* New helper function require_all_capabilities, a bit like require_any_capability.
* Rewrite all the forms to use formslib and improve usability.
* Put the place where admins need to go to process approvals in the admin menu.
* Show the request course/pending requests button on the page for the category that requested courses get added to.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
Very last caller to rebuild_context_rel() and any XX_context_rel()
function. move_category() already takes care of calling
context_moved(), which does the required context.path maintenance.
Addresses MDL-11219
New categories need a context immediately, and for top-level
categories, they also need to taint the "root" context to trigger
a reload of $USER->access.
This fixes problems with creation of initial courses(MDL-11178),
duplicate misc categories, etc.
- The code uses the system context a lot. Declare
$sysctx at the top and use it.
- If the category has a context property, use it
(saves 1 DB query per category displayed)
The DB costs of this page in editing mode are
- ~100 DB queries for fix_course_sortorder()
- ~50 DB queries for the categories listing
If we rewrite both to lose the recursion, we could resolve the
page in perhaps 5 DBq.