Details
Description
On a "course - add a resourse" or "course - add an activity" pages "Add a block" functionality didn't work.
To reproduce:
From the course page, turn editing on
Select a new resource or activity (any type)
While on the resource adding page (i.e. the form), choose "Add..." from the Blocks drop-down
It'll bork spectacularly with this:
Warning: end() expects parameter 1 to be array, null given in /Users/myles/git/une/php/m2/lib/blocklib.php on line 642
A required parameter (section) was missing
Stack trace:
• line 421 of /lib/setuplib.php: moodle_exception thrown
• line 450 of /lib/moodlelib.php: call to print_error()
• line 48 of /course/modedit.php: call to required_param()
Coding error detected, it must be fixed by a programmer: Trying to reference an unknown block region
Stack trace:
• line 813 of /lib/blocklib.php: coding_exception thrown
• line 613 of /lib/blocklib.php: call to block_manager->check_region_is_known()
• line 662 of /lib/blocklib.php: call to block_manager->add_block()
• line 1051 of /lib/blocklib.php: call to block_manager->add_block_at_end_of_default_region()
• line 1026 of /lib/blocklib.php: call to block_manager->process_url_add()
• line 1178 of /lib/pagelib.php: call to block_manager->process_url_actions()
• line 702 of /lib/pagelib.php: call to moodle_page->starting_output()
• line 580 of /lib/outputrenderers.php: call to moodle_page->set_state()
• line 2086 of /lib/outputrenderers.php: call to core_renderer->header()
• line ? of unknownfile: call to core_renderer->fatal_error()
• line 1200 of /lib/setuplib.php: call to call_user_func_array()
• line 320 of /lib/setuplib.php: call to bootstrap_renderer->__call()
• line 320 of /lib/setuplib.php: call to bootstrap_renderer->fatal_error()
• line ? of unknownfile: call to default_exception_handler()