From a424f6cb6013e409a306aba759c6f7b3dcaec747 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Wed, 8 Jun 2016 13:16:07 +0800 Subject: [PATCH] MDL-54842 core_renderer: Hide additional body HTML in embedded layout --- lib/outputrenderers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 79575cf7489..4ead08699e9 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -559,7 +559,7 @@ class core_renderer extends renderer_base { public function standard_top_of_body_html() { global $CFG; $output = $this->page->requires->get_top_of_body_code(); - if (!empty($CFG->additionalhtmltopofbody)) { + if ($this->page->pagelayout !== 'embedded' && !empty($CFG->additionalhtmltopofbody)) { $output .= "\n".$CFG->additionalhtmltopofbody; } $output .= $this->maintenance_warning(); @@ -682,7 +682,7 @@ class core_renderer extends renderer_base { // but some of the content won't be known until later, so we return a placeholder // for now. This will be replaced with the real content in {@link core_renderer::footer()}. $output = ''; - if (!empty($CFG->additionalhtmlfooter)) { + if ($this->page->pagelayout !== 'embedded' && !empty($CFG->additionalhtmlfooter)) { $output .= "\n".$CFG->additionalhtmlfooter; } $output .= $this->unique_end_html_token;