Proyectos de Subversion Moodle

Rev

Rev 256 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 256 Rev 1441
Línea 50... Línea 50...
50
// Dark mode.
50
// Dark mode.
51
if (isloggedin()) {
51
if (isloggedin()) {
52
    $navdraweropen = get_user_preferences('drawer-open-nav', true);
52
    $navdraweropen = get_user_preferences('drawer-open-nav', true);
53
    $draweropenright = (get_user_preferences('sidepre-open', 'true') == 'true');
53
    $draweropenright = (get_user_preferences('sidepre-open', 'true') == 'true');
Línea 54... Línea 54...
54
 
54
 
-
 
55
    switch (theme_universe_get_setting('darkmodetheme')) {
55
    if (theme_universe_get_setting('darkmodetheme') == '1') {
56
        case '1':
56
        $darkmodeon = get_user_preferences('darkmode-on');
57
            $darkmodeon = get_user_preferences('darkmode-on');
57
        if ($darkmodeon) {
58
            if ($darkmodeon) {
58
            $extraclasses[] = 'theme-dark';
59
                $extraclasses[] = 'theme-dark';
-
 
60
            }
59
        }
61
            break;
60
    } else {
62
        default:
-
 
63
            $darkmodeon = false;
61
        $darkmodeon = false;
64
            break;
62
    }
65
    }
63
} else {
66
} else {
64
    $navdraweropen = false;
67
    $navdraweropen = false;
Línea 76... Línea 79...
76
$hasblocks = (strpos($blockshtml, 'data-block=') !== false || !empty($addblockbutton));
79
$hasblocks = (strpos($blockshtml, 'data-block=') !== false || !empty($addblockbutton));
77
if (!$hasblocks) {
80
if (!$hasblocks) {
78
    $blockdraweropen = false;
81
    $blockdraweropen = false;
79
}
82
}
Línea 80... Línea 83...
80
 
83
 
81
if (theme_universe_get_setting('hidecourseindexnav') == true) {
-
 
82
    $hidecourseindexnav = true;
-
 
83
} else {
-
 
84
    $hidecourseindexnav = false;
-
 
Línea 85... Línea 84...
85
}
84
$hidecourseindexnav = (theme_universe_get_setting('hidecourseindexnav') == true) ? true : false;
-
 
85
 
86
 
86
switch (theme_universe_get_setting('hidecourseindexnav')) {
87
if (theme_universe_get_setting('hidecourseindexnav') == false) {
87
    case false:
-
 
88
        $courseindex = core_course_drawer();
-
 
89
        if (!$courseindex) {
-
 
90
            $courseindexopen = false;
-
 
91
        }
-
 
92
        $extraclasses[] = ($courseindexopen == false) ? 'drawer-open-index--closed' : 'drawer-open-index--open';
-
 
93
        break;
88
    $courseindex = core_course_drawer();
94
    default:
89
    if (!$courseindex) {
-
 
90
        $courseindexopen = false;
-
 
91
    }
-
 
92
    if ($courseindexopen == false) {
95
        $courseindex = false;
93
        $extraclasses[] = 'drawer-open-index--closed';
-
 
94
    } else {
-
 
95
        $extraclasses[] = 'drawer-open-index--open';
-
 
96
    }
-
 
97
} else {
-
 
98
    $courseindex = false;
96
        $courseindexopen = false;
Línea 99... Línea 97...
99
    $courseindexopen = false;
97
        break;
100
}
98
}
Línea 148... Línea 146...
148
 
146
 
149
if ($hassidecourseblocks) {
147
if ($hassidecourseblocks) {
150
    $extraclasses[] = 'page-has-blocks';
148
    $extraclasses[] = 'page-has-blocks';
Línea 151... Línea 149...
151
}
149
}
152
 
-
 
153
if (!isloggedin() || isguestuser()) {
-
 
154
    $isnotloggedin = true;
-
 
155
} else {
-
 
Línea 156... Línea 150...
156
    $isnotloggedin = false;
150
 
157
}
151
$isnotloggedin = (!isloggedin() || isguestuser()) ? true : false;
158
 
152
 
159
// Check if guest user.
153
// Check if guest user.
Línea -... Línea 154...
-
 
154
if (isguestuser()) {
160
if (isguestuser()) {
155
    $extraclasses[] = 'moodle-guest-user';
161
    $extraclasses[] = 'moodle-guest-user';
156
}
162
}
157
 
Línea -... Línea 158...
-
 
158
// Back to top.
-
 
159
if (theme_universe_get_setting('backtotop') == '1') {
-
 
160
    $extraclasses[] = 'back-to-top-on';
-
 
161
}
-
 
162
 
-
 
163
// Custom Enrollment Page.
163
 
164
$enrollmentcustomlayout = false;
Línea 164... Línea 165...
164
if (theme_universe_get_setting('backtotop') == '1') {
165
if ($PAGE->pagetype === 'enrol-index') {
165
    $extraclasses[] = 'back-to-top-on';
166
    $enrollmentcustomlayout = true;
166
}
167
}
Línea 191... Línea 192...
191
    'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
192
    'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
192
    'overflow' => $overflow,
193
    'overflow' => $overflow,
193
    'headercontent' => $headercontent,
194
    'headercontent' => $headercontent,
194
    'addblockbutton' => $addblockbutton,
195
    'addblockbutton' => $addblockbutton,
195
    'hidecourseindexnav' => $hidecourseindexnav,
196
    'hidecourseindexnav' => $hidecourseindexnav,
-
 
197
    'enrollmentcustomlayout' => $enrollmentcustomlayout
196
];
198
];
Línea 197... Línea 199...
197
 
199
 
198
// Get and use the course page information banners HTML code, if any course page hints are configured.
200
// Get and use the course page information banners HTML code, if any course page hints are configured.
199
$coursepageinformationbannershtml = theme_universe_get_course_information_banners();
201
$coursepageinformationbannershtml = theme_universe_get_course_information_banners();