-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.php
111 lines (98 loc) · 3.76 KB
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* @package local_rollover_wizard
* @copyright 2024 Cosector Development <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
if ($hassiteconfig) {
global $CFG;
$ADMIN->add(
'modules',
new admin_category(
'rollover_wizard_settings',
new lang_string(
'setting_page:category',
'local_rollover_wizard'
)
)
);
$settings = new admin_settingpage('local_rollover_wizard', get_string('pluginname', 'local_rollover_wizard'));
$ADMIN->add('localplugins', $settings);
$element = new admin_setting_configcheckbox(
'local_rollover_wizard/enable_email_notification',
'Enable email notification',
'Tick this checkbox to enable email function to notify the author after the rollover completes.',
null
);
$settings->add($element);
$displaylist = \core_course_category::make_categories_list('moodle/course:create');
$element = new admin_setting_configselect_autocomplete(
'local_rollover_wizard/identifier_template_course',
'Identifier for template courses',
'',
0,
$displaylist
);
$settings->add($element);
$element = new admin_setting_configcheckbox(
'local_rollover_wizard/enable_cron_schedulling',
'Enable CRON Task schedulling',
get_string('cron_schedulling_description', 'local_rollover_wizard'),
null
);
$settings->add($element);
$element = new admin_setting_configcheckbox(
'local_rollover_wizard/update_internal_link',
get_string("config:enable_link", "local_rollover_wizard"),
get_string("config:enable_link:desc", "local_rollover_wizard"),
null
);
$settings->add($element);
$choices = [1 => "1 GB",
2 => "2 GB",
3 => "3 GB",
4 => "4 GB",
5 => "5 GB",
10 => "10 GB",
15 => "15 GB",
20 => "20 GB",
];
$element = new admin_setting_configselect('local_rollover_wizard/cron_size_threshold', 'Size threshold for scheduled run',
'', 1, $choices);
$settings->add($element);
$limit = [
500 =>"500",
1000 => "1000",
2000 => "2000",
3000 => "3000",
4000 => "4000",
5000 => "5000",
10000 => "10000",
15000 => "15000",
20000 => "20000",
];
$element = new admin_setting_configselect('local_rollover_wizard/cron_limit_question',
get_string("setting_page:limit_question","local_rollover_wizard"),
"",
500, $limit);
$settings->add($element);
$element = new admin_setting_configtextarea('local_rollover_wizard/activities_notberolled', 'Activities not to be rolled over',
'Put in activity types separated by commas. Ex: turnitin,forum', null, PARAM_TEXT, '20', '8');
$settings->add($element);
}