|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00003 // * Miscellaneous settings 00004 00005 if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page 00006 00007 // Experimental settings page 00008 $ADMIN->add('development', new admin_category('experimental', get_string('experimental','admin'))); 00009 00010 $temp = new admin_settingpage('experimentalsettings', get_string('experimentalsettings', 'admin')); 00011 //TODO: Re-enable cc-import once re-implemented in 2.0.x 00012 //$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0)); 00013 $temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0)); 00014 $temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', get_string('enablegroupmembersonly', 'admin'), get_string('configenablegroupmembersonly', 'admin'), 0)); 00015 00016 $ADMIN->add('experimental', $temp); 00017 00018 // "debugging" settingpage 00019 $temp = new admin_settingpage('debugging', get_string('debugging', 'admin')); 00020 $temp->add(new admin_setting_special_debug()); 00021 $temp->add(new admin_setting_configcheckbox('debugdisplay', get_string('debugdisplay', 'admin'), get_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors'))); 00022 $temp->add(new admin_setting_configcheckbox('xmlstrictheaders', get_string('xmlstrictheaders', 'admin'), get_string('configxmlstrictheaders', 'admin'), 0)); 00023 $temp->add(new admin_setting_configcheckbox('debugsmtp', get_string('debugsmtp', 'admin'), get_string('configdebugsmtp', 'admin'), 0)); 00024 $temp->add(new admin_setting_configcheckbox('perfdebug', get_string('perfdebug', 'admin'), get_string('configperfdebug', 'admin'), '7', '15', '7')); 00025 $temp->add(new admin_setting_configcheckbox('debugstringids', get_string('debugstringids', 'admin'), get_string('debugstringids_desc', 'admin'), 0)); 00026 $temp->add(new admin_setting_configcheckbox('debugvalidators', get_string('debugvalidators', 'admin'), get_string('configdebugvalidators', 'admin'), 0)); 00027 $temp->add(new admin_setting_configcheckbox('debugpageinfo', get_string('debugpageinfo', 'admin'), get_string('configdebugpageinfo', 'admin'), 0)); 00028 $ADMIN->add('development', $temp); 00029 00030 // "profiling" settingpage (conditionally if the 'xhprof' extension is available only) 00031 if (extension_loaded('xhprof') && function_exists('xhprof_enable')) { 00032 $temp = new admin_settingpage('profiling', get_string('profiling', 'admin')); 00033 // Main profiling switch 00034 $temp->add(new admin_setting_configcheckbox('profilingenabled', get_string('profilingenabled', 'admin'), get_string('profilingenabled_help', 'admin'), false)); 00035 // List of URLs that will be automatically profiled 00036 $temp->add(new admin_setting_configtextarea('profilingincluded', get_string('profilingincluded', 'admin'), get_string('profilingincluded_help', 'admin'), '')); 00037 // List of URLs that won't be profiled ever 00038 $temp->add(new admin_setting_configtextarea('profilingexcluded', get_string('profilingexcluded', 'admin'), get_string('profilingexcluded_help', 'admin'), '')); 00039 // Allow random profiling each XX requests 00040 $temp->add(new admin_setting_configtext('profilingautofrec', get_string('profilingautofrec', 'admin'), get_string('profilingautofrec_help', 'admin'), 0, PARAM_INT)); 00041 // Allow PROFILEME/DONTPROFILEME GPC 00042 $temp->add(new admin_setting_configcheckbox('profilingallowme', get_string('profilingallowme', 'admin'), get_string('profilingallowme_help', 'admin'), false)); 00043 // Allow PROFILEALL/PROFILEALLSTOP GPC 00044 $temp->add(new admin_setting_configcheckbox('profilingallowall', get_string('profilingallowall', 'admin'), get_string('profilingallowall_help', 'admin'), false)); 00045 // TODO: Allow to skip PHP functions (XHPROF_FLAGS_NO_BUILTINS) 00046 // TODO: Allow to skip call_user functions (ignored_functions array) 00047 // Specify the life time (in minutes) of profiling runs 00048 $temp->add(new admin_setting_configselect('profilinglifetime', get_string('profilinglifetime', 'admin'), get_string('profilinglifetime_help', 'admin'), 24*60, array( 00049 0 => get_string('neverdeleteruns', 'admin'), 00050 30*24*60 => get_string('numdays', '', 30), 00051 15*24*60 => get_string('numdays', '', 15), 00052 7*24*60 => get_string('numdays', '', 7), 00053 4*24*60 => get_string('numdays', '', 4), 00054 2*24*60 => get_string('numdays', '', 2), 00055 24*60 => get_string('numhours', '', 24), 00056 16*80 => get_string('numhours', '', 16), 00057 8*60 => get_string('numhours', '', 8), 00058 4*60 => get_string('numhours', '', 4), 00059 2*60 => get_string('numhours', '', 2), 00060 60 => get_string('numminutes', '', 60), 00061 30 => get_string('numminutes', '', 30), 00062 15 => get_string('numminutes', '', 15)))); 00063 00064 // Add the 'profiling' page to admin block 00065 $ADMIN->add('development', $temp); 00066 } 00067 00068 00069 // Web service test clients DO NOT COMMIT : THE EXTERNAL WEB PAGE IS NOT AN ADMIN PAGE !!!!! 00070 $ADMIN->add('development', new admin_externalpage('testclient', get_string('testclient', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/testclient.php")); 00071 00072 00073 if ($CFG->mnet_dispatcher_mode !== 'off') { 00074 $ADMIN->add('development', new admin_externalpage('mnettestclient', get_string('testclient', 'mnet'), "$CFG->wwwroot/$CFG->admin/mnet/testclient.php")); 00075 } 00076 00077 $ADMIN->add('development', new admin_externalpage('purgecaches', get_string('purgecaches','admin'), "$CFG->wwwroot/$CFG->admin/purgecaches.php")); 00078 } // end of speedup