當前位置: 首頁>>代碼示例>>PHP>>正文


PHP admin_setting_configcheckbox::set_affects_modinfo方法代碼示例

本文整理匯總了PHP中admin_setting_configcheckbox::set_affects_modinfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin_setting_configcheckbox::set_affects_modinfo方法的具體用法?PHP admin_setting_configcheckbox::set_affects_modinfo怎麽用?PHP admin_setting_configcheckbox::set_affects_modinfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在admin_setting_configcheckbox的用法示例。


在下文中一共展示了admin_setting_configcheckbox::set_affects_modinfo方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

<?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


注:本文中的admin_setting_configcheckbox::set_affects_modinfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。