MDL-49006 admin: activity descriptions shouldn't be required by default
[moodle.git] / mod / url / settings.php
CommitLineData
58a27a74 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 * Url module admin settings and defaults
20 *
11e41f1a 21 * @package mod_url
2b641d15
PS
22 * @copyright 2009 Petr Skoda {@link http://skodak.org}
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
58a27a74 24 */
25
dbf9e4ba
PS
26defined('MOODLE_INTERNAL') || die;
27
58a27a74 28if ($ADMIN->fulltree) {
29 require_once("$CFG->libdir/resourcelib.php");
30
31 $displayoptions = resourcelib_get_displayoptions(array(RESOURCELIB_DISPLAY_AUTO,
32 RESOURCELIB_DISPLAY_EMBED,
33 RESOURCELIB_DISPLAY_FRAME,
34 RESOURCELIB_DISPLAY_OPEN,
35 RESOURCELIB_DISPLAY_NEW,
36 RESOURCELIB_DISPLAY_POPUP,
37 ));
38 $defaultdisplayoptions = array(RESOURCELIB_DISPLAY_AUTO,
39 RESOURCELIB_DISPLAY_EMBED,
40 RESOURCELIB_DISPLAY_OPEN,
41 RESOURCELIB_DISPLAY_POPUP,
42 );
43
44 //--- general settings -----------------------------------------------------------------------------------
45 $settings->add(new admin_setting_configtext('url/framesize',
46 get_string('framesize', 'url'), get_string('configframesize', 'url'), 130, PARAM_INT));
47 $settings->add(new admin_setting_configcheckbox('url/requiremodintro',
a6099a7a 48 get_string('requiremodintro', 'admin'), get_string('configrequiremodintro', 'admin'), 0));
2884fd8e 49 $settings->add(new admin_setting_configpasswordunmask('url/secretphrase', get_string('password'),
58a27a74 50 get_string('configsecretphrase', 'url'), ''));
51 $settings->add(new admin_setting_configcheckbox('url/rolesinparams',
52 get_string('rolesinparams', 'url'), get_string('configrolesinparams', 'url'), false));
53 $settings->add(new admin_setting_configmultiselect('url/displayoptions',
54 get_string('displayoptions', 'url'), get_string('configdisplayoptions', 'url'),
55 $defaultdisplayoptions, $displayoptions));
56
57 //--- modedit defaults -----------------------------------------------------------------------------------
58 $settings->add(new admin_setting_heading('urlmodeditdefaults', get_string('modeditdefaults', 'admin'), get_string('condifmodeditdefaults', 'admin')));
59
b0b79f8a
FM
60 $settings->add(new admin_setting_configcheckbox('url/printintro',
61 get_string('printintro', 'url'), get_string('printintroexplain', 'url'), 1));
62 $settings->add(new admin_setting_configselect('url/display',
63 get_string('displayselect', 'url'), get_string('displayselectexplain', 'url'), RESOURCELIB_DISPLAY_AUTO, $displayoptions));
64 $settings->add(new admin_setting_configtext('url/popupwidth',
65 get_string('popupwidth', 'url'), get_string('popupwidthexplain', 'url'), 620, PARAM_INT, 7));
66 $settings->add(new admin_setting_configtext('url/popupheight',
67 get_string('popupheight', 'url'), get_string('popupheightexplain', 'url'), 450, PARAM_INT, 7));
58a27a74 68}