Skip to content

Commit

Permalink
Upgrade: Adopt changes in layout/drawers.php from Boost core.
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Oct 25, 2023
1 parent 81b4dd9 commit a5041c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 1 addition & 4 deletions layout/drawers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 &&
Expand Down
5 changes: 1 addition & 4 deletions layout/drawers.php.upstream
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit a5041c9

Please sign in to comment.