Merge branch 'wip-MDL-48366-master' of git://github.com/marinaglancy/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 9 Dec 2014 00:43:30 +0000 (13:43 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 9 Dec 2014 00:43:30 +0000 (13:43 +1300)
blocks/edit_form.php

index 19624eb..ad32113 100644 (file)
@@ -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);