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 carousel.
19
 *
20
 * @package     unilabeltype_carousel
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_carousel', get_string('pluginname', 'unilabeltype_carousel'));
28
 
29
$carouselsettings = [];
30
 
31
$carouselsettings[] = new admin_setting_configcheckbox('unilabeltype_carousel/active',
32
    get_string('active'),
33
    '',
34
    true);
35
 
36
$carouselsettings[] = new admin_setting_configcheckbox('unilabeltype_carousel/autorun',
37
    get_string('autorun', 'mod_unilabel'),
38
    '',
39
    true
40
);
41
 
42
$numbers            = array_combine(range(1, 10), range(1, 10));
43
$carouselsettings[] = new admin_setting_configselect('unilabeltype_carousel/carouselinterval',
44
    get_string('default_carouselinterval', 'unilabeltype_carousel'),
45
    '',
46
    5,
47
    $numbers
48
);
49
 
50
$numbers            = array_combine(range(100, 600, 50), range(100, 600, 50));
51
$numbers            = [0 => get_string('autoheight', 'unilabeltype_carousel')] + $numbers;
52
$carouselsettings[] = new admin_setting_configselect('unilabeltype_carousel/height',
53
    get_string('default_height', 'unilabeltype_carousel'),
54
    get_string('height_help', 'unilabeltype_carousel'),
55
    300,
56
    $numbers
57
);
58
 
59
$carouselsettings[] = new admin_setting_configcheckbox('unilabeltype_carousel/showintro',
60
    get_string('default_showintro', 'unilabeltype_carousel'),
61
    '',
62
    false
63
);
64
 
65
$carouselsettings[] = new admin_setting_configcheckbox('unilabeltype_carousel/usemobile',
66
    get_string('default_usemobile', 'unilabeltype_carousel'),
67
    '',
68
    true
69
);
70
 
71
$carouselsettings[] = new \mod_unilabel\setting_configselect_button('unilabeltype_carousel/custombutton',
72
    get_string('custombutton', 'unilabeltype_carousel'),
73
    '',
74
 
75
);
76
 
77
foreach ($carouselsettings as $setting) {
78
    $page->add($setting);
79
}
80
 
81
$settingscategory->add($page);