Proyectos de Subversion Moodle

Rev

Rev 104 | Rev 106 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * universe config.
19
 *
20
 * @package   theme_universe
21
 * @copyright 2023 Marcin Czaja (https://rosea.io)
22
 * @license   Commercial https://themeforest.net/licenses
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
27
require_once(__DIR__ . '/lib.php');
28
 
29
$THEME->name = 'universe';
30
$THEME->sheets = [];
31
$THEME->editor_sheets = [];
32
$THEME->editor_scss = ['editor'];
33
$THEME->usefallback = true;
34
$THEME->parents = ['boost'];
35
$THEME->scss = function($theme) {
36
    return theme_universe_get_main_scss_content($theme);
37
};
38
 
39
$THEME->layouts = [
40
    // Most backwards compatible layout without the blocks - this is the layout used by default.
41
    'base' => array(
42
        'file' => 'tmpl-columns2.php',
43
        'regions' => array('side-pre'),
44
        'defaultregion' => 'side-pre',
45
    ),
46
    // Standard layout with blocks, this is recommended for most pages with general information.
47
    'standard' => array(
48
        'file' => 'tmpl-columns2.php',
49
        'regions' => array('side-pre'),
50
        'defaultregion' => 'side-pre',
51
    ),
52
    // Main course page.
53
    'course' => array(
54
        'file' => 'tmpl-course.php',
55
        'regions' => array(
56
            'coursetab-a',
57
            'coursetab-b',
58
            'coursetab-c',
59
            'coursetab-d',
60
            'coursetab-e',
61
            'side-pre',
62
            'ctopbl',
63
            'cbottombl',
64
            'cstopbl',
65
            'csbottombl'),
66
        'defaultregion' => 'side-pre',
67
        'options' => array('langmenu' => true),
68
    ),
69
    'coursecategory' => array(
70
        'file' => 'tmpl-columns2.php',
71
        'regions' => array('side-pre'),
72
        'defaultregion' => 'side-pre',
73
    ),
74
    // Part of course, typical for modules - default page layout if $cm specified in require_login().
75
    'incourse' => array(
76
        'file' => 'tmpl-incourse.php',
77
        'regions' => array('side-pre'),
78
        'defaultregion' => 'side-pre',
79
    ),
80
    // The site home page.
81
    'frontpage' => array(
82
        'file' => 'tmpl-frontpage.php',
83
        'regions' => array(
84
            'side-pre',
85
            'fpblocks-t',
86
            'fpblocks-b'),
87
        'defaultregion' => 'side-pre',
88
        'options' => array('nonavbar' => true),
89
    ),
90
    // Server administration scripts.
91
    'admin' => array(
92
        'file' => 'tmpl-admin.php',
93
        'regions' => array('side-pre'),
94
        'defaultregion' => 'side-pre',
95
    ),
96
    // Moodle 4. - My courses page.
97
    'mycourses' => array(
98
        'file' => 'tmpl-columns2.php',
99
        'regions' => array('side-pre', 'side-post'),
100
        'defaultregion' => 'side-pre',
101
    ),
102
    // My dashboard page.
103
    'mydashboard' => array(
104
        'file' => 'tmpl-dashboard.php',
105
        'regions' => array(
106
            'side-pre',
107
            'dtopblocks',
108
            'dbottomblocks'),
109
        'defaultregion' => 'side-pre',
110
        'options' => array('nonavbar' => true, 'langmenu' => true, 'nocontextheader' => true),
111
    ),
112
    // My public page.
113
    'mypublic' => array(
114
        'file' => 'tmpl-mypublic.php',
115
        'regions' => array(),
116
        'defaultregion' => 'side-pre',
117
    ),
118
    'login' => array(
119
        'file' => 'tmpl-login.php',
120
        'regions' => array(),
121
        'options' => array('langmenu' => true),
122
    ),
123
 
124
    // Pages that appear in pop-up windows - no navigation, no blocks, no header and bare activity header.
125
    'popup' => array(
126
        'file' => 'tmpl-popup.php',
127
        'regions' => array(),
128
        'options' => array(
129
            'nofooter' => true,
130
            'nonavbar' => true,
131
            'activityheader' => [
132
                'notitle' => true,
133
                'nocompletion' => true,
134
                'nodescription' => true
135
            ]
136
        )
137
    ),
138
    // No blocks and minimal footer - used for legacy frame layouts only!
139
    'frametop' => array(
140
        'file' => 'tmpl-columns1.php',
141
        'regions' => array(),
142
        'options' => array(
143
            'nofooter' => true,
144
            'nocoursefooter' => true,
145
            'activityheader' => [
146
                'nocompletion' => true
147
            ]
148
        ),
149
    ),
150
    // Embeded pages, like iframe/object embeded in moodleform - it needs as much universe as possible.
151
    'embedded' => array(
152
        'file' => 'embedded.php',
153
        'regions' => array()
154
    ),
155
    // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
156
    // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
157
    // Please be extremely careful if you are modifying this layout.
158
    'maintenance' => array(
159
        'file' => 'tmpl-maintenance.php',
160
        'regions' => array(),
161
    ),
162
    // Should display the content and basic headers only.
163
    'print' => array(
164
        'file' => 'tmpl-columns1.php',
165
        'regions' => array(),
166
        'options' => array('nofooter' => true, 'nonavbar' => false, 'noactivityheader' => true),
167
    ),
168
    // The pagelayout used when a redirection is occuring.
169
    'redirect' => array(
170
        'file' => 'embedded.php',
171
        'regions' => array(),
172
    ),
173
    // The pagelayout used for reports.
174
    'report' => array(
175
        'file' => 'tmpl-report.php',
176
        'regions' => array('side-pre'),
177
        'defaultregion' => 'side-pre',
178
    ),
179
    // The pagelayout used for safebrowser and securewindow.
180
    'secure' => array(
181
        'file' => 'secure.php',
182
        'regions' => array('side-pre'),
183
        'defaultregion' => 'side-pre'
184
    )
185
];
186
 
187
//$THEME->parents = [];
188
$THEME->enable_dock = false;
189
$THEME->extrascsscallback = 'theme_universe_get_extra_scss';
190
$THEME->prescsscallback = 'theme_universe_get_pre_scss';
191
$THEME->precompiledcsscallback = 'theme_universe_get_precompiled_css';
192
$THEME->yuicssmodules = array();
193
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
194
$THEME->requiredblocks = '';
195
$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
196
$THEME->haseditswitch = true;
197
$THEME->iconsystem = \core\output\icon_system::FONTAWESOME;
105 ariadna 198
$THEME->defaultblocks = 'comments, messageteacher, cesa_course_rating';
1 efrain 199
 
200
$hidecourseindexnav = 0;
201
if ($THEME->settings->hidecourseindexnav == 0) {
202
    $THEME->usescourseindex = true;
203
} else {
204
    $THEME->usescourseindex = false;
205
}
206
$THEME->removedprimarynavitems = explode(',', get_config('theme_universe', 'hidenodesprimarynavigation'));
207
// By default, all boost theme do not need their titles displayed.
208
$THEME->activityheaderconfig = [
209
    'notitle' => true
210
];