mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 07:39:54 +02:00
Merge branch 'MDL-41516-m' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
fb692af13b
2 changed files with 11 additions and 1 deletions
|
@ -998,7 +998,7 @@ class block_manager {
|
|||
*
|
||||
* @param string $region The name of the region to check
|
||||
*/
|
||||
protected function ensure_content_created($region, $output) {
|
||||
public function ensure_content_created($region, $output) {
|
||||
$this->ensure_instances_exist($region);
|
||||
if (!array_key_exists($region, $this->visibleblockcontent)) {
|
||||
$contents = array();
|
||||
|
|
|
@ -345,6 +345,16 @@ class core_renderer extends renderer_base {
|
|||
*/
|
||||
public function standard_head_html() {
|
||||
global $CFG, $SESSION;
|
||||
|
||||
// Before we output any content, we need to ensure that certain
|
||||
// page components are set up.
|
||||
|
||||
// Blocks must be set up early as they may require javascript which
|
||||
// has to be included in the page header before output is created.
|
||||
foreach ($this->page->blocks->get_regions() as $region) {
|
||||
$this->page->blocks->ensure_content_created($region, $this);
|
||||
}
|
||||
|
||||
$output = '';
|
||||
$output .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
|
||||
$output .= '<meta name="keywords" content="moodle, ' . $this->page->title . '" />' . "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue