mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +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
|
@ -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.';
|
||||
|
||||
?>
|
||||
|
|
|
@ -398,11 +398,13 @@ $string['defaultcourseteacherdescription'] = 'Teachers can do anything within a
|
|||
$string['defaultcourseteachers'] = 'Teachers';
|
||||
$string['delete'] = 'Delete';
|
||||
$string['deleteall'] = 'Delete all';
|
||||
$string['deleteallcannotundo'] = 'Delete all - cannot be undone';
|
||||
$string['deleteallcomments'] = 'Delete all comments';
|
||||
$string['deleteallratings'] = 'Delete all ratings';
|
||||
$string['deletecategory'] = 'Delete category: $a';
|
||||
$string['deletecategorycheck'] = 'Are you absolutely sure you want to completely delete this category <b>\'$a\'</b>?<br />This will move all courses into the parent category if there is one, or into Miscellaneous.';
|
||||
$string['deletecategorycheck2'] = 'If you delete this category, you need to choose what to do with the courses and subcategories it contains.';
|
||||
$string['deletecategoryempty'] = 'This category is empty.';
|
||||
$string['deletecheck'] = 'Delete $a ?';
|
||||
$string['deletecheckfiles'] = 'Are you absolutely sure you want to delete these files?';
|
||||
$string['deletecheckfull'] = 'Are you absolutely sure you want to completely delete $a ?';
|
||||
|
@ -1013,6 +1015,7 @@ $string['mostrecently'] = 'most recently';
|
|||
$string['move'] = 'Move';
|
||||
$string['movecategoryto'] = 'Move category to:';
|
||||
$string['movecategorycontentto'] = 'Move into';
|
||||
$string['movecontentstoanothercategory'] = 'Move contents to another category';
|
||||
$string['movecourseto'] = 'Move course to:';
|
||||
$string['movedown'] = 'Move down';
|
||||
$string['movefilestohere'] = 'Move files to here';
|
||||
|
@ -1259,6 +1262,7 @@ $string['publicdirectory2'] = 'Publish the site name with a link';
|
|||
$string['publicdirectorytitle'] = 'See the current list of sites';
|
||||
$string['publicsitefileswarning'] = 'Note: files placed here can be accessed by anyone';
|
||||
$string['question'] = 'Question';
|
||||
$string['questionsinthequestionbank'] = 'Questions in the question bank';
|
||||
$string['readinginfofrombackup'] = 'Reading info from backup';
|
||||
$string['readme'] = 'README';
|
||||
$string['recentactivity'] = 'Recent Activity';
|
||||
|
@ -1535,6 +1539,7 @@ $string['theme'] = 'Theme';
|
|||
$string['themes'] = 'Themes';
|
||||
$string['themesaved'] = 'New theme saved';
|
||||
$string['thereareno'] = 'There are no $a in this course';
|
||||
$string['thiscategorycontains'] = 'This category contains';
|
||||
$string['thischarset'] = 'UTF-8';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'English';
|
||||
|
@ -1680,6 +1685,7 @@ within the course so that we can learn more about you:
|
|||
|
||||
$a->profileurl';
|
||||
$string['whattocallzip'] = 'What do you want to call the zip file?';
|
||||
$string['whattodo'] = 'What to do';
|
||||
$string['withchosenfiles'] = 'With chosen files';
|
||||
$string['withoutuserdata'] = 'without user data';
|
||||
$string['withselectedusers'] = 'With selected users...';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue