MDL-74317 blocks: Revert checking of block usage against page format

This commit is contained in:
Jun Pataleta 2022-05-05 01:37:04 +08:00
parent 53ad985457
commit a1c0b98c1d

View File

@ -629,12 +629,10 @@ class block_base {
&& has_capability('moodle/my:manageblocks', $page->context);
}
}
// Check if this is a block only used on 'my' or 'user' page types.
foreach (array_keys($mypagetypes + $userpagetypes) as $key) {
unset($formats[$key]);
}
// Check if this is a block only used on /my.
unset($formats['my']);
if (empty($formats)) {
// Block can only be added to 'my' or 'user' page types - return false.
// Block can only be added to /my - return false.
return false;
}