• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP admin_setting_configcheckbox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中admin_setting_configcheckbox的典型用法代码示例。如果您正苦于以下问题:PHP admin_setting_configcheckbox类的具体用法?PHP admin_setting_configcheckbox怎么用?PHP admin_setting_configcheckbox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了admin_setting_configcheckbox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
开发者ID:eamador,项目名称:moodle-course-custom-fields,代码行数:31,代码来源:development.php


示例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;
开发者ID:beyondkeysystem,项目名称:moodle-theme_archaius,代码行数:31,代码来源:archaius_slideshow_settings.php


示例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));
}
开发者ID:saurabh947,项目名称:MoodleLearning,代码行数:26,代码来源:subsystems.php


示例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);
}
开发者ID:jamesmcq,项目名称:elis,代码行数:31,代码来源:settings.php


示例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'));
开发者ID:nigeldaley,项目名称:moodle,代码行数:31,代码来源:development.php


示例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);
 }
开发者ID:veritech,项目名称:pare-project,代码行数:8,代码来源:adminlib.php


示例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;
 }
开发者ID:nadavkav,项目名称:moodle-accessibility,代码行数:6,代码来源:simple_theme_settings.class.php


示例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');
开发者ID:uwidcit,项目名称:Moodle-Themes,代码行数:31,代码来源:settings.php


示例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'));
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:settings.php


示例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);
}
开发者ID:evltuma,项目名称:moodle,代码行数:31,代码来源:settings.php


示例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
开发者ID:kai707,项目名称:ITSA-backup,代码行数:28,代码来源:misc.php


示例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);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:6,代码来源:simple_theme_settings.class.php


示例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);
 }
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:9,代码来源:adminsetting.php


示例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');
开发者ID:sirromas,项目名称:medical,代码行数:31,代码来源:settings.php


示例16: admin_category

 $SESSION->curriculum_expiration_toggled = false;
 $ADMIN->add('root', new admin_category('local_elisprogram', get_string('elis_config', 'local_elisprogram'), true));
 $settings = new admin_settingpage('local_elisprogram_settings', get_string('elis_settings', 'local_elisprogram'), 'local/elisprogram:config');
 // ***Track Settings
 $settings->add(new admin_setting_heading('track_settings', get_string('track_settings', 'local_elisprogram'), ''));
 // Turn off user defined tracks
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/userdefinedtrack', get_string('userdef_tracks_setting', 'local_elisprogram'), '', 0));
 // ***Learning Plan
 $settings->add(new admin_setting_heading('learning_plan', get_string('learningplan', 'local_elisprogram'), ''));
 // Turn off learning plan
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/disablecoursecatalog', get_string('learning_plan_setting', 'local_elisprogram'), '', 0));
 // Number of curricula to display before automatically collapsing
 $settings->add(new admin_setting_configtext('local_elisprogram/catalog_collapse_count', get_string('auto_collapse_setting', 'local_elisprogram'), '', 4, PARAM_INT));
 // TBD
 // Enable curriculum expiration
 $setting = new admin_setting_configcheckbox('local_elisprogram/enable_curriculum_expiration', get_string('crlm_expire_setting', 'local_elisprogram'), '', 0);
 //callback to handle updating curriculum assignment expiry times
 $setting->set_updatedcallback('curriculum_expiration_enabled_updatedcallback');
 $settings->add($setting);
 // Calculate curriculum expiration based on the time a student
 $opts = array(CURR_EXPIRE_ENROL_START => get_string('curriculum_expire_enrol_start', 'local_elisprogram'), CURR_EXPIRE_ENROL_COMPLETE => get_string('curriculum_expire_enrol_complete', 'local_elisprogram'));
 $setting = new admin_setting_configselect('local_elisprogram/curriculum_expiration_start', get_string('expire_basis_setting', 'local_elisprogram'), '', CURR_EXPIRE_ENROL_START, $opts);
 //callback to handle updating curriculum assignment expiry times
 $setting->set_updatedcallback('curriculum_expiration_start_updatedcallback');
 $settings->add($setting);
 // TBD
 // Allow students to see completed courses on their dashboard
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/display_completed_courses', get_string('completed_courses_setting', 'local_elisprogram'), get_string('completed_courses_help', 'local_elisprogram'), 1));
 // ***Certificates
 $settings->add(new admin_setting_heading('certificates', get_string('certificates', 'local_elisprogram'), ''));
 // Disable Certificates
开发者ID:jamesmcq,项目名称:elis,代码行数:31,代码来源:settings.php


示例17:

 function config_write($name, $value)
 {
     if ($value == 1) {
         $format = 'page';
     } else {
         $format = 'site';
     }
     if (set_field('course', 'format', $format, 'id', SITEID)) {
         return parent::config_write($name, $value);
     }
 }
开发者ID:NextEinstein,项目名称:riverhills,代码行数:11,代码来源:frontpage.php


示例18:

 /**
  * Calls parent::__construct with specific arguments
  */
 function admin_setting_special_gradelimiting()
 {
     parent::__construct('unlimitedgrades', get_string('unlimitedgrades', 'grades'), get_string('configunlimitedgrades', 'grades'), '0', '1', '0');
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:7,代码来源:adminlib.php


示例19: write_setting

 /**
  * Save the selected setting
  *
  * @param string $data The selected site
  * @return string empty string or error message
  */
 public function write_setting($data)
 {
     global $DB, $CFG;
     //for install cli script, $CFG->defaultuserroleid is not set so do nothing
     if (empty($CFG->defaultuserroleid)) {
         return '';
     }
     $servicename = MOODLE_OFFICIAL_MOBILE_SERVICE;
     require_once $CFG->dirroot . '/webservice/lib.php';
     $webservicemanager = new webservice();
     if ((string) $data === $this->yes) {
         //code run when enable mobile web service
         //enable web service systeme if necessary
         set_config('enablewebservices', true);
         //enable mobile service
         $mobileservice = $webservicemanager->get_external_service_by_shortname(MOODLE_OFFICIAL_MOBILE_SERVICE);
         $mobileservice->enabled = 1;
         $webservicemanager->update_external_service($mobileservice);
         //enable xml-rpc server
         $activeprotocols = empty($CFG->webserviceprotocols) ? array() : explode(',', $CFG->webserviceprotocols);
         if (!in_array('xmlrpc', $activeprotocols)) {
             $activeprotocols[] = 'xmlrpc';
             set_config('webserviceprotocols', implode(',', $activeprotocols));
         }
         //allow xml-rpc:use capability for authenticated user
         $this->set_xmlrpc_cap(true);
     } else {
         //disable web service system if no other services are enabled
         $otherenabledservices = $DB->get_records_select('external_services', 'enabled = :enabled AND (shortname != :shortname OR shortname IS NULL)', array('enabled' => 1, 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE));
         if (empty($otherenabledservices)) {
             set_config('enablewebservices', false);
             //also disable xml-rpc server
             $activeprotocols = empty($CFG->webserviceprotocols) ? array() : explode(',', $CFG->webserviceprotocols);
             $protocolkey = array_search('xmlrpc', $activeprotocols);
             if ($protocolkey !== false) {
                 unset($activeprotocols[$protocolkey]);
                 set_config('webserviceprotocols', implode(',', $activeprotocols));
             }
             //disallow xml-rpc:use capability for authenticated user
             $this->set_xmlrpc_cap(false);
         }
         //disable the mobile service
         $mobileservice = $webservicemanager->get_external_service_by_shortname(MOODLE_OFFICIAL_MOBILE_SERVICE);
         $mobileservice->enabled = 0;
         $webservicemanager->update_external_service($mobileservice);
     }
     return parent::write_setting($data);
 }
开发者ID:raymondAntonio,项目名称:moodle,代码行数:54,代码来源:adminlib.php


示例20: __construct

 /**
  * Constructs setting.
  */
 public function __construct()
 {
     parent::__construct('local_ousearch/yearsenabled', get_string('yearsenabled', 'local_ousearch'), get_string('yearsenabled_desc', 'local_ousearch'), year_tables::ENABLED_OFF, year_tables::ENABLED_TRANSFERRING, year_tables::ENABLED_OFF);
 }
开发者ID:profcab,项目名称:moodle-local_ousearch,代码行数:7,代码来源:admin_setting_transferring.php



注:本文中的admin_setting_configcheckbox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP admin_setting_configselect类代码示例发布时间:2022-05-23
下一篇:
PHP admin_setting类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap