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

@ -108,11 +108,6 @@
require_once($CFG->libdir . '/questionlib.php');
print_category_edit_header();
print_heading($heading);
print_box(get_string('deletecategorycheck2'), 'generalbox boxwidthnormal boxaligncenter');
if (question_context_has_any_questions($context)) {
print_box(get_string('deletecoursecategorywithquestions', 'question'),
'generalbox boxwidthnormal boxaligncenter');
}
$mform->display();
admin_externalpage_print_footer();
exit();