AutorÃa | Ultima modificación | Ver Log |
<?php// This file is part of Moodle - http://moodle.org///// Moodle is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.//// Moodle is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with Moodle. If not, see <http://www.gnu.org/licenses/>./**** @package theme_monocolor* @copyright 2022 - 2023 Marcin Czaja (https://rosea.io)* @license Commercial https://themeforest.net/licenses**/defined('MOODLE_INTERNAL') || die();$page = new admin_settingpage('theme_monocolor_general', get_string('generalsettings', 'theme_monocolor'));$name = 'theme_monocolor/hintro';$heading = get_string('hintro', 'theme_monocolor', $a);$setting = new monocolor_setting_specialsettingheading($name, $heading,format_text(get_string('hintro_desc', 'theme_monocolor', $a), FORMAT_MARKDOWN));$page->add($setting);$name = 'theme_monocolor/darkmodetheme';$title = get_string('darkmodetheme', 'theme_monocolor');$description = get_string('darkmodetheme_desc', 'theme_monocolor');$default = 1;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);$name = 'theme_monocolor/darkmodefirst';$title = get_string('darkmodefirst', 'theme_monocolor');$description = get_string('darkmodefirst_desc', 'theme_monocolor');$default = 0;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);$name = 'theme_monocolor/sdarkmode';$title = get_string('sdarkmode', 'theme_monocolor');$description = get_string('sdarkmode_desc', 'theme_monocolor');$default = 'Dark Mode';$setting = new admin_setting_configtextarea($name, $title, $description, $default);$page->add($setting);$name = 'theme_monocolor/slightmode';$title = get_string('slightmode', 'theme_monocolor');$description = get_string('slightmode_desc', 'theme_monocolor');$default = 'Light Mode';$setting = new admin_setting_configtextarea($name, $title, $description, $default);$page->add($setting);$name = 'theme_monocolor/themeauthor';$title = get_string('themeauthor', 'theme_monocolor');$description = get_string('themeauthor_desc', 'theme_monocolor');$default = 1;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);$name = 'theme_monocolor/backtotop';$title = get_string('backtotop', 'theme_monocolor');$description = get_string('backtotop_desc', 'theme_monocolor');$default = 1;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);// Video Size$name = 'theme_monocolor/forcefwvideo';$title = get_string('forcefwvideo', 'theme_monocolor');$description = get_string('forcefwvideo_desc', 'theme_monocolor', $a);$default = 1;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$setting->set_updatedcallback('theme_reset_all_caches');$page->add($setting);// Show hint for switched role.$name = 'theme_monocolor/showswitchedroleincourse';$title = get_string('showswitchedroleincoursesetting', 'theme_monocolor');$description = get_string('showswitchedroleincoursesetting_desc', 'theme_monocolor', $a);$default = 0;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$setting->set_updatedcallback('theme_reset_all_caches');$page->add($setting);// Show hint in hidden courses.$name = 'theme_monocolor/showhintcoursehidden';$title = get_string('showhintcoursehiddensetting', 'theme_monocolor');$description = get_string('showhintcoursehiddensetting_desc', 'theme_monocolor');$default = 0;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);// Show hint guest for access.$name = 'theme_monocolor/showhintcourseguestaccess';$title = get_string('showhintcoursguestaccesssetting', 'theme_monocolor');$description = get_string('showhintcourseguestaccesssetting_desc', 'theme_monocolor');$default = 0;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);// Show hint for self enrolment without enrolment key.$name = 'theme_monocolor/showhintcourseselfenrol';$title = get_string('showhintcourseselfenrolsetting', 'theme_monocolor');$description = get_string('showhintcourseselfenrolsetting_desc', 'theme_monocolor');$default = 0;$setting = new admin_setting_configcheckbox($name, $title, $description, $default);$page->add($setting);// Unaddable blocks.// Blocks to be excluded when this theme is enabled in the "Add a block" list: Administration, Navigation, Courses and// Section links.$default = 'navigation,settings,course_list,section_links';$setting = new admin_setting_configtext('theme_monocolor/unaddableblocks',get_string('unaddableblocks', 'theme_monocolor'),get_string('unaddableblocks_desc', 'theme_monocolor'),$default,PARAM_TEXT);$page->add($setting);// Google analytics block.$name = 'theme_monocolor/googleanalytics';$title = get_string('googleanalytics', 'theme_monocolor');$description = get_string('googleanalyticsdesc', 'theme_monocolor');$default = '';$setting = new admin_setting_configtext($name, $title, $description, $default);$setting->set_updatedcallback('theme_reset_all_caches');$page->add($setting);$settings->add($page);