Proyectos de Subversion Moodle

Rev

Rev 1376 | Rev 1378 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1376 Rev 1377
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea 3...
3
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
3
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
4
 
4
 
-
 
5
// This line protects the file from being accessed by a URL directly.                                                               
-
 
6
defined('MOODLE_INTERNAL') || die();
-
 
7
require_once(__DIR__ . '/../universe/libs/admin_confightmleditor.php');
-
 
8
require_once($CFG->dirroot . '/theme/universe/lib.php');
5
// This line protects the file from being accessed by a URL directly.                                                               
9
require_once($CFG->libdir . '/context.php');
6
defined('MOODLE_INTERNAL') || die();
10
 
7
$siteurl = $CFG->wwwroot;
11
$siteurl = $CFG->wwwroot;
Línea 8... Línea 12...
8
$a = new stdClass;
12
$a = new stdClass;
Línea 13... Línea 17...
13
if ($ADMIN->fulltree) {
17
if ($ADMIN->fulltree) {
Línea 14... Línea 18...
14
 
18
 
15
    // Boost provides a nice setting page which splits settings onto separate tabs. We want to use it here.                         
19
    // Boost provides a nice setting page which splits settings onto separate tabs. We want to use it here.                         
Línea 16... Línea 20...
16
    $settings = new theme_universe_admin_settingspage_tabs('themesettinguniverse_child', get_string('configtitle', 'theme_universe_child'));
20
    $settings = new theme_universe_admin_settingspage_tabs('themesettinguniverse_child', get_string('configtitle', 'theme_universe_child'));
-
 
21
 
-
 
22
    // Include all parent theme settings
-
 
23
    require('../../universe/settings/general.php');
-
 
24
    require('../../universe/settings/seo.php');
-
 
25
    require('../../universe/settings/customization.php');
-
 
26
    require('../../universe/settings/topbar.php');
-
 
27
    require('../../universe/settings/login.php');
-
 
28
    require('../../universe/settings/dashboard.php');
-
 
29
    require('../../universe/settings/mycourses.php');
-
 
30
    require('../../universe/settings/course-page.php');
-
 
31
    require('../../universe/settings/course-page-nav.php');
-
 
32
    require('../../universe/settings/footer.php');
-
 
33
    require('../../universe/settings/alert.php');
-
 
34
    require('../../universe/settings/email.php');
-
 
35
    require('../../universe/settings/advanced.php');
-
 
36
    require('../../universe/settings/scb.php');
-
 
37
    require('../../universe/settings/block0.php');
-
 
38
    require('../../universe/settings/block1.php');
-
 
39
    require('../../universe/settings/block2.php');
-
 
40
    require('../../universe/settings/block3.php');
-
 
41
    require('../../universe/settings/block4.php');
-
 
42
    require('../../universe/settings/block5.php');
-
 
43
    require('../../universe/settings/block6.php');
-
 
44
    require('../../universe/settings/block7.php');
-
 
45
    require('../../universe/settings/block8.php');
-
 
46
    require('../../universe/settings/block9.php');
-
 
47
    require('../../universe/settings/block10.php');
-
 
48
    require('../../universe/settings/block11.php');
-
 
49
    require('../../universe/settings/block12.php');
-
 
50
    require('../../universe/settings/block13.php');
-
 
51
    require('../../universe/settings/block14.php');
-
 
52
    require('../../universe/settings/block15.php');
-
 
53
    require('../../universe/settings/block16.php');
-
 
54
    require('../../universe/settings/block17.php');
-
 
55
    require('../../universe/settings/block18.php');
-
 
56
    require('../../universe/settings/block19.php');
-
 
57
    require('../../universe/settings/block20.php');
-
 
58
    require('../../universe/settings/block21.php');
-
 
59
    require('../../universe/settings/block22.php');
17
 
60
 
Línea 18... Línea 61...
18
    // Each page is a tab - the first is the "General" tab.                                                                         
61
    // Child theme specific settings
19
    $page = new admin_settingpage('theme_universe_child_general', get_string('generalsettings', 'theme_universe_child'));
62
    $page = new admin_settingpage('theme_universe_child_specific', get_string('childthemesettings', 'theme_universe_child'));
20
 
63
 
21
    // Replicate the preset setting from boost.                                                                                     
64
    // Preset setting
22
    $name = 'theme_universe_child/preset';
65
    $name = 'theme_universe_child/preset';
Línea 23... Línea -...
23
    $title = get_string('preset', 'theme_universe_child');
-
 
24
    $description = get_string('preset_desc', 'theme_universe_child');
-
 
25
    $default = 'default.scss';
66
    $title = get_string('preset', 'theme_universe_child');
26
 
67
    $description = get_string('preset_desc', 'theme_universe_child');
27
    // We list files in our own file area to add to the drop down. We will provide our own function to                              
68
    $default = 'default.scss';
Línea 28... Línea 69...
28
    // load all the presets from the correct paths.                                                                                 
69
 
Línea 64... Línea 105...
64
    $description = get_string('brandcolor_desc', 'theme_universe_child');
105
    $description = get_string('brandcolor_desc', 'theme_universe_child');
65
    $setting = new admin_setting_configcolourpicker($name, $title, $description, '');
106
    $setting = new admin_setting_configcolourpicker($name, $title, $description, '');
66
    $setting->set_updatedcallback('theme_reset_all_caches');
107
    $setting->set_updatedcallback('theme_reset_all_caches');
67
    $page->add($setting);
108
    $page->add($setting);
Línea 68... Línea 109...
68
 
109
 
-
 
110
    // Raw SCSS to include before the content.                                                                                      
-
 
111
    $setting = new admin_setting_configtextarea(
-
 
112
        'theme_universe_child/scsspre',
-
 
113
        get_string('rawscsspre', 'theme_universe_child'),
-
 
114
        get_string('rawscsspre_desc', 'theme_universe_child'),
-
 
115
        '',
-
 
116
        PARAM_RAW
-
 
117
    );
-
 
118
    $setting->set_updatedcallback('theme_reset_all_caches');
-
 
119
    $page->add($setting);
-
 
120
 
-
 
121
    // Raw SCSS to include after the content.                                                                                       
-
 
122
    $setting = new admin_setting_configtextarea(
-
 
123
        'theme_universe_child/scss',
-
 
124
        get_string('rawscss', 'theme_universe_child'),
-
 
125
        get_string('rawscss_desc', 'theme_universe_child'),
-
 
126
        '',
-
 
127
        PARAM_RAW
-
 
128
    );
-
 
129
    $setting->set_updatedcallback('theme_reset_all_caches');
-
 
130
    $page->add($setting);
69
    // Must add the page after definiting all the settings!                                                                         
131
 
Línea 70... Línea 132...
70
    $settings->add($page);
132
    $settings->add($page);
71
 
133