diff --git a/CHANGES.md b/CHANGES.md index ba264c0464c..37b83e5f89c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2023-10-25 - Upgrade: Adopt changes in layout/drawers.php from Boost core. * 2023-10-25 - Upgrade: Adopt changes in primary-drawer-mobile.mustache from Boost core. * 2023-10-25 - Upgrade: Adopt changes in drawers.mustache and footer.mustache from Boost core. * 2023-10-20 - Prepare compatibility for Moodle 4.3. diff --git a/layout/drawers.php b/layout/drawers.php index f1e238d7a9d..bf07f6d19ae 100644 --- a/layout/drawers.php +++ b/layout/drawers.php @@ -56,9 +56,6 @@ // Add block button in editing mode. $addblockbutton = $OUTPUT->addblockbutton(); -user_preference_allow_ajax_update('drawer-open-index', PARAM_BOOL); -user_preference_allow_ajax_update('drawer-open-block', PARAM_BOOL); - if (isloggedin()) { $courseindexopen = (get_user_preferences('drawer-open-index', true) == true); @@ -79,7 +76,7 @@ } } -if (defined('BEHAT_SITE_RUNNING')) { +if (defined('BEHAT_SITE_RUNNING') && get_user_preferences('behat_keep_drawer_closed') != 1) { try { if ( get_config('theme_boost_union', 'showsitehomerighthandblockdraweronvisit') === false && diff --git a/layout/drawers.php.upstream b/layout/drawers.php.upstream index bd8b502d43c..756d041bc7d 100644 --- a/layout/drawers.php.upstream +++ b/layout/drawers.php.upstream @@ -30,9 +30,6 @@ require_once($CFG->dirroot . '/course/lib.php'); // Add block button in editing mode. $addblockbutton = $OUTPUT->addblockbutton(); -user_preference_allow_ajax_update('drawer-open-index', PARAM_BOOL); -user_preference_allow_ajax_update('drawer-open-block', PARAM_BOOL); - if (isloggedin()) { $courseindexopen = (get_user_preferences('drawer-open-index', true) == true); $blockdraweropen = (get_user_preferences('drawer-open-block') == true); @@ -41,7 +38,7 @@ if (isloggedin()) { $blockdraweropen = false; } -if (defined('BEHAT_SITE_RUNNING')) { +if (defined('BEHAT_SITE_RUNNING') && get_user_preferences('behat_keep_drawer_closed') != 1) { $blockdraweropen = true; }