MDL-31830 course: several small code improvements
authorSam Hemelryk <sam@moodle.com>
Mon, 30 Sep 2013 20:02:08 +0000 (09:02 +1300)
committerSam Hemelryk <sam@moodle.com>
Sun, 6 Oct 2013 21:22:36 +0000 (10:22 +1300)
commit67e1f26874cf11af8ef6d6da50e66f27504bfa01
tree420f557b57a010e6e4151fee3a830dd3073b3209
parenta3b7439ff2be52332372caffb8638a28fa5d5303
MDL-31830 course: several small code improvements

* I can rebase this for you/the integrator before it goes in for sure no probs :)
* Fixed double phpdoc block of course_change_visibility
* Moved permission checks out of course_move_after_course and into helper function.
* Reviewed setType calls for editcategory_form.php.
* Reviewed all uses of can_resort and added more specific methods.
* Fixed method mentioned in exception for resort methods.
* Converted calls to fetch courses to call get_course.
* Exceptions now thrown when trying to move courses and problems arise.
* Fixed unnecessary namespace hinting in core_course_management_renderer.
* Abstracted common logic of can_resort_any and can_change_parent_any.
* Removed check for system level capability from has_manage_capability_on_any.
* Reviewed debugging calls I've introduced.
course/ajax/management.php
course/classes/editcategory_form.php
course/classes/management/helper.php
course/classes/management_renderer.php
course/lib.php
course/management.php
course/tests/management_helper_test.php
lang/en/error.php
lib/coursecatlib.php