ec498ce036
The display logic for including the title in the activity header was such that the title would only display if both the theme default and the layout option for 'notitle' were undefined or false. It was not possible to a theme to have 'notitle' default to true, but have a layout override that as false to display the title. This change re-writes the is_title_allowed method to encapsulte the new logic, first checking if the current layout has the option set and using that, and if not falling back to the theme default if that is set. If neither is set, the title is displayed. This also tweaks moodle_page::magic_get_layout_options to ensure the theme is initialised before trying to return the layout options.