Merge branch 'MDL-61033-master' of https://github.com/nashtechdev01/moodle
[moodle.git] / mod / page / settings.php
CommitLineData
1ad9ff57 1<?php
2
3// This file is part of Moodle - http://moodle.org/
4//
5// Moodle is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// Moodle is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17
18/**
19 * Page module admin settings and defaults
20 *
96930d5b 21 * @package mod_page
2c49daf7
PS
22 * @copyright 2009 Petr Skoda (http://skodak.org)
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
1ad9ff57 24 */
25
dbf9e4ba
PS
26defined('MOODLE_INTERNAL') || die;
27
1ad9ff57 28if ($ADMIN->fulltree) {
29 require_once("$CFG->libdir/resourcelib.php");
30
31 $displayoptions = resourcelib_get_displayoptions(array(RESOURCELIB_DISPLAY_OPEN, RESOURCELIB_DISPLAY_POPUP));
32 $defaultdisplayoptions = array(RESOURCELIB_DISPLAY_OPEN);
33
34 //--- general settings -----------------------------------------------------------------------------------
1ad9ff57 35 $settings->add(new admin_setting_configmultiselect('page/displayoptions',
36 get_string('displayoptions', 'page'), get_string('configdisplayoptions', 'page'),
37 $defaultdisplayoptions, $displayoptions));
38
39 //--- modedit defaults -----------------------------------------------------------------------------------
40 $settings->add(new admin_setting_heading('pagemodeditdefaults', get_string('modeditdefaults', 'admin'), get_string('condifmodeditdefaults', 'admin')));
41
846ffe60
JC
42 $settings->add(new admin_setting_configcheckbox('page/printheading',
43 get_string('printheading', 'page'), get_string('printheadingexplain', 'page'), 1));
a59bbb6e
FM
44 $settings->add(new admin_setting_configcheckbox('page/printintro',
45 get_string('printintro', 'page'), get_string('printintroexplain', 'page'), 0));
46 $settings->add(new admin_setting_configselect('page/display',
47 get_string('displayselect', 'page'), get_string('displayselectexplain', 'page'), RESOURCELIB_DISPLAY_OPEN, $displayoptions));
48 $settings->add(new admin_setting_configtext('page/popupwidth',
49 get_string('popupwidth', 'page'), get_string('popupwidthexplain', 'page'), 620, PARAM_INT, 7));
50 $settings->add(new admin_setting_configtext('page/popupheight',
51 get_string('popupheight', 'page'), get_string('popupheightexplain', 'page'), 450, PARAM_INT, 7));
1ad9ff57 52}