| 
29 | 29 | user_preference_allow_ajax_update('drawer-open-block', PARAM_BOOL);  | 
30 | 30 | 
 
  | 
31 | 31 | if (isloggedin()) {  | 
32 |  | -    $courseindexopen = (get_user_preferences('drawer-open-index') == true);  | 
33 |  | -    $blockdraweropen = (get_user_preferences('drawer-open-block') == true);  | 
 | 32 | +    $courseindexopen = (get_user_preferences('drawer-open-index'));  | 
 | 33 | +    $blockdraweropen = (get_user_preferences('drawer-open-block'));  | 
34 | 34 | } else {  | 
35 | 35 |     $courseindexopen = false;  | 
36 | 36 |     $blockdraweropen = false;  | 
37 | 37 | }  | 
38 | 38 | 
 
  | 
39 |  | -require_once($CFG->libdir . '/behat/lib.php');  | 
40 | 39 | require_once($CFG->dirroot . '/course/lib.php');  | 
41 | 40 | 
 
  | 
42 | 41 | $extraclasses = [];  | 
 | 
67 | 66 | }  | 
68 | 67 | $forceblockdraweropen = $OUTPUT->firstview_fakeblocks();  | 
69 | 68 | 
 
  | 
70 |  | -$buildregionmainsettings = !$PAGE->include_region_main_settings_in_header_actions() && !$PAGE->has_secondary_navigation();  | 
 | 69 | +$buildregionmainsettings = !$PAGE->include_region_main_settings_in_header_actions()  | 
 | 70 | +    && !$PAGE->has_secondary_navigation();  | 
71 | 71 | 
 
  | 
72 | 72 | // If the settings menu will be included in the header then don't add it here.  | 
73 | 73 | $regionmainsettingsmenu = $buildregionmainsettings ? $OUTPUT->region_main_settings_menu() : false;  | 
 | 
83 | 83 | $overflow = '';  | 
84 | 84 | 
 
  | 
85 | 85 | // Secondary navigation.  | 
86 |  | -if ($PAGE->has_secondary_navigation() && strpos($PAGE->bodyclasses, 'path-enrol') == false) {  | 
 | 86 | +if ($PAGE->has_secondary_navigation() &&  | 
 | 87 | +    (!strpos($PAGE->bodyclasses, 'path-enrol')  | 
 | 88 | +        || strpos($PAGE->bodyclasses, 'pagelayout-admin') > 0)) {  | 
87 | 89 |     $tablistnav = $PAGE->has_tablist_secondary_navigation();  | 
88 | 90 |     $customnav = new \theme_pimenko\output\core\navigation\views\secondary($PAGE);  | 
89 | 91 |     $customnav->initialise();  | 
 | 
102 | 104 | $headercontent = $header->export_for_template($renderer);  | 
103 | 105 | 
 
  | 
104 | 106 | $templatecontext = [  | 
105 |  | -    'sitename' => format_string($SITE->shortname,  | 
106 |  | -        true, ['context' => context_course::instance(SITEID), "escape" => false]),  | 
 | 107 | +    'sitename' => format_string(  | 
 | 108 | +        $SITE->shortname,  | 
 | 109 | +        true,  | 
 | 110 | +        ['context' => context_course::instance(SITEID), "escape" => false]  | 
 | 111 | +    ),  | 
107 | 112 |     'output' => $OUTPUT,  | 
108 | 113 |     'sidepreblocks' => $blockshtml,  | 
109 | 114 |     'hasblocks' => $hasblocks,  | 
 | 
0 commit comments