Proyectos de Subversion Moodle

Rev

Rev 1 | | 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
 *
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/themeauthor';
64
$title = get_string('themeauthor', 'theme_universe');
65
$description = get_string('themeauthor_desc', 'theme_universe');
66
$default = 1;
67
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
68
$page->add($setting);
69
 
70
$name = 'theme_universe/backtotop';
71
$title = get_string('backtotop', 'theme_universe');
72
$description = get_string('backtotop_desc', 'theme_universe');
73
$default = 1;
74
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
75
$page->add($setting);
76
 
77
// Video Size
78
$name = 'theme_universe/forcefwvideo';
79
$title = get_string('forcefwvideo', 'theme_universe');
80
$description = get_string('forcefwvideo_desc', 'theme_universe', $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
// Setting: Show hint for switched role.
87
$name = 'theme_universe/showswitchedroleincourse';
88
$title = get_string('showswitchedroleincoursesetting', 'theme_universe');
89
$description = get_string('showswitchedroleincoursesetting_desc', 'theme_universe', $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
// Setting: Show hint in hidden courses.
96
$name = 'theme_universe/showhintcoursehidden';
97
$title = get_string('showhintcoursehiddensetting', 'theme_universe');
98
$description = get_string('showhintcoursehiddensetting_desc', 'theme_universe');
99
$default = 0;
100
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
101
$page->add($setting);
102
 
103
// Setting: Show hint guest for access.
104
$name = 'theme_universe/showhintcourseguestaccess';
105
$title = get_string('showhintcoursguestaccesssetting', 'theme_universe');
106
$description = get_string('showhintcourseguestaccesssetting_desc', 'theme_universe');
107
$default = 0;
108
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
109
$page->add($setting);
110
 
111
// Setting: Show hint for self enrolment without enrolment key.
112
$name = 'theme_universe/showhintcourseselfenrol';
113
$title = get_string('showhintcourseselfenrolsetting', 'theme_universe');
114
$description = get_string('showhintcourseselfenrolsetting_desc', 'theme_universe');
115
$default = 0;
116
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
117
$page->add($setting);
118
 
119
// Unaddable blocks.
120
$default = 'navigation,settings,course_list,section_links';
121
$setting = new admin_setting_configtext('theme_universe/unaddableblocks',
122
    get_string('unaddableblocks', 'theme_universe'), get_string('unaddableblocks_desc', 'theme_universe'), $default, PARAM_TEXT);
123
$page->add($setting);
124
 
125
// Google analytics block.
126
$name = 'theme_universe/googleanalytics';
127
$title = get_string('googleanalytics', 'theme_universe');
128
$description = get_string('googleanalyticsdesc', 'theme_universe');
129
$default = '';
130
$setting = new admin_setting_configtext($name, $title, $description, $default);
131
$setting->set_updatedcallback('theme_reset_all_caches');
132
$page->add($setting);
133
 
134
$settings->add($page);