Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1342 ariadna 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_universe
20
 * @copyright 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_universe_general', get_string('generalsettings', 'theme_universe'));
28
 
29
$name = 'theme_universe/hintro';
30
$heading = get_string('hintro', 'theme_universe', $a);
31
$title = get_string('hintro_desc', 'theme_universe');
32
$setting = new universe_setting_specialsettingheading($name, $heading, format_text($title, FORMAT_MARKDOWN));
33
$page->add($setting);
34
 
35
$name = 'theme_universe/darkmodetheme';
36
$title = get_string('darkmodetheme', 'theme_universe');
37
$description = get_string('darkmodetheme_desc', 'theme_universe');
38
$default = 1;
39
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
40
$page->add($setting);
41
 
42
$name = 'theme_universe/darkmodefirst';
43
$title = get_string('darkmodefirst', 'theme_universe');
44
$description = get_string('darkmodefirst_desc', 'theme_universe');
45
$default = 0;
46
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
47
$page->add($setting);
48
 
49
$name = 'theme_universe/sdarkmode';
50
$title = get_string('sdarkmode', 'theme_universe');
51
$description = get_string('sdarkmode_desc', 'theme_universe');
52
$default = 'Dark Mode';
53
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
54
$page->add($setting);
55
 
56
$name = 'theme_universe/slightmode';
57
$title = get_string('slightmode', 'theme_universe');
58
$description = get_string('slightmode_desc', 'theme_universe');
59
$default = 'Light Mode';
60
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
61
$page->add($setting);
62
 
63
$name = 'theme_universe/showcolorcoursecardmask';
64
$title = get_string('showcolorcoursecardmask', 'theme_universe');
65
$description = get_string('color_desc', 'theme_universe');
66
$setting = new admin_setting_configcheckbox($name, $title, $description, 'no', 'yes', 'no');
67
$setting->set_updatedcallback('theme_reset_all_caches');
68
$page->add($setting);
69
 
70
$name = 'theme_universe/themeauthor';
71
$title = get_string('themeauthor', 'theme_universe');
72
$description = get_string('themeauthor_desc', 'theme_universe');
73
$default = 1;
74
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
75
$page->add($setting);
76
 
77
$name = 'theme_universe/backtotop';
78
$title = get_string('backtotop', 'theme_universe');
79
$description = get_string('backtotop_desc', 'theme_universe');
80
$default = 1;
81
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
82
$page->add($setting);
83
 
84
// Video Size
85
$name = 'theme_universe/forcefwvideo';
86
$title = get_string('forcefwvideo', 'theme_universe');
87
$description = get_string('forcefwvideo_desc', 'theme_universe', $a);
88
$default = 1;
89
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
90
$setting->set_updatedcallback('theme_reset_all_caches');
91
$page->add($setting);
92
 
93
// Setting: Show hint for switched role.
94
$name = 'theme_universe/showswitchedroleincourse';
95
$title = get_string('showswitchedroleincoursesetting', 'theme_universe');
96
$description = get_string('showswitchedroleincoursesetting_desc', 'theme_universe', $a);
97
$default = 0;
98
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
99
$setting->set_updatedcallback('theme_reset_all_caches');
100
$page->add($setting);
101
 
102
// Setting: Show hint in hidden courses.
103
$name = 'theme_universe/showhintcoursehidden';
104
$title = get_string('showhintcoursehiddensetting', 'theme_universe');
105
$description = get_string('showhintcoursehiddensetting_desc', 'theme_universe');
106
$default = 0;
107
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
108
$page->add($setting);
109
 
110
// Setting: Show hint guest for access.
111
$name = 'theme_universe/showhintcourseguestaccess';
112
$title = get_string('showhintcoursguestaccesssetting', 'theme_universe');
113
$description = get_string('showhintcourseguestaccesssetting_desc', 'theme_universe');
114
$default = 0;
115
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
116
$page->add($setting);
117
 
118
// Setting: Show hint for self enrolment without enrolment key.
119
$name = 'theme_universe/showhintcourseselfenrol';
120
$title = get_string('showhintcourseselfenrolsetting', 'theme_universe');
121
$description = get_string('showhintcourseselfenrolsetting_desc', 'theme_universe');
122
$default = 0;
123
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
124
$page->add($setting);
125
 
126
// Unaddable blocks.
127
$default = 'navigation,settings,course_list,section_links';
128
$setting = new admin_setting_configtext('theme_universe/unaddableblocks',
129
    get_string('unaddableblocks', 'theme_universe'), get_string('unaddableblocks_desc', 'theme_universe'), $default, PARAM_TEXT);
130
$page->add($setting);
131
 
132
// Google analytics block.
133
$name = 'theme_universe/googleanalytics';
134
$title = get_string('googleanalytics', 'theme_universe');
135
$description = get_string('googleanalyticsdesc', 'theme_universe');
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);