本文整理汇总了PHP中admin_setting_configcheckbox类的典型用法代码示例。如果您正苦于以下问题:PHP admin_setting_configcheckbox类的具体用法?PHP admin_setting_configcheckbox怎么用?PHP admin_setting_configcheckbox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了admin_setting_configcheckbox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_category
<?php
// * Miscellaneous settings
if ($hassiteconfig) {
// speedup for non-admins, add all caps used on this page
// Experimental settings page
$ADMIN->add('development', new admin_category('experimental', new lang_string('experimental', 'admin')));
$temp = new admin_settingpage('experimentalsettings', new lang_string('experimentalsettings', 'admin'));
//TODO: Re-enable cc-import once re-implemented in 2.0.x
//$temp->add(new admin_setting_configcheckbox('enableimsccimport', new lang_string('enable_cc_import', 'imscc'), new lang_string('enable_cc_import_description', 'imscc'), 0));
$temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', new lang_string('enablesafebrowserintegration', 'admin'), new lang_string('configenablesafebrowserintegration', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', new lang_string('enablegroupmembersonly', 'admin'), new lang_string('configenablegroupmembersonly', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('dndallowtextandlinks', new lang_string('dndallowtextandlinks', 'admin'), new lang_string('configdndallowtextandlinks', 'admin'), 0));
// The CSS optimiser setting. When changed we need to reset the theme caches in order to ensure they are regenerated through the optimiser.
$enablecssoptimiser = new admin_setting_configcheckbox('enablecssoptimiser', new lang_string('enablecssoptimiser', 'admin'), new lang_string('enablecssoptimiser_desc', 'admin'), 0);
$enablecssoptimiser->set_updatedcallback('theme_reset_all_caches');
$temp->add($enablecssoptimiser);
// Backup archive .mbz format: switching to .tar.gz enables larger files, better
// progress reporting and possibly better performance. This is an experimental
// setting but if successful, should be removed and enabled by default in a future
// version. Note: this setting controls newly-created backups only; restore always
// supports both formats.
$temp->add(new admin_setting_configcheckbox('enabletgzbackups', new lang_string('enabletgzbackups', 'admin'), new lang_string('enabletgzbackups_desc', 'admin'), 0));
$ADMIN->add('experimental', $temp);
// "debugging" settingpage
$temp = new admin_settingpage('debugging', new lang_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'), new lang_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
$temp->add(new admin_setting_configcheckbox('debugsmtp', new lang_string('debugsmtp', 'admin'), new lang_string('configdebugsmtp', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('perfdebug', new lang_string('perfdebug', 'admin'), new lang_string('configperfdebug', 'admin'), '7', '15', '7'));
$temp->add(new admin_setting_configcheckbox('debugstringids', new lang_string('debugstringids', 'admin'), new lang_string('debugstringids_desc', 'admin'), 0));
示例2: defined
defined('MOODLE_INTERNAL') || die;
if (is_siteadmin()) {
$slideshow_options = new admin_settingpage('theme_archaius_slideshow', get_string('slideshowsectiontitle', 'theme_archaius'));
$slideshow_options->add(new admin_setting_heading('theme_archaius_slideshow', get_string('slideshowsectionsub', 'theme_archaius'), format_text(get_string('slideshowsectiondesc', 'theme_archaius'), FORMAT_MARKDOWN)));
//Activate Slideshow
$name = "theme_archaius/activateSlideshow";
$title = get_string("activateSlideshow", 'theme_archaius');
$description = get_string('activateSlideshowdesc', 'theme_archaius');
$setting = new admin_setting_configcheckbox($name, $title, $description, 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$slideshow_options->add($setting);
//Activate pause/play Slideshow
$name = "theme_archaius/activatePausePlaySlideshow";
$title = get_string("activatePausePlaySlideshow", 'theme_archaius');
$description = get_string('activatePausePlaySlideshowdesc', 'theme_archaius');
$setting = new admin_setting_configcheckbox($name, $title, $description, 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$slideshow_options->add($setting);
// Slideshow Timeout
$name = 'theme_archaius/slideshowTimeout';
$title = get_string('slideshowTimeout', 'theme_archaius');
$description = get_string('slideshowTimeoutdesc', 'theme_archaius');
$default = 1500;
$setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_INT);
$setting->set_updatedcallback('theme_reset_all_caches');
$slideshow_options->add($setting);
// Slideshow height
$name = 'theme_archaius/slideshowheight';
$title = get_string('slideshowheight', 'theme_archaius');
$description = get_string('slideshowheightdesc', 'theme_archaius');
$default = 200;
示例3: admin_setting_configcheckbox
<?php
if ($hassiteconfig) {
// speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('enableoutcomes', new lang_string('enableoutcomes', 'grades'), new lang_string('enableoutcomes_help', 'grades'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('usecomments', new lang_string('enablecomments', 'admin'), new lang_string('configenablecomments', 'admin'), 1));
$optionalsubsystems->add(new admin_setting_configcheckbox('usetags', new lang_string('usetags', 'admin'), new lang_string('configusetags', 'admin'), '1'));
$optionalsubsystems->add(new admin_setting_configcheckbox('enablenotes', new lang_string('enablenotes', 'notes'), new lang_string('configenablenotes', 'notes'), 1));
$optionalsubsystems->add(new admin_setting_configcheckbox('enableportfolios', new lang_string('enabled', 'portfolio'), new lang_string('enableddesc', 'portfolio'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('enablewebservices', new lang_string('enablewebservices', 'admin'), new lang_string('configenablewebservices', 'admin'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('messaging', new lang_string('messaging', 'admin'), new lang_string('configmessaging', 'admin'), 1));
$optionalsubsystems->add(new admin_setting_configcheckbox('messaginghidereadnotifications', new lang_string('messaginghidereadnotifications', 'admin'), new lang_string('configmessaginghidereadnotifications', 'admin'), 0));
$options = array(DAYSECS => new lang_string('secondstotime86400'), WEEKSECS => new lang_string('secondstotime604800'), 2620800 => new lang_string('nummonths', 'moodle', 1), 15724800 => new lang_string('nummonths', 'moodle', 6), 0 => new lang_string('never'));
$optionalsubsystems->add(new admin_setting_configselect('messagingdeletereadnotificationsdelay', new lang_string('messagingdeletereadnotificationsdelay', 'admin'), new lang_string('configmessagingdeletereadnotificationsdelay', 'admin'), 604800, $options));
$optionalsubsystems->add(new admin_setting_configcheckbox('messagingallowemailoverride', new lang_string('messagingallowemailoverride', 'admin'), new lang_string('configmessagingallowemailoverride', 'admin'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('enablestats', new lang_string('enablestats', 'admin'), new lang_string('configenablestats', 'admin'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('enablerssfeeds', new lang_string('enablerssfeeds', 'admin'), new lang_string('configenablerssfeeds', 'admin'), 0));
$optionalsubsystems->add(new admin_setting_bloglevel('bloglevel', new lang_string('bloglevel', 'admin'), new lang_string('configbloglevel', 'admin'), 4, array(5 => new lang_string('worldblogs', 'blog'), 4 => new lang_string('siteblogs', 'blog'), 1 => new lang_string('personalblogs', 'blog'), 0 => new lang_string('disableblogs', 'blog'))));
$options = array('off' => new lang_string('off', 'mnet'), 'strict' => new lang_string('on', 'mnet'));
$optionalsubsystems->add(new admin_setting_configselect('mnet_dispatcher_mode', new lang_string('net', 'mnet'), new lang_string('configmnet', 'mnet'), 'off', $options));
// Conditional activities: completion and availability
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion', new lang_string('enablecompletion', 'completion'), new lang_string('configenablecompletion', 'completion'), 0));
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability', new lang_string('enableavailability', 'condition'), new lang_string('configenableavailability', 'condition'), 0));
$checkbox->set_affects_modinfo(true);
$optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism', 'plagiarism'), new lang_string('configenableplagiarism', 'plagiarism'), 0));
}
示例4: defined
* 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 this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package elisprogram_usetgroups
* @author Remote-Learner.net Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright (C) 2008-2013 Remote-Learner.net Inc (http://www.remote-learner.net)
*
*/
defined('MOODLE_INTERNAL') || die;
require_once dirname(__FILE__) . '/../../../../config.php';
global $CFG;
require_once $CFG->dirroot . '/local/elisprogram/lib/setup.php';
require_once elispm::file('plugins/usetgroups/lib.php');
if ($ADMIN->fulltree) {
$settings->add(new admin_setting_heading('userset_grp_settings', get_string('userset_grp_settings', 'elisprogram_usetgroups'), ''));
// Allow course-level group population from usersets
$userset_groups = new admin_setting_configcheckbox('elisprogram_usetgroups/userset_groups', get_string('grp_pop_userset_setting', 'elisprogram_usetgroups'), get_string('grp_pop_userset_help', 'elisprogram_usetgroups'), 0);
$userset_groups->set_updatedcallback('userset_groups_pm_userset_groups_enabled_handler');
$settings->add($userset_groups);
$sc_userset_groups = new admin_setting_configcheckbox('elisprogram_usetgroups/site_course_userset_groups', get_string('fp_pop_userset_setting', 'elisprogram_usetgroups'), get_string('fp_pop_userset_help', 'elisprogram_usetgroups'), 0);
$sc_userset_groups->set_updatedcallback('userset_groups_pm_site_course_userset_groups_enabled_handler');
$settings->add($sc_userset_groups);
// Allow front page grouping creation from userset-based groups
$userset_groupings = new admin_setting_configcheckbox('elisprogram_usetgroups/userset_groupings', get_string('fp_grp_userset_setting', 'elisprogram_usetgroups'), get_string('fp_grp_userset_help', 'elisprogram_usetgroups'), 0);
$userset_groupings->set_updatedcallback('userset_groups_pm_userset_groupings_enabled');
$settings->add($userset_groupings);
}
示例5: admin_category
<?php
// * Miscellaneous settings
if ($hassiteconfig) {
// speedup for non-admins, add all caps used on this page
// Experimental settings page
$ADMIN->add('development', new admin_category('experimental', get_string('experimental', 'admin')));
require_once $CFG->dirroot . '/search/lib.php';
$temp = new admin_settingpage('experimentalsettings', get_string('experimentalsettings', 'admin'));
$englobalsearch = new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0);
$englobalsearch->set_updatedcallback('search_updatedcallback');
$temp->add($englobalsearch);
//TODO: Re-enable cc-import once re-implemented in 2.0.x
//$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0));
$temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', get_string('enablegroupmembersonly', 'admin'), get_string('configenablegroupmembersonly', 'admin'), 0));
$ADMIN->add('experimental', $temp);
// "debugging" settingpage
$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_configcheckbox('debugdisplay', get_string('debugdisplay', 'admin'), get_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
$temp->add(new admin_setting_configcheckbox('xmlstrictheaders', get_string('xmlstrictheaders', 'admin'), get_string('configxmlstrictheaders', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('debugsmtp', get_string('debugsmtp', 'admin'), get_string('configdebugsmtp', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('perfdebug', get_string('perfdebug', 'admin'), get_string('configperfdebug', 'admin'), '7', '15', '7'));
$temp->add(new admin_setting_configcheckbox('debugstringids', get_string('debugstringids', 'admin'), get_string('configdebugstringids', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('debugvalidators', get_string('debugvalidators', 'admin'), get_string('configdebugvalidators', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('debugpageinfo', get_string('debugpageinfo', 'admin'), get_string('configdebugpageinfo', 'admin'), 0));
$ADMIN->add('development', $temp);
// "profiling" settingpage (conditionally if the 'xhprof' extension is available only)
if (extension_loaded('xhprof') && function_exists('xhprof_enable')) {
$temp = new admin_settingpage('profiling', get_string('profiling', 'admin'));
示例6: admin_setting_special_debugdisplay
function admin_setting_special_debugdisplay()
{
$name = 'debugdisplay';
$visiblename = get_string('debugdisplay', 'admin');
$description = get_string('configdebugdisplay', 'admin');
$default = ini_get('display_errors');
parent::admin_setting_configcheckbox($name, $visiblename, $description, $default);
}
示例7: add_checkboxes
public function add_checkboxes($setting, $instance, $default = '0', $checked = '1', $unchecked = '0')
{
$checkbox = new admin_setting_configcheckbox($this->name_for($setting . $instance), $this->title_for($setting, $instance), $this->description_for($setting), $default, $checked, $unchecked);
$checkbox->set_updatedcallback('theme_reset_all_caches');
return $checkbox;
}
示例8: get_string
$generalsettings->add($setting);
// Show caption options.
$name = 'theme_essentials/slidecaptionoptions';
$title = get_string('slidecaptionoptions', 'theme_essential');
$description = get_string('slidecaptionoptionsdesc', 'theme_essential');
$default = '0';
$choices = array(0 => get_string('slidecaptionbeside', 'theme_essential'), 1 => get_string('slidecaptionontop', 'theme_essential'), 2 => get_string('slidecaptionunderneath', 'theme_essential'));
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$generalsettings->add($setting);
// Show caption centred.
$name = 'theme_essentials/slidecaptioncentred';
$title = get_string('slidecaptioncentred', 'theme_essential');
$description = get_string('slidecaptioncentreddesc', 'theme_essential');
$default = false;
$setting = new admin_setting_configcheckbox($name, $title, $description, $default, true, false);
$setting->set_updatedcallback('theme_reset_all_caches');
$generalsettings->add($setting);
// Slide button colour setting.
$name = 'theme_essentials/slidebuttoncolor';
$title = get_string('slidebuttoncolor', 'theme_essential');
$description = get_string('slidebuttoncolordesc', 'theme_essential');
$default = '#30add1';
$previewconfig = null;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$setting->set_updatedcallback('theme_reset_all_caches');
$generalsettings->add($setting);
// Slide button hover colour setting.
$name = 'theme_essentials/slidebuttonhovercolor';
$title = get_string('slidebuttonhovercolor', 'theme_essential');
$description = get_string('slidebuttonhovercolordesc', 'theme_essential');
示例9: assign_capability
assign_capability('block/fn_site_groups:managestudents', CAP_ALLOW, $gmroleid, $context->id);
assign_capability('block/fn_site_groups:markallgroups', CAP_ALLOW, $gmroleid, $context->id);
assign_capability('block/fn_site_groups:assignallusers', CAP_INHERIT, $gmroleid, $context->id);
assign_capability('block/fn_site_groups:assignowngroupusers', CAP_ALLOW, $gmroleid, $context->id);
assign_capability('block/fn_site_groups:createnewgroups', CAP_ALLOW, $gmroleid, $context->id);
} else {
$gmroleid = $role->id;
}
$roles = get_records_menu('role', '', '', 'sortorder ASC', 'id,name');
if (empty($roles)) {
$roles = array();
}
$course = get_site();
$role = get_default_course_role($course);
$defaultroleid = $role->id;
$item = new admin_setting_configcheckbox('block_fn_site_groups_enabled', get_string('fn_site_groups_enabled', 'block_fn_site_groups'), get_string('fn_config_site_groups_enabled', 'block_fn_site_groups'), '0');
$item->set_updatedcallback('fn_sg_set_site_group_mode');
$settings->add($item);
$settings->add(new admin_setting_configselect('block_fn_site_groups_defaultroleid', get_string('fn_site_groups_defaultroleid', 'block_fn_site_groups'), get_string('fn_config_site_groups_defaultroleid', 'block_fn_site_groups'), $defaultroleid, $roles));
$settings->add(new admin_setting_configmulticheckbox('block_fn_site_groups_roles', get_string('fn_site_groups_roles', 'block_fn_site_groups'), get_string('fn_config_site_groups_roles', 'block_fn_site_groups'), '0', $roles));
/// These settings don't actually use the $CFG variable, but are used to manage capabilities.
$caps = role_context_capabilities($gmroleid, $context);
$sgusers = array();
if (!empty($caps['block/fn_site_groups:assignowngroupusers'])) {
$sgusers[] = 1;
}
if (!empty($caps['block/fn_site_groups:assignallusers'])) {
$sgusers[] = 2;
}
$CFG->block_fn_site_groups_users = implode(',', $sgusers);
$users = array(1 => get_string('fn_site_groups:assignowngroupusers', 'block_fn_site_groups'), 2 => get_string('fn_site_groups:assignallusers', 'block_fn_site_groups'));
示例10: lang_string
$settings->add($setting);
$name = new lang_string('blindmarking', 'mod_assign');
$description = new lang_string('blindmarking_help', 'mod_assign');
$setting = new admin_setting_configcheckbox('assign/blindmarking', $name, $description, 0);
$setting->set_advanced_flag_options(admin_setting_flag::ENABLED, false);
$setting->set_locked_flag_options(admin_setting_flag::ENABLED, false);
$settings->add($setting);
$name = new lang_string('markingworkflow', 'mod_assign');
$description = new lang_string('markingworkflow_help', 'mod_assign');
$setting = new admin_setting_configcheckbox('assign/markingworkflow', $name, $description, 0);
$setting->set_advanced_flag_options(admin_setting_flag::ENABLED, false);
$setting->set_locked_flag_options(admin_setting_flag::ENABLED, false);
$settings->add($setting);
$name = new lang_string('markingallocation', 'mod_assign');
$description = new lang_string('markingallocation_help', 'mod_assign');
$setting = new admin_setting_configcheckbox('assign/markingallocation', $name, $description, 0);
$setting->set_advanced_flag_options(admin_setting_flag::ENABLED, false);
$setting->set_locked_flag_options(admin_setting_flag::ENABLED, false);
$settings->add($setting);
}
$ADMIN->add('modassignfolder', $settings);
// Tell core we already added the settings structure.
$settings = null;
$ADMIN->add('modassignfolder', new admin_category('assignsubmissionplugins', new lang_string('submissionplugins', 'assign'), !$module->is_enabled()));
$ADMIN->add('assignsubmissionplugins', new assign_admin_page_manage_assign_plugins('assignsubmission'));
$ADMIN->add('modassignfolder', new admin_category('assignfeedbackplugins', new lang_string('feedbackplugins', 'assign'), !$module->is_enabled()));
$ADMIN->add('assignfeedbackplugins', new assign_admin_page_manage_assign_plugins('assignfeedback'));
foreach (core_plugin_manager::instance()->get_plugins_of_type('assignsubmission') as $plugin) {
/** @var \mod_assign\plugininfo\assignsubmission $plugin */
$plugin->load_settings($ADMIN, 'assignsubmissionplugins', $hassiteconfig);
}
示例11: defined
This plugin is part of Archaius theme.
@copyright 2015 onwards Daniel Munera Sanchez
*/
defined('MOODLE_INTERNAL') || die;
if (is_siteadmin()) {
$javascript_effects_options = new admin_settingpage('theme_archaius_js', get_string('jssectiontitle', 'theme_archaius'));
$javascript_effects_options->add(new admin_setting_heading('theme_archaius_js', get_string('jssectionsub', 'theme_archaius'), format_text(get_string('jssectiondesc', 'theme_archaius'), FORMAT_MARKDOWN)));
// Activate accordion blocks
$name = "theme_archaius/accordionBlocks";
$title = get_string("accordionBlocks", 'theme_archaius');
$description = get_string('accordionBlocksdesc', 'theme_archaius');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$javascript_effects_options->add($setting);
//Activate collapsible topics
$name = "theme_archaius/collasibleTopics";
$title = get_string("collapsibleTopics", 'theme_archaius');
$description = get_string('collasibleTopicsdesc', 'theme_archaius');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$javascript_effects_options->add($setting);
//Activate Hide Show Blocks
$name = "theme_archaius/hideShowBlocks";
$title = get_string("hideShowBlocks", 'theme_archaius');
$description = get_string('hideShowBlocksdesc', 'theme_archaius');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$javascript_effects_options->add($setting);
//Add options to admin tree
$ADMIN->add('theme_archaius', $javascript_effects_options);
}
开发者ID:beyondkeysystem,项目名称:moodle-theme_archaius,代码行数:31,代码来源:archaius_javascript_effects_settings.php
示例12: admin_settingpage
<?php
// $Id: misc.php,v 1.14.2.5 2009/03/09 23:30:55 stronk7 Exp $
// * Miscellaneous settings
if ($hassiteconfig) {
// speedup for non-admins, add all caps used on this page
// Experimental settings page
$temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('smartpix', get_string('smartpix', 'admin'), get_string('configsmartpix', 'admin'), 0));
$item = new admin_setting_configcheckbox('enablehtmlpurifier', get_string('enablehtmlpurifier', 'admin'), get_string('configenablehtmlpurifier', 'admin'), 0);
$item->set_updatedcallback('reset_text_filters_cache');
$temp->add($item);
$temp->add(new admin_setting_configcheckbox('enablegroupings', get_string('enablegroupings', 'admin'), get_string('configenablegroupings', 'admin'), 0));
$rqsetting = new admin_setting_configcheckbox('selectmanual', get_string('selectmanualquestions', 'qtype_random'), get_string('configselectmanualquestions', 'qtype_random'), 0);
$rqsetting->plugin = 'qtype_random';
$temp->add($rqsetting);
$temp->add(new admin_setting_configcheckbox('experimentalsplitrestore', get_string('experimentalsplitrestore', 'admin'), get_string('configexperimentalsplitrestore', 'admin'), 0));
$ADMIN->add('misc', $temp);
// XMLDB editor
$ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "{$CFG->wwwroot}/{$CFG->admin}/xmldb/"));
// hidden scripts linked from elsewhere
$ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot . '/' . $CFG->admin . '/oacleanup.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot . '/' . $CFG->admin . '/upgradeforumread.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradelogs', 'Upgrade logs', $CFG->wwwroot . '/' . $CFG->admin . '/upgradelogs.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('multilangupgrade', get_string('multilangupgrade', 'admin'), $CFG->wwwroot . '/' . $CFG->admin . '/multilangupgrade.php', 'moodle/site:config', !empty($CFG->filter_multilang_converted)));
}
// end of speedup
示例13: add_checkbox
public function add_checkbox($setting, $default = '0', $checked = '1', $unchecked = '0')
{
$checkbox = new admin_setting_configcheckbox($this->name_for($setting), $this->title_for($setting), $this->description_for($setting), $default, $checked, $unchecked);
$checkbox->set_updatedcallback('theme_reset_all_caches');
$this->settingspage->add($checkbox);
}
示例14: admin_setting_special_pageformatonfrontpage
/**
* Constructor - same as admin_setting_configcheckbox
*
* @return void
**/
function admin_setting_special_pageformatonfrontpage($name, $visiblename, $description, $defaultsetting)
{
parent::admin_setting_configcheckbox($name, $visiblename, $description, $defaultsetting);
}
示例15: array
$choices = array('0' => 'none', '1' => 'pattern1', '2' => 'pattern2', '3' => 'pattern3', '4' => 'pattern4');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slidshow AutoAdvance
$name = 'theme_lambda/slideshow_advance';
$title = get_string('slideshow_advance', 'theme_lambda');
$description = get_string('slideshow_advance_desc', 'theme_lambda');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slidshow Navigation
$name = 'theme_lambda/slideshow_nav';
$title = get_string('slideshow_nav', 'theme_lambda');
$description = get_string('slideshow_nav_desc', 'theme_lambda');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slideshow Loader
$name = 'theme_lambda/slideshow_loader';
$title = get_string('slideshow_loader', 'theme_lambda');
$description = get_string('slideshow_loader_desc', 'theme_lambda');
$default = '0';
$choices = array('0' => 'bar', '1' => 'pie', '2' => 'none');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slideshow Image FX
$name = 'theme_lambda/slideshow_imgfx';
$title = get_string('slideshow_imgfx', 'theme_lambda');
$description = get_string('slideshow_imgfx_desc', 'theme_lambda');