mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
fc11edbfa0
commit
8a1b1c328d
6 changed files with 119 additions and 42 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue