本文整理汇总了PHP中admin_settingpage类的典型用法代码示例。如果您正苦于以下问题:PHP admin_settingpage类的具体用法?PHP admin_settingpage怎么用?PHP admin_settingpage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了admin_settingpage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_adminsettings
/**
* setup administrator links and settings
*
* @param object $admin
*/
public static function set_adminsettings($admin)
{
$me = new self();
$me->grab_moodle_globals();
$context = context_course::instance(SITEID);
$admin->add('localplugins', new admin_category('wspeoplesoft', $me->get_string('name')));
//$admin->add('wspeoplesoft', new admin_externalpage('pathxmlwspeoplesoft', $me->get_string('insertpath'), $me->get_config('wwwroot') . '/local/globalmessage/index.php?id=' . SITEID, 'moodle/site:config', false, $context));
$temp = new admin_settingpage('wspeoplesoftsettings', $me->get_string('wssettings'));
$temp->add(new admin_setting_configcheckbox('wspeoplesoftcourseenable', $me->get_string('wsenabledcourse'), $me->get_string('enabledcoursedesc'), 0));
$temp->add(new admin_setting_configtext('wspeoplesoftcoursepath', $me->get_string('insertpathcourse'), $me->get_string('insertpathcoursedesc'), null, PARAM_TEXT));
$temp->add(new admin_setting_configcheckbox('wspeoplesoftuserenable', $me->get_string('wsenableduser'), $me->get_string('enableduserdesc'), 0));
$temp->add(new admin_setting_configtext('wspeoplesoftuserpath', $me->get_string('insertpathuser'), $me->get_string('insertpathuserdesc'), null, PARAM_TEXT));
$temp->add(new admin_setting_configcheckbox('wspeoplesoftmemberenable', $me->get_string('wsenabledmember'), $me->get_string('enabledmemberdesc'), 0));
$temp->add(new admin_setting_configtext('wspeoplesoftmemberpath', $me->get_string('insertpathmembers'), $me->get_string('insertpathmemberdesc'), null, PARAM_TEXT));
$temp->add(new admin_setting_configtext('wspeoplesofttoken', $me->get_string('wstoken'), $me->get_string('wstokendesc'), null, PARAM_TEXT));
$admin->add('wspeoplesoft', $temp);
}
示例2: defined
// 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/>.
/**
* Settings for module resource
*
* All the resourcelib specific functions, needed to implement the module
* logic, should go here. Never include this file from your lib.php!
*
* @package local_courseblog
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
global $CFG, $PAGE;
$ADMIN->add('localplugins', new admin_category('local_courseblog', get_string('pluginname', 'local_courseblog')));
$page = new admin_settingpage('courseblog', get_string('pluginname', 'local_courseblog'));
$page->add(new admin_setting_configtext('local_courseblog/title', get_string('blog_title', 'local_courseblog'), null, null));
$ADMIN->add('local_courseblog', $page);
$ADMIN->add('local_courseblog', new admin_externalpage('local_courseblog_categories', get_string('manage_categories', 'local_courseblog'), $CFG->wwwroot . '/local/courseblog/categories.php'));
$ADMIN->add('local_courseblog', new admin_externalpage('local_courseblog_entries', get_string('manage_entries', 'local_courseblog'), $CFG->wwwroot . '/local/courseblog/entries.php'));
示例3: get_string
$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');
$setting = new admin_setting_configtext($name, $title, $description, 'random', PARAM_URL);
$temp->add($setting);
// Slideshow Text FX
$name = 'theme_lambda/slideshow_txtfx';
$title = get_string('slideshow_txtfx', 'theme_lambda');
$description = get_string('slideshow_txtfx_desc', 'theme_lambda');
$setting = new admin_setting_configtext($name, $title, $description, 'moveFromLeft', PARAM_URL);
$temp->add($setting);
$ADMIN->add('theme_lambda', $temp);
// "frontpage carousel" settingpage
$temp = new admin_settingpage('theme_lambda_carousel', get_string('settings_carousel', 'theme_lambda'));
$temp->add(new admin_setting_heading('theme_lambda_carousel', get_string('carouselheadingsub', 'theme_lambda'), format_text(get_string('carouseldesc', 'theme_lambda'), FORMAT_MARKDOWN)));
// Position
$name = 'theme_lambda/carousel_position';
$title = get_string('carousel_position', 'theme_lambda');
$description = get_string('carousel_positiondesc', 'theme_lambda');
$default = '1';
$choices = array('0' => 'top', '1' => 'bottom');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Heading
$name = 'theme_lambda/carousel_h';
$title = get_string('carousel_h', 'theme_lambda');
$description = get_string('carousel_h_desc', 'theme_lambda');
$default = '';
示例4: str_replace
} else {
$securewwwroot = str_replace('http:', 'https:', $CFG->wwwroot);
}
// stuff under the "accounts" subcategory
$ADMIN->add('accounts', new admin_externalpage('editusers', new lang_string('userlist', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/user.php", array('moodle/user:update', 'moodle/user:delete')));
if ($rolename != 'subadmin') {
$ADMIN->add('accounts', new admin_externalpage('userbulk', new lang_string('userbulk', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/user/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
}
$ADMIN->add('accounts', new admin_externalpage('addnewuser', new lang_string('addnewuser'), "{$securewwwroot}/user/editadvanced.php?id=-1", 'moodle/user:create'));
$ADMIN->add('accounts', new admin_externalpage('profilefields', new lang_string('profilefields', 'admin'), "{$CFG->wwwroot}/user/profile/index.php", 'moodle/site:config'));
if ($rolename != 'subadmin') {
$ADMIN->add('accounts', new admin_externalpage('cohorts', new lang_string('cohorts', 'cohort'), $CFG->wwwroot . '/cohort/index.php', array('moodle/cohort:manage', 'moodle/cohort:view')));
}
// stuff under the "roles" subcategory
// "userpolicies" settingpage
$temp = new admin_settingpage('userpolicies', new lang_string('userpolicies', 'admin'));
if ($ADMIN->fulltree) {
if (!during_initial_install()) {
$context = context_system::instance();
$otherroles = array();
$guestroles = array();
$userroles = array();
$creatornewroles = array();
$defaultteacherid = null;
$defaultuserid = null;
$defaultguestid = null;
$roles = role_fix_names(get_all_roles(), null, ROLENAME_ORIGINALANDSHORT);
foreach ($roles as $role) {
$rolename = $role->localname;
switch ($role->archetype) {
case 'manager':
示例5: defined
//
// 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/>.
/**
* Atto text editor integration version file.
*
* @package atto_morefontcolors
* @copyright 2014 Université de Lausanne
* @author Nicolas Dunand <nicolas.dunand@unil.ch>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
$ADMIN->add('editoratto', new admin_category('atto_morefontcolors', new lang_string('pluginname', 'atto_morefontcolors')));
$settings = new admin_settingpage('atto_morefontcolors_settings', new lang_string('pluginname', 'atto_morefontcolors'));
if ($ADMIN->fulltree) {
$name = new lang_string('availablecolors', 'atto_morefontcolors');
$desc = new lang_string('availablecolors_desc', 'atto_morefontcolors');
$default = '#FFFFFF
#EF4540
#FFCF35
#98CA3E
#7D9FD3
#333333';
$setting = new admin_setting_configtextarea('atto_morefontcolors/availablecolors', $name, $desc, $default);
$settings->add($setting);
}
示例6: str_replace
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:', 'https:', $CFG->wwwroot);
}
// stuff under the "accounts" subcategory
$ADMIN->add('accounts', new admin_externalpage('editusers', get_string('userlist', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/user.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('userbulk', get_string('userbulk', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/user/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('addnewuser', get_string('addnewuser'), "{$securewwwroot}/user/editadvanced.php?id=-1", 'moodle/user:create'));
$ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('uploadusers'), "{$CFG->wwwroot}/{$CFG->admin}/uploaduser.php", 'moodle/site:uploadusers'));
$ADMIN->add('accounts', new admin_externalpage('uploadpictures', get_string('uploadpictures', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/uploadpicture.php", 'moodle/site:uploadusers'));
$ADMIN->add('accounts', new admin_externalpage('profilefields', get_string('profilefields', 'admin'), "{$CFG->wwwroot}/user/profile/index.php", 'moodle/site:config'));
// stuff under the "roles" subcategory
$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role')));
// "userpolicies" settingpage
$temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));
if ($ADMIN->fulltree) {
if (!empty($CFG->rolesactive)) {
$context = get_context_instance(CONTEXT_SYSTEM);
if (!($guestrole = get_guest_role())) {
$guestrole->id = 0;
}
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
$studentrole = array_shift($studentroles);
/// Take the first one
} else {
$studentrole->id = 0;
}
if ($userroles = get_roles_with_capability('moodle/legacy:user', CAP_ALLOW)) {
$userrole = array_shift($userroles);
/// Take the first one
示例7: admin_setting_configtext
$temp->add(new admin_setting_configtext('docroot', new lang_string('docroot', 'admin'), new lang_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
$temp->add(new admin_setting_configcheckbox('doctonewwindow', new lang_string('doctonewwindow', 'admin'), new lang_string('configdoctonewwindow', 'admin'), 0));
$ADMIN->add('appearance', $temp);
$temp = new admin_externalpage('mypage', new lang_string('mypage', 'admin'), $CFG->wwwroot . '/my/indexsys.php');
$ADMIN->add('appearance', $temp);
$temp = new admin_externalpage('profilepage', new lang_string('myprofile', 'admin'), $CFG->wwwroot . '/user/profilesys.php');
$ADMIN->add('appearance', $temp);
// coursecontact is the person responsible for course - usually manages enrolments, receives notification, etc.
$temp = new admin_settingpage('coursecontact', new lang_string('courses'));
$temp->add(new admin_setting_special_coursecontact());
$temp->add(new admin_setting_configcheckbox('courselistshortnames', new lang_string('courselistshortnames', 'admin'), new lang_string('courselistshortnames_desc', 'admin'), 0));
$ADMIN->add('appearance', $temp);
$temp = new admin_settingpage('ajax', new lang_string('ajaxuse'));
$temp->add(new admin_setting_configcheckbox('enableajax', new lang_string('enableajax', 'admin'), new lang_string('configenableajax', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('useexternalyui', new lang_string('useexternalyui', 'admin'), new lang_string('configuseexternalyui', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('yuicomboloading', new lang_string('yuicomboloading', 'admin'), new lang_string('configyuicomboloading', 'admin'), 1));
$setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1);
$setting->set_updatedcallback('js_reset_all_caches');
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
$ADMIN->add('appearance', $temp);
// link to tag management interface
$ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), "{$CFG->wwwroot}/tag/manage.php"));
$temp = new admin_settingpage('additionalhtml', new lang_string('additionalhtml', 'admin'));
$temp->add(new admin_setting_heading('additionalhtml_heading', new lang_string('additionalhtml_heading', 'admin'), new lang_string('additionalhtml_desc', 'admin')));
$temp->add(new admin_setting_configtextarea('additionalhtmlhead', new lang_string('additionalhtmlhead', 'admin'), new lang_string('additionalhtmlhead_desc', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtextarea('additionalhtmltopofbody', new lang_string('additionalhtmltopofbody', 'admin'), new lang_string('additionalhtmltopofbody_desc', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtextarea('additionalhtmlfooter', new lang_string('additionalhtmlfooter', 'admin'), new lang_string('additionalhtmlfooter_desc', 'admin'), '', PARAM_RAW));
$ADMIN->add('appearance', $temp);
}
// end of speedup
示例8: admin_settingpage
$temp = new admin_settingpage('cleanup', new lang_string('cleanup', 'admin'));
$temp->add(new admin_setting_configselect('deleteunconfirmed', new lang_string('deleteunconfirmed', 'admin'), new lang_string('configdeleteunconfirmed', 'admin'), 168, array(0 => new lang_string('never'), 168 => new lang_string('numdays', '', 7), 144 => new lang_string('numdays', '', 6), 120 => new lang_string('numdays', '', 5), 96 => new lang_string('numdays', '', 4), 72 => new lang_string('numdays', '', 3), 48 => new lang_string('numdays', '', 2), 24 => new lang_string('numdays', '', 1), 12 => new lang_string('numhours', '', 12), 6 => new lang_string('numhours', '', 6), 1 => new lang_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('deleteincompleteusers', new lang_string('deleteincompleteusers', 'admin'), new lang_string('configdeleteincompleteusers', 'admin'), 0, array(0 => new lang_string('never'), 168 => new lang_string('numdays', '', 7), 144 => new lang_string('numdays', '', 6), 120 => new lang_string('numdays', '', 5), 96 => new lang_string('numdays', '', 4), 72 => new lang_string('numdays', '', 3), 48 => new lang_string('numdays', '', 2), 24 => new lang_string('numdays', '', 1))));
$temp->add(new admin_setting_configcheckbox('logguests', new lang_string('logguests', 'admin'), new lang_string('logguests_help', 'admin'), 1));
$temp->add(new admin_setting_configselect('loglifetime', new lang_string('loglifetime', 'admin'), new lang_string('configloglifetime', 'admin'), 0, array(0 => new lang_string('neverdeletelogs'), 1000 => new lang_string('numdays', '', 1000), 365 => new lang_string('numdays', '', 365), 180 => new lang_string('numdays', '', 180), 150 => new lang_string('numdays', '', 150), 120 => new lang_string('numdays', '', 120), 90 => new lang_string('numdays', '', 90), 60 => new lang_string('numdays', '', 60), 35 => new lang_string('numdays', '', 35), 10 => new lang_string('numdays', '', 10), 5 => new lang_string('numdays', '', 5), 2 => new lang_string('numdays', '', 2))));
$temp->add(new admin_setting_configcheckbox('disablegradehistory', new lang_string('disablegradehistory', 'grades'), new lang_string('disablegradehistory_help', 'grades'), 0));
$temp->add(new admin_setting_configselect('gradehistorylifetime', new lang_string('gradehistorylifetime', 'grades'), new lang_string('gradehistorylifetime_help', 'grades'), 0, array(0 => new lang_string('neverdeletehistory', 'grades'), 1000 => new lang_string('numdays', '', 1000), 365 => new lang_string('numdays', '', 365), 180 => new lang_string('numdays', '', 180), 150 => new lang_string('numdays', '', 150), 120 => new lang_string('numdays', '', 120), 90 => new lang_string('numdays', '', 90), 60 => new lang_string('numdays', '', 60), 30 => new lang_string('numdays', '', 30))));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('environment', new lang_string('environment', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/environment.php"));
$ADMIN->add('server', new admin_externalpage('phpinfo', new lang_string('phpinfo'), "{$CFG->wwwroot}/{$CFG->admin}/phpinfo.php"));
// "performance" settingpage
$temp = new admin_settingpage('performance', new lang_string('performance', 'admin'));
$temp->add(new admin_setting_configtext('numcoursesincombo', new lang_string('numcoursesincombo', 'admin'), new lang_string('numcoursesincombo_help', 'admin'), 500));
$temp->add(new admin_setting_configselect('extramemorylimit', new lang_string('extramemorylimit', 'admin'), new lang_string('configextramemorylimit', 'admin'), '512M', array('64M' => '64M', '128M' => '128M', '256M' => '256M', '512M' => '512M', '1024M' => '1024M')));
$temp->add(new admin_setting_configtext('curlcache', new lang_string('curlcache', 'admin'), new lang_string('configcurlcache', 'admin'), 120, PARAM_INT));
$temp->add(new admin_setting_configtext('curltimeoutkbitrate', new lang_string('curltimeoutkbitrate', 'admin'), new lang_string('curltimeoutkbitrate_help', 'admin'), 56, PARAM_INT));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('adminregistration', new lang_string('hubs', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/registration/index.php"));
// "update notifications" settingpage
if (empty($CFG->disableupdatenotifications)) {
$temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
$temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'), new lang_string('updateautocheck_desc', 'core_admin'), 1));
if (empty($CFG->disableupdateautodeploy)) {
$temp->add(new admin_setting_configcheckbox('updateautodeploy', new lang_string('updateautodeploy', 'core_admin'), new lang_string('updateautodeploy_desc', 'core_admin'), 0));
}
$temp->add(new admin_setting_configselect('updateminmaturity', new lang_string('updateminmaturity', 'core_admin'), new lang_string('updateminmaturity_desc', 'core_admin'), MATURITY_STABLE, array(MATURITY_ALPHA => new lang_string('maturity' . MATURITY_ALPHA, 'core_admin'), MATURITY_BETA => new lang_string('maturity' . MATURITY_BETA, 'core_admin'), MATURITY_RC => new lang_string('maturity' . MATURITY_RC, 'core_admin'), MATURITY_STABLE => new lang_string('maturity' . MATURITY_STABLE, 'core_admin'))));
$temp->add(new admin_setting_configcheckbox('updatenotifybuilds', new lang_string('updatenotifybuilds', 'core_admin'), new lang_string('updatenotifybuilds_desc', 'core_admin'), 0));
$ADMIN->add('server', $temp);
}
}
// end of speedup
示例9: textlib_get_instance
if ($strreportname[0] == '[') {
$textlib = textlib_get_instance();
$strreportname = $textlib->strtotitle($report . ' report');
}
$reportsbyname[$strreportname] = $report;
}
}
ksort($reportsbyname);
}
// Create the organizer settings page.
if (empty($reportsbyname)) {
$pagetitle = get_string('modulename', 'organizer');
} else {
$pagetitle = get_string('generalsettings', 'admin');
}
$organizersettings = new admin_settingpage('modsettingorganizer', $pagetitle, 'moodle/site:config');
// Introductory explanation that all the settings are defaults for the add quiz form.
$organizersettings->add(new admin_setting_heading('organizerintro', '', get_string('configintro', 'organizer')));
// Set modintro required (default) or optional
$organizersettings->add(new admin_setting_configcheckbox('organizer/requiremodintro', get_string('requiremodintro', 'organizer'), get_string('configrequiremodintro', 'organizer'), 1));
// Maximum grade
$organizersettings->add(new admin_setting_configtext('organizer/maximumgrade', get_string('maximumgrade'), get_string('configmaximumgrade', 'organizer'), 10, PARAM_INT));
// E-mail teachers
$pickeroptions = array();
$pickeroptions[ORGANIZER_MESSAGES_NONE] = get_string('messages_none', 'organizer');
$pickeroptions[ORGANIZER_MESSAGES_RE_UNREG] = get_string('messages_re_unreg', 'organizer');
$pickeroptions[ORGANIZER_MESSAGES_ALL] = get_string('messages_all', 'organizer');
// Appointment digest
$organizersettings->add(new admin_setting_configselect('organizer/emailteachers', get_string('configemailteachers_label', 'organizer'), get_string('configemailteachers', 'organizer'), 1, $pickeroptions));
$pickeroptions = array();
$pickeroptions['never'] = get_string('configdontsend', 'organizer');
示例10: admin_settingpage
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses', 'all' => 'All courses', 'requested' => 'Requested courses')));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!($options = get_records("modules"))) {
$options = array();
}
$options2 = array();
foreach ($options as $option) {
$options2[$option->id] = $option->name;
}
$temp->add(new admin_setting_configmultiselect('defaultallowedmodules', get_string('defaultallowedmodules', 'admin'), get_string('configdefaultallowedmodules', 'admin'), array(), $options2));
$ADMIN->add('security', $temp);
// "notifications" settingpage
$temp = new admin_settingpage('notifications', get_string('notifications', 'admin'));
$temp->add(new admin_setting_configselect('displayloginfailures', get_string('displayloginfailures', 'admin'), get_string('configdisplayloginfailures', 'admin'), '', array('' => get_string('nobody'), 'admin' => get_string('administrators'), 'teacher' => get_string('administratorsandteachers'), 'everybody' => get_string('everybody'))));
$temp->add(new admin_setting_configselect('notifyloginfailures', get_string('notifyloginfailures', 'admin'), get_string('confignotifyloginfailures', 'admin'), '', array('' => get_string('nobody'), 'mainadmin' => get_string('administrator'), 'alladmins' => get_string('administratorsall'))));
$options = array();
for ($i = 1; $i <= 100; $i++) {
$options[$i] = $i;
}
$temp->add(new admin_setting_configselect('notifyloginthreshold', get_string('notifyloginthreshold', 'admin'), get_string('confignotifyloginthreshold', 'admin'), '10', $options));
$ADMIN->add('security', $temp);
// "antivirus" settingpage
$temp = new admin_settingpage('antivirus', get_string('antivirus', 'admin'));
$temp->add(new admin_setting_configcheckbox('runclamonupload', get_string('runclamavonupload', 'admin'), get_string('configrunclamavonupload', 'admin'), 0));
$temp->add(new admin_setting_configexecutable('pathtoclam', get_string('pathtoclam', 'admin'), get_string('configpathtoclam', 'admin'), ''));
$temp->add(new admin_setting_configdirectory('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), ''));
$temp->add(new admin_setting_configselect('clamfailureonupload', get_string('clamfailureonupload', 'admin'), get_string('configclamfailureonupload', 'admin'), 'donothing', array('donothing' => get_string('configclamdonothing', 'admin'), 'actlikevirus' => get_string('configclamactlikevirus', 'admin'))));
$ADMIN->add('security', $temp);
}
// end of speedup
示例11: 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* An activity to interface with WebEx.
*
* @package mod_webexactvity
* @author Eric Merrill <merrill@oakland.edu>
* @copyright 2014 Oakland University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
// Create a settings page object to add to.
$settings = new admin_settingpage($section, get_string('settings', 'mod_webexactivity'), 'moodle/site:config', $module->is_enabled() === false);
// Build up the full settings page if we need it.
if ($ADMIN->fulltree) {
// ---------------------------------------------------
// API Settings.
// ---------------------------------------------------
$settings->add(new admin_setting_heading('apisettings', get_string('apisettings', 'mod_webexactivity'), ''));
$settings->add(new admin_setting_configtext('webexactivity/sitename', get_string('sitename', 'mod_webexactivity'), get_string('sitename_help', 'mod_webexactivity'), ''));
$settings->add(new admin_setting_configtext('webexactivity/apiusername', get_string('apiusername', 'mod_webexactivity'), get_string('apiusername_help', 'mod_webexactivity'), ''));
$settings->add(new admin_setting_configpasswordunmask('webexactivity/apipassword', get_string('apipassword', 'mod_webexactivity'), get_string('apipassword_help', 'mod_webexactivity'), ''));
$settings->add(new admin_setting_configtext('webexactivity/prefix', get_string('prefix', 'mod_webexactivity'), get_string('prefix_help', 'mod_webexactivity'), 'mdl_'));
// ---------------------------------------------------
// Meeting Types.
// ---------------------------------------------------
$settings->add(new admin_setting_heading('meetingtypes', get_string('meetingtypes', 'mod_webexactivity'), get_string('meetingtypes_desc', 'mod_webexactivity')));
$typeopts = array(\mod_webexactivity\webex::WEBEXACTIVITY_TYPE_INSTALLED => get_string('typeinstalled', 'mod_webexactivity'), \mod_webexactivity\webex::WEBEXACTIVITY_TYPE_ALL => get_string('typeforall', 'mod_webexactivity'), \mod_webexactivity\webex::WEBEXACTIVITY_TYPE_PASSWORD_REQUIRED => get_string('typepwreq', 'mod_webexactivity'));
示例12: defined
*/
defined('MOODLE_INTERNAL') || die;
if ($hassiteconfig) {
$ADMIN->add('root', new admin_category('mobileapp', new lang_string('mobileapp', 'tool_mobile')), 'development');
$temp = new admin_settingpage('mobilesettings', new lang_string('mobilesettings', 'tool_mobile'), 'moodle/site:config', false);
// We should wait to the installation to finish since we depend on some configuration values that are set once
// the admin user profile is configured.
if (!during_initial_install()) {
$enablemobiledocurl = new moodle_url(get_docs_url('Enable_mobile_web_services'));
$enablemobiledoclink = html_writer::link($enablemobiledocurl, new lang_string('documentation'));
$default = is_https() ? 1 : 0;
$temp->add(new admin_setting_enablemobileservice('enablemobilewebservice', new lang_string('enablemobilewebservice', 'admin'), new lang_string('configenablemobilewebservice', 'admin', $enablemobiledoclink), $default));
}
$ADMIN->add('mobileapp', $temp);
// Show only mobile settings if the mobile service is enabled.
if (!empty($CFG->enablemobilewebservice)) {
// Type of login.
$temp = new admin_settingpage('mobileauthentication', new lang_string('mobileauthentication', 'tool_mobile'));
$options = array(tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'), tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'), tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'));
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin', new lang_string('typeoflogin', 'tool_mobile'), new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme', new lang_string('forcedurlscheme_key', 'tool_mobile'), new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
$ADMIN->add('mobileapp', $temp);
// Appearance related settings.
$temp = new admin_settingpage('mobileappearance', new lang_string('mobileappearance', 'tool_mobile'));
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'), new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners', new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners', new lang_string('enablesmartappbanners', 'tool_mobile'), new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'), new lang_string('iosappid_desc', 'tool_mobile'), '633359593', PARAM_ALPHANUM));
$ADMIN->add('mobileapp', $temp);
}
}
示例13: defined
// 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/>.
/**
* Inbound Message Settings.
*
* @package tool_messageinbound
* @copyright 2014 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
if ($hassiteconfig) {
$category = new admin_category('messageinbound', new lang_string('incomingmailconfiguration', 'tool_messageinbound'));
// Create a settings page for all of the mail server settings.
$settings = new admin_settingpage('messageinbound_mailsettings', new lang_string('mailsettings', 'tool_messageinbound'));
$settings->add(new admin_setting_heading('messageinbound_generalconfiguration', new lang_string('messageinboundgeneralconfiguration', 'tool_messageinbound'), new lang_string('messageinboundgeneralconfiguration_desc', 'tool_messageinbound'), ''));
$settings->add(new admin_setting_configcheckbox('messageinbound_enabled', new lang_string('messageinboundenabled', 'tool_messageinbound'), new lang_string('messageinboundenabled_desc', 'tool_messageinbound'), 0));
// These settings are used when generating a Inbound Message address.
$settings->add(new admin_setting_heading('messageinbound_mailboxconfiguration', new lang_string('mailboxconfiguration', 'tool_messageinbound'), new lang_string('messageinboundmailboxconfiguration_desc', 'tool_messageinbound'), ''));
$settings->add(new admin_setting_configtext('messageinbound_mailbox', new lang_string('mailbox', 'tool_messageinbound'), null, '', PARAM_RAW));
$settings->add(new admin_setting_configtext('messageinbound_domain', new lang_string('domain', 'tool_messageinbound'), null, '', PARAM_RAW));
// These settings are used when checking the incoming mailbox for mail.
$settings->add(new admin_setting_heading('messageinbound_serversettings', new lang_string('incomingmailserversettings', 'tool_messageinbound'), new lang_string('incomingmailserversettings_desc', 'tool_messageinbound'), ''));
$settings->add(new admin_setting_configtext('messageinbound_host', new lang_string('messageinboundhost', 'tool_messageinbound'), new lang_string('configmessageinboundhost', 'tool_messageinbound'), '', PARAM_RAW));
$options = array('' => get_string('noencryption', 'tool_messageinbound'), 'ssl' => get_string('ssl', 'tool_messageinbound'), 'sslv2' => get_string('sslv2', 'tool_messageinbound'), 'sslv3' => get_string('sslv3', 'tool_messageinbound'), 'tls' => get_string('tls', 'tool_messageinbound'), 'tlsv1' => get_string('tlsv1', 'tool_messageinbound'));
$settings->add(new admin_setting_configselect('messageinbound_hostssl', new lang_string('messageinboundhostssl', 'tool_messageinbound'), new lang_string('messageinboundhostssl_desc', 'tool_messageinbound'), 'ssl', $options));
$settings->add(new admin_setting_configtext('messageinbound_hostuser', new lang_string('messageinboundhostuser', 'tool_messageinbound'), new lang_string('messageinboundhostuser_desc', 'tool_messageinbound'), '', PARAM_NOTAGS));
$settings->add(new admin_setting_configpasswordunmask('messageinbound_hostpass', new lang_string('messageinboundhostpass', 'tool_messageinbound'), new lang_string('messageinboundhostpass_desc', 'tool_messageinbound'), ''));
$category->add('messageinbound', $settings);
// Link to the external page for Inbound Message handler configuration.
示例14: set_adminsettings
/**
* setup administrator links and settings
*
* @param object $admin
*/
public static function set_adminsettings($admin)
{
$me = new self();
$me->grab_moodle_globals();
$context = context_course::instance(SITEID);
$admin->add('localplugins', new admin_category('globalmessage', $me->get_string('globalmessage')));
$admin->add('globalmessage', new admin_externalpage('globalmessagemanage', $me->get_string('globalmessagemanage'), $me->get_config('wwwroot') . '/local/globalmessage/index.php?id=' . SITEID, 'moodle/site:config', false, $context));
$admin->add('globalmessage', new admin_externalpage('globalmessageabout', $me->get_string('globalmessageabout'), $me->get_config('wwwroot') . '/local/globalmessage/index.php?action=about&id=' . SITEID, 'moodle/site:config', false, $context));
$temp = new admin_settingpage('globalmessagesettings', $me->get_string('globalmessagesettings'));
$temp->add(new admin_setting_configcheckbox('globalmessageenable', $me->get_string_fromcore('enable'), $me->get_string('globalmessageenabledesc'), 1));
$temp->add(new admin_setting_configcheckbox('globalmessagedisableforadminrole', $me->get_string('disableforadminrole'), $me->get_string('disableforadminroledesc'), 0));
$temp->add(new admin_setting_configcheckbox('globalmessagedisableforadminpage', $me->get_string('disableforadminpage'), $me->get_string('disableforadminpagedesc'), 0));
$admin->add('globalmessage', $temp);
}
示例15: defined
* 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://opensource.org/licenses/gpl-3.0.html.
*
* @copyright Copyright (c) 2009 Moodlerooms Inc. (http://www.moodlerooms.com)
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
* @package local_mr
* @author Mark Nielsen
*/
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
if (defined('MR_CACHE_TEST') or defined('MR_DOCS')) {
$ADMIN->add('root', new admin_category('local_mr', get_string('mrframework', 'local_mr')));
}
if (defined('MR_CACHE_TEST')) {
$lifetimes = array(0 => get_string('never'), MINSECS * 10 => get_string('xminutes', 'local_mr', 10), MINSECS * 30 => get_string('xminutes', 'local_mr', 30), HOURSECS => get_string('xhours', 'local_mr', 1), HOURSECS * 4 => get_string('xhours', 'local_mr', 4), HOURSECS * 12 => get_string('xhours', 'local_mr', 12), DAYSECS => get_string('xdays', 'local_mr', 1), WEEKSECS => get_string('xweeks', 'local_mr', 1), WEEKSECS * 4 => get_string('xweeks', 'local_mr', 4));
$settings = array();
$settings[] = new admin_setting_heading('cache_heading', get_string('cache_heading', 'local_mr'), get_string('cache_headingdesc', 'local_mr', $CFG->wwwroot . '/local/mr/view.php?action=cleancache'));
$settings[] = new admin_setting_configselect('cache_lifetime', get_string('cache_lifetime', 'local_mr'), get_string('cache_lifetimedesc', 'local_mr'), 0, $lifetimes);
// Define the config plugin so it is saved to
// the config_plugin table then add to the settings page
$page = new admin_settingpage('local_mr_cache', get_string('mrcache', 'local_mr'));
foreach ($settings as $setting) {
$setting->plugin = 'local/mr';
$page->add($setting);
}
$ADMIN->add('local_mr', $page);
}
if (defined('MR_DOCS')) {
$ADMIN->add('local_mr', new admin_externalpage('local_mr_docs', get_string('local_mr_docs', 'local_mr'), "{$CFG->wwwroot}/local/mr/view.php?action=docs"));
}