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 imageboard
19
 *
20
 * @package     unilabeltype_imageboard
21
 * @author      Andreas Schenkel
22
 * @copyright   Andreas Schenkel {@link https://github.com/andreasschenkel}
23
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 */
25
 
26
defined('MOODLE_INTERNAL') || die;
27
 
28
$page = new admin_settingpage('unilabeltype_imageboard', get_string('pluginname', 'unilabeltype_imageboard'));
29
 
30
$imageboardsettings = [];
31
 
32
$imageboardsettings[] = new admin_setting_configcheckbox('unilabeltype_imageboard/active',
33
    get_string('active'),
34
    '',
35
    true);
36
 
37
$numbers = array_combine(range(100, 1800, 50), range(100, 1800, 50));
38
$imageboardsettings[] = new admin_setting_configselect('unilabeltype_imageboard/default_canvaswidth',
39
    get_string('default_canvaswidth', 'unilabeltype_imageboard'),
40
    get_string('default_canvaswidth_help', 'unilabeltype_imageboard'),
41
    600,
42
    $numbers
43
);
44
 
45
$numbers = array_combine(range(100, 1800, 50), range(100, 1800, 50));
46
$imageboardsettings[] = new admin_setting_configselect('unilabeltype_imageboard/default_canvasheight',
47
    get_string('default_canvasheight', 'unilabeltype_imageboard'),
48
    get_string('default_canvasheight_help', 'unilabeltype_imageboard'),
49
    400,
50
    $numbers
51
);
52
 
53
 
54
$numbers = array_combine(range(0, 36, 1), range(0, 36, 1));
55
$imageboardsettings[] = new admin_setting_configselect('unilabeltype_imageboard/default_fontsize',
56
        get_string('default_fontsize', 'unilabeltype_imageboard'),
57
        get_string('default_fontsize_help', 'unilabeltype_imageboard'),
58
        12,
59
        $numbers
60
);
61
 
62
$imageboardsettings[] = new admin_setting_configcolourpicker('unilabeltype_imageboard/default_titlecolor',
63
        get_string('default_titlecolor', 'unilabeltype_imageboard'),
64
        get_string('default_titlecolor_desc', 'unilabeltype_imageboard')
65
        , '#fffffe');
66
 
67
$imageboardsettings[] = new admin_setting_configcolourpicker('unilabeltype_imageboard/default_titlebackgroundcolor',
68
        get_string('default_titlebackgroundcolor', 'unilabeltype_imageboard'),
69
        get_string('default_titlebackgroundcolor_desc', 'unilabeltype_imageboard')
70
        , '#110099');
71
 
72
$numbers = array_combine(range(0, 10, 1), range(0, 10, 1));
73
$imageboardsettings[] = new admin_setting_configselect('unilabeltype_imageboard/default_bordersize',
74
        get_string('default_bordersize', 'unilabeltype_imageboard'),
75
        get_string('default_bordersize_desc', 'unilabeltype_imageboard'),
76
        1,
77
        $numbers
78
);
79
 
80
$name = 'unilabeltype_imageboard/default_bordercolor';
81
$title = get_string('default_bordercolor', 'unilabeltype_imageboard');
82
$description = get_string('default_bordercolor_desc', 'unilabeltype_imageboard');
83
$imageboardsettings[] = new admin_setting_configcolourpicker($name, $title, $description, '#ff0000');
84
 
85
 
86
 
87
$name = 'unilabeltype_imageboard/default_gridcolor';
88
$title = get_string('default_gridcolor', 'unilabeltype_imageboard');
89
$description = get_string('default_gridcolor_desc', 'unilabeltype_imageboard');
90
$imageboardsettings[] = new admin_setting_configcolourpicker($name, $title, $description, '#0000ff');
91
 
92
 
93
 
94
$imageboardsettings[] = new admin_setting_configcheckbox('unilabeltype_imageboard/default_showintro',
95
    get_string('default_showintro', 'unilabeltype_imageboard'),
96
    '',
97
    false
98
);
99
 
100
foreach ($imageboardsettings as $setting) {
101
    $page->add($setting);
102
}
103
 
104
$settingscategory->add($page);