]> git.mjollnir.org Git - moodle.git/commit
course categories: Fix many bugs with category editing and permissions. Clean up...
authortjhunt <tjhunt>
Thu, 4 Dec 2008 08:53:10 +0000 (08:53 +0000)
committertjhunt <tjhunt>
Thu, 4 Dec 2008 08:53:10 +0000 (08:53 +0000)
commit8ed5dd63eeba4e9fc2e290bd3b9584aed440c13c
tree7b55c6ebdbdb3a7a619f46cc79f7abbe6497312a
parent4faace378125e5150851e6035e6cd524d8078c4f
course categories: Fix many bugs with category editing and permissions. Clean up code.

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.
18 files changed:
admin/settings/courses.php
course/category.php
course/delete_category_form.php
course/edit_form.php
course/editcategory.php
course/editcategory_form.php
course/index.php
course/lib.php
course/search.php
lang/en_utf8/error.php
lang/en_utf8/moodle.php
lang/en_utf8/role.php
lib/accesslib.php
lib/datalib.php
lib/db/access.php
lib/weblib.php
theme/standard/styles_layout.css
version.php