MDL-55074 theme_boost: Do not show flatnav by default before login

This commit is contained in:
Damyon Wiese 2016-10-13 12:47:49 +08:00
parent c9d6a04743
commit a42a065a20

View File

@ -26,7 +26,11 @@ defined('MOODLE_INTERNAL') || die();
user_preference_allow_ajax_update('drawer-open-nav', PARAM_ALPHA);
$navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true');
if (isloggedin()) {
$navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true');
} else {
$navdraweropen = false;
}
$extraclasses = [];
if ($navdraweropen) {
$extraclasses[] = 'drawer-open-left';