From f8b446f3991d3c32eae2d507245c044c3a5ad5ad Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 25 Nov 2014 14:35:37 +0800 Subject: [PATCH] MDL-48366 blocks: always display custom regions in dropdown --- blocks/edit_form.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blocks/edit_form.php b/blocks/edit_form.php index 19624eb9ea0..ad32113fe0f 100644 --- a/blocks/edit_form.php +++ b/blocks/edit_form.php @@ -84,6 +84,12 @@ class block_edit_form extends moodleform { $weightoptions[$last] = get_string('bracketlast', 'block', $last); $regionoptions = $this->page->theme->get_all_block_regions(); + foreach ($this->page->blocks->get_regions() as $region) { + // Make sure to add all custom regions of this particular page too. + if (!isset($regionoptions[$region])) { + $regionoptions[$region] = $region; + } + } $parentcontext = context::instance_by_id($this->block->instance->parentcontextid); $mform->addElement('hidden', 'bui_parentcontextid', $parentcontext->id); -- 2.11.4.GIT