course categories: MDL-17502 when deleting a category and its contents, check moodle/course:delete capability.

* 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.
This commit is contained in:
tjhunt 2008-12-08 07:28:19 +00:00
parent fc11edbfa0
commit 8a1b1c328d
6 changed files with 119 additions and 42 deletions

View file

@ -467,5 +467,6 @@ $string['wrongroleid'] = 'Incorrect role ID!';
$string['wrongsourcebase'] = 'Wrong source URL base';
$string['wrongzipfilename'] = 'Wrong ZIP file name';
$string['xmldberror'] = 'XMLDB error!';
$string['youcannotdeletecategory'] = 'You cannot delete category \'$a\' becuase you can neither delete the contents, nor move them elsewhere.';
?>