Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * unilabel type grid.
19
 *
20
 * @package     unilabeltype_grid
21
 * @author      Andreas Grabs <info@grabs-edv.de>
22
 * @copyright   2018 onwards Grabs EDV {@link https://www.grabs-edv.de}
23
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 */
25
defined('MOODLE_INTERNAL') || die;
26
 
27
$page = new admin_settingpage('unilabeltype_grid', get_string('pluginname', 'unilabeltype_grid'));
28
 
29
$gridsettings = [];
30
 
31
$gridsettings[] = new admin_setting_configcheckbox('unilabeltype_grid/active',
32
    get_string('active'),
33
    '',
34
    true);
35
 
36
$numbers        = array_combine(range(1, 6), range(1, 6));
37
$gridsettings[] = new admin_setting_configselect('unilabeltype_grid/columns',
38
    get_string('default_columns', 'unilabeltype_grid'),
39
    '',
40
    4,
41
    $numbers
42
);
43
 
44
$numbers        = array_combine(range(100, 600, 50), range(100, 600, 50));
45
$numbers        = [0 => get_string('autoheight', 'unilabeltype_grid')] + $numbers;
46
$gridsettings[] = new admin_setting_configselect('unilabeltype_grid/height',
47
    get_string('default_height', 'unilabeltype_grid'),
48
    get_string('height_help', 'unilabeltype_grid'),
49
    300,
50
    $numbers
51
);
52
 
53
$gridsettings[] = new admin_setting_configcheckbox('unilabeltype_grid/showintro',
54
    get_string('default_showintro', 'unilabeltype_grid'),
55
    '',
56
    false
57
);
58
 
59
$gridsettings[] = new admin_setting_configcheckbox('unilabeltype_grid/usemobile',
60
    get_string('default_usemobile', 'unilabeltype_grid'),
61
    '',
62
    true
63
);
64
 
65
foreach ($gridsettings as $setting) {
66
    $page->add($setting);
67
}
68
 
69
$settingscategory->add($page);