MDL-52035 core: added ability to override pagelayout
This is required by the LTI plugin when we share an activity. We do not want the user to be shown the navigation blocks etc. The activity should be the only thing displayed.
This commit is contained in:
+10
-4
@@ -1103,10 +1103,16 @@ class moodle_page {
|
||||
* @param string $pagelayout the page layout this is. For example 'popup', 'home'.
|
||||
*/
|
||||
public function set_pagelayout($pagelayout) {
|
||||
// Uncomment this to debug theme pagelayout issues like missing blocks.
|
||||
// if (!empty($this->_wherethemewasinitialised) && $pagelayout != $this->_pagelayout)
|
||||
// debugging('Page layout has already been set and cannot be changed.', DEBUG_DEVELOPER);
|
||||
$this->_pagelayout = $pagelayout;
|
||||
global $SESSION;
|
||||
|
||||
if (!empty($SESSION->forcepagelayout)) {
|
||||
$this->_pagelayout = $SESSION->forcepagelayout;
|
||||
} else {
|
||||
// Uncomment this to debug theme pagelayout issues like missing blocks.
|
||||
// if (!empty($this->_wherethemewasinitialised) && $pagelayout != $this->_pagelayout)
|
||||
// debugging('Page layout has already been set and cannot be changed.', DEBUG_DEVELOPER);
|
||||
$this->_pagelayout = $pagelayout;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user