mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-74078 core_my: Lock all blocks on the my courses page
This commit is contained in:
parent
a0c6b4a174
commit
a640f43181
4 changed files with 89 additions and 0 deletions
|
@ -58,6 +58,13 @@ $PAGE->blocks->add_region('content');
|
|||
$PAGE->set_subpage($currentpage->id);
|
||||
$PAGE->set_title(get_string('mycourses'));
|
||||
$PAGE->set_heading(get_string('mycourses'));
|
||||
|
||||
// No blocks can be edited on this page (including by managers/admins) because:
|
||||
// - Course overview is a fixed item on the page and cannot be moved/removed.
|
||||
// - We do not want new blocks on the page.
|
||||
// - Only global blocks (if any) should be visible on the site panel, and cannot be moved int othe centre pane.
|
||||
$PAGE->force_lock_all_blocks();
|
||||
|
||||
// Force the add block out of the default area.
|
||||
$PAGE->theme->addblockposition = BLOCK_ADDBLOCK_POSITION_CUSTOM;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue