| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php //$Id: settings.php,v 1.1.2.3 2007/12/23 11:49:42 skodak Exp $ 2 3 require_once($CFG->dirroot.'/mod/resource/lib.php'); 4 5 global $RESOURCE_WINDOW_OPTIONS; // make sure we have the pesky global 6 7 $checkedyesno = array(''=>get_string('no'), 'checked'=>get_string('yes')); // not nice at all 8 9 $settings->add(new admin_setting_configtext('resource_framesize', get_string('framesize', 'resource'), 10 get_string('configframesize', 'resource'), 130, PARAM_INT)); 11 12 $settings->add(new admin_setting_configtext('resource_websearch', get_string('websearchdefault', 'resource'), 13 get_string('configwebsearch', 'resource'), 'http://google.com/')); 14 15 $settings->add(new admin_setting_configtext('resource_defaulturl', get_string('resourcedefaulturl', 'resource'), 16 get_string('configdefaulturl', 'resource'), 'http://')); 17 18 $settings->add(new admin_setting_configpasswordunmask('resource_secretphrase', get_string('password'), 19 get_string('configsecretphrase', 'resource'), random_string(20))); 20 21 $settings->add(new admin_setting_configcheckbox('resource_allowlocalfiles', get_string('allowlocalfiles', 'resource'), 22 get_string('configallowlocalfiles', 'resource'), 0)); 23 24 $woptions = array('' => get_string('pagewindow', 'resource'), 'checked' => get_string('newwindow', 'resource')); 25 $settings->add(new admin_setting_configselect('resource_popup', get_string('display', 'resource'), 26 get_string('configpopup', 'resource'), '', $woptions)); 27 28 foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) { 29 $popupoption = "resource_popup$optionname"; 30 if ($popupoption == 'resource_popupheight') { 31 $settings->add(new admin_setting_configtext('resource_popupheight', get_string('newheight', 'resource'), 32 get_string('configpopupheight', 'resource'), 450, PARAM_INT)); 33 } else if ($popupoption == 'resource_popupwidth') { 34 $settings->add(new admin_setting_configtext('resource_popupwidth', get_string('newwidth', 'resource'), 35 get_string('configpopupwidth', 'resource'), 620, PARAM_INT)); 36 } else { 37 $settings->add(new admin_setting_configselect($popupoption, get_string('new'.$optionname, 'resource'), 38 get_string('configpopup'.$optionname, 'resource'), 'checked', $checkedyesno)); 39 } 40 } 41 42 $settings->add(new admin_setting_configcheckbox('resource_autofilerename', get_string('autofilerename', 'resource'), 43 get_string('configautofilerenamesettings', 'resource'), 1)); 44 45 $settings->add(new admin_setting_configcheckbox('resource_blockdeletingfile', get_string('blockdeletingfile', 'resource'), 46 get_string('configblockdeletingfilesettings', 'resource'), 1)); 47 48 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |