mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
MDL-74317 blocks: Revert checking of block usage against page format
This commit is contained in:
parent
53ad985457
commit
a1c0b98c1d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user