|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00003 // This file is part of Moodle - http://moodle.org/ 00004 // 00005 // Moodle is free software: you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation, either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // Moodle is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 00017 00027 defined('MOODLE_INTERNAL') || die; 00028 00029 if ($ADMIN->fulltree) { 00030 require_once("$CFG->libdir/resourcelib.php"); 00031 00032 $displayoptions = resourcelib_get_displayoptions(array(RESOURCELIB_DISPLAY_AUTO, 00033 RESOURCELIB_DISPLAY_EMBED, 00034 RESOURCELIB_DISPLAY_FRAME, 00035 RESOURCELIB_DISPLAY_OPEN, 00036 RESOURCELIB_DISPLAY_NEW, 00037 RESOURCELIB_DISPLAY_POPUP, 00038 )); 00039 $defaultdisplayoptions = array(RESOURCELIB_DISPLAY_AUTO, 00040 RESOURCELIB_DISPLAY_EMBED, 00041 RESOURCELIB_DISPLAY_OPEN, 00042 RESOURCELIB_DISPLAY_POPUP, 00043 ); 00044 00045 //--- general settings ----------------------------------------------------------------------------------- 00046 $settings->add(new admin_setting_configtext('url/framesize', 00047 get_string('framesize', 'url'), get_string('configframesize', 'url'), 130, PARAM_INT)); 00048 $settings->add(new admin_setting_configcheckbox('url/requiremodintro', 00049 get_string('requiremodintro', 'admin'), get_string('configrequiremodintro', 'admin'), 1)); 00050 $settings->add(new admin_setting_configpasswordunmask('url/secretphrase', get_string('password'), 00051 get_string('configsecretphrase', 'url'), '')); 00052 $settings->add(new admin_setting_configcheckbox('url/rolesinparams', 00053 get_string('rolesinparams', 'url'), get_string('configrolesinparams', 'url'), false)); 00054 $settings->add(new admin_setting_configmultiselect('url/displayoptions', 00055 get_string('displayoptions', 'url'), get_string('configdisplayoptions', 'url'), 00056 $defaultdisplayoptions, $displayoptions)); 00057 00058 //--- modedit defaults ----------------------------------------------------------------------------------- 00059 $settings->add(new admin_setting_heading('urlmodeditdefaults', get_string('modeditdefaults', 'admin'), get_string('condifmodeditdefaults', 'admin'))); 00060 00061 $settings->add(new admin_setting_configcheckbox_with_advanced('url/printheading', 00062 get_string('printheading', 'url'), get_string('printheadingexplain', 'url'), 00063 array('value'=>0, 'adv'=>false))); 00064 $settings->add(new admin_setting_configcheckbox_with_advanced('url/printintro', 00065 get_string('printintro', 'url'), get_string('printintroexplain', 'url'), 00066 array('value'=>1, 'adv'=>false))); 00067 $settings->add(new admin_setting_configselect_with_advanced('url/display', 00068 get_string('displayselect', 'url'), get_string('displayselectexplain', 'url'), 00069 array('value'=>RESOURCELIB_DISPLAY_AUTO, 'adv'=>false), $displayoptions)); 00070 $settings->add(new admin_setting_configtext_with_advanced('url/popupwidth', 00071 get_string('popupwidth', 'url'), get_string('popupwidthexplain', 'url'), 00072 array('value'=>620, 'adv'=>true), PARAM_INT, 7)); 00073 $settings->add(new admin_setting_configtext_with_advanced('url/popupheight', 00074 get_string('popupheight', 'url'), get_string('popupheightexplain', 'url'), 00075 array('value'=>450, 'adv'=>true), PARAM_INT, 7)); 00076 }