mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
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:
parent
6c1342d7e5
commit
466a1713a0
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user