Proyectos de Subversion Moodle

Rev

| 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
 *
19
 * @package   theme_monocolor
20
 * @copyright 2022 - 2023 Marcin Czaja (https://rosea.io)
21
 * @license   Commercial https://themeforest.net/licenses
22
 *
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
27
$page = new admin_settingpage('theme_monocolor_general', get_string('generalsettings', 'theme_monocolor'));
28
 
29
$name = 'theme_monocolor/hintro';
30
$heading = get_string('hintro', 'theme_monocolor', $a);
31
$setting = new monocolor_setting_specialsettingheading($name, $heading,
32
    format_text(get_string('hintro_desc', 'theme_monocolor', $a), FORMAT_MARKDOWN));
33
$page->add($setting);
34
 
35
$name = 'theme_monocolor/darkmodetheme';
36
$title = get_string('darkmodetheme', 'theme_monocolor');
37
$description = get_string('darkmodetheme_desc', 'theme_monocolor');
38
$default = 1;
39
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
40
$page->add($setting);
41
 
42
$name = 'theme_monocolor/darkmodefirst';
43
$title = get_string('darkmodefirst', 'theme_monocolor');
44
$description = get_string('darkmodefirst_desc', 'theme_monocolor');
45
$default = 0;
46
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
47
$page->add($setting);
48
 
49
$name = 'theme_monocolor/sdarkmode';
50
$title = get_string('sdarkmode', 'theme_monocolor');
51
$description = get_string('sdarkmode_desc', 'theme_monocolor');
52
$default = 'Dark Mode';
53
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
54
$page->add($setting);
55
 
56
$name = 'theme_monocolor/slightmode';
57
$title = get_string('slightmode', 'theme_monocolor');
58
$description = get_string('slightmode_desc', 'theme_monocolor');
59
$default = 'Light Mode';
60
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
61
$page->add($setting);
62
 
63
$name = 'theme_monocolor/themeauthor';
64
$title = get_string('themeauthor', 'theme_monocolor');
65
$description = get_string('themeauthor_desc', 'theme_monocolor');
66
$default = 1;
67
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
68
$page->add($setting);
69
 
70
$name = 'theme_monocolor/backtotop';
71
$title = get_string('backtotop', 'theme_monocolor');
72
$description = get_string('backtotop_desc', 'theme_monocolor');
73
$default = 1;
74
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
75
$page->add($setting);
76
 
77
// Video Size
78
$name = 'theme_monocolor/forcefwvideo';
79
$title = get_string('forcefwvideo', 'theme_monocolor');
80
$description = get_string('forcefwvideo_desc', 'theme_monocolor', $a);
81
$default = 1;
82
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
83
$setting->set_updatedcallback('theme_reset_all_caches');
84
$page->add($setting);
85
 
86
// Show hint for switched role.
87
$name = 'theme_monocolor/showswitchedroleincourse';
88
$title = get_string('showswitchedroleincoursesetting', 'theme_monocolor');
89
$description = get_string('showswitchedroleincoursesetting_desc', 'theme_monocolor', $a);
90
$default = 0;
91
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
92
$setting->set_updatedcallback('theme_reset_all_caches');
93
$page->add($setting);
94
 
95
// Show hint in hidden courses.
96
$name = 'theme_monocolor/showhintcoursehidden';
97
$title = get_string('showhintcoursehiddensetting', 'theme_monocolor');
98
$description = get_string('showhintcoursehiddensetting_desc', 'theme_monocolor');
99
$default = 0;
100
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
101
$page->add($setting);
102
 
103
// Show hint guest for access.
104
$name = 'theme_monocolor/showhintcourseguestaccess';
105
$title = get_string('showhintcoursguestaccesssetting', 'theme_monocolor');
106
$description = get_string('showhintcourseguestaccesssetting_desc', 'theme_monocolor');
107
$default = 0;
108
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
109
$page->add($setting);
110
 
111
// Show hint for self enrolment without enrolment key.
112
$name = 'theme_monocolor/showhintcourseselfenrol';
113
$title = get_string('showhintcourseselfenrolsetting', 'theme_monocolor');
114
$description = get_string('showhintcourseselfenrolsetting_desc', 'theme_monocolor');
115
$default = 0;
116
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
117
$page->add($setting);
118
 
119
// Unaddable blocks.
120
// Blocks to be excluded when this theme is enabled in the "Add a block" list: Administration, Navigation, Courses and
121
// Section links.
122
$default = 'navigation,settings,course_list,section_links';
123
$setting = new admin_setting_configtext(
124
    'theme_monocolor/unaddableblocks',
125
    get_string('unaddableblocks', 'theme_monocolor'),
126
    get_string('unaddableblocks_desc', 'theme_monocolor'),
127
    $default,
128
    PARAM_TEXT
129
);
130
$page->add($setting);
131
 
132
// Google analytics block.
133
$name = 'theme_monocolor/googleanalytics';
134
$title = get_string('googleanalytics', 'theme_monocolor');
135
$description = get_string('googleanalyticsdesc', 'theme_monocolor');
136
$default = '';
137
$setting = new admin_setting_configtext($name, $title, $description, $default);
138
$setting->set_updatedcallback('theme_reset_all_caches');
139
$page->add($setting);
140
 
141
$settings->add($page);