mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-66108 course: fix false positives when bulk moving categories.
This commit is contained in:
parent
fd126006b0
commit
47ff771e80
@ -316,7 +316,8 @@ if ($action !== false && confirm_sesskey()) {
|
||||
$notificationsfail[] = get_string('movecategoryownparent', 'error', $cattomove->get_formatted_name());
|
||||
continue;
|
||||
}
|
||||
if (strpos($movetocat->path, $cattomove->path) === 0) {
|
||||
// Don't allow user to move selected category into one of it's own sub-categories.
|
||||
if (strpos($movetocat->path, $cattomove->path . '/') === 0) {
|
||||
$notificationsfail[] = get_string('movecategoryparentconflict', 'error', $cattomove->get_formatted_name());
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user