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 collapsed text.
|
|
|
19 |
*
|
|
|
20 |
* @package unilabeltype_collapsedtext
|
|
|
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_collapsedtext', get_string('pluginname', 'unilabeltype_collapsedtext'));
|
|
|
28 |
|
|
|
29 |
$collapsedtextsettings = [];
|
|
|
30 |
|
|
|
31 |
$collapsedtextsettings[] = new admin_setting_configcheckbox('unilabeltype_collapsedtext/active',
|
|
|
32 |
get_string('active'),
|
|
|
33 |
'',
|
|
|
34 |
true);
|
|
|
35 |
|
|
|
36 |
$collapsedtextsettings[] = new admin_setting_configcheckbox(
|
|
|
37 |
'unilabeltype_collapsedtext/useanimation',
|
|
|
38 |
get_string('useanimation', 'unilabeltype_collapsedtext'),
|
|
|
39 |
'',
|
|
|
40 |
1
|
|
|
41 |
);
|
|
|
42 |
|
|
|
43 |
$select = [
|
|
|
44 |
'collapsed' => get_string('collapsed', 'unilabeltype_collapsedtext'),
|
|
|
45 |
'dialog' => get_string('dialog', 'unilabeltype_collapsedtext'),
|
|
|
46 |
];
|
|
|
47 |
$collapsedtextsettings[] = new admin_setting_configselect(
|
|
|
48 |
'unilabeltype_collapsedtext/presentation',
|
|
|
49 |
get_string('default_presentation', 'unilabeltype_collapsedtext'),
|
|
|
50 |
'',
|
|
|
51 |
'collapsed',
|
|
|
52 |
$select
|
|
|
53 |
);
|
|
|
54 |
|
|
|
55 |
foreach ($collapsedtextsettings as $setting) {
|
|
|
56 |
$page->add($setting);
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
$settingscategory->add($page);
|