|
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_OPEN, RESOURCELIB_DISPLAY_POPUP)); 00033 $defaultdisplayoptions = array(RESOURCELIB_DISPLAY_OPEN); 00034 00035 //--- general settings ----------------------------------------------------------------------------------- 00036 $settings->add(new admin_setting_configcheckbox('page/requiremodintro', 00037 get_string('requiremodintro', 'admin'), get_string('configrequiremodintro', 'admin'), 1)); 00038 $settings->add(new admin_setting_configmultiselect('page/displayoptions', 00039 get_string('displayoptions', 'page'), get_string('configdisplayoptions', 'page'), 00040 $defaultdisplayoptions, $displayoptions)); 00041 00042 //--- modedit defaults ----------------------------------------------------------------------------------- 00043 $settings->add(new admin_setting_heading('pagemodeditdefaults', get_string('modeditdefaults', 'admin'), get_string('condifmodeditdefaults', 'admin'))); 00044 00045 $settings->add(new admin_setting_configcheckbox_with_advanced('page/printheading', 00046 get_string('printheading', 'page'), get_string('printheadingexplain', 'page'), 00047 array('value'=>1, 'adv'=>false))); 00048 $settings->add(new admin_setting_configcheckbox_with_advanced('page/printintro', 00049 get_string('printintro', 'page'), get_string('printintroexplain', 'page'), 00050 array('value'=>0, 'adv'=>false))); 00051 $settings->add(new admin_setting_configselect_with_advanced('page/display', 00052 get_string('displayselect', 'page'), get_string('displayselectexplain', 'page'), 00053 array('value'=>RESOURCELIB_DISPLAY_OPEN, 'adv'=>true), $displayoptions)); 00054 $settings->add(new admin_setting_configtext_with_advanced('page/popupwidth', 00055 get_string('popupwidth', 'page'), get_string('popupwidthexplain', 'page'), 00056 array('value'=>620, 'adv'=>true), PARAM_INT, 7)); 00057 $settings->add(new admin_setting_configtext_with_advanced('page/popupheight', 00058 get_string('popupheight', 'page'), get_string('popupheightexplain', 'page'), 00059 array('value'=>450, 'adv'=>true), PARAM_INT, 7)); 00060 }