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 |
* Standard log store settings.
|
|
|
19 |
*
|
|
|
20 |
* @package logstore_standard
|
|
|
21 |
* @copyright 2013 Petr Skoda {@link http://skodak.org}
|
|
|
22 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
defined('MOODLE_INTERNAL') || die();
|
|
|
26 |
|
|
|
27 |
if ($hassiteconfig) {
|
|
|
28 |
|
|
|
29 |
$settings->add(new admin_setting_configcheckbox('logstore_standard/logguests',
|
|
|
30 |
new lang_string('logguests', 'core_admin'),
|
|
|
31 |
new lang_string('logguests_help', 'core_admin'), 1));
|
|
|
32 |
|
|
|
33 |
$settings->add(new admin_setting_configcheckbox('logstore_standard/jsonformat',
|
|
|
34 |
new lang_string('jsonformat', 'logstore_standard'),
|
|
|
35 |
new lang_string('jsonformat_desc', 'logstore_standard'), 1));
|
|
|
36 |
|
|
|
37 |
$options = array(
|
|
|
38 |
|
|
|
39 |
1000 => new lang_string('numdays', '', 1000),
|
|
|
40 |
365 => new lang_string('numdays', '', 365),
|
|
|
41 |
180 => new lang_string('numdays', '', 180),
|
|
|
42 |
150 => new lang_string('numdays', '', 150),
|
|
|
43 |
120 => new lang_string('numdays', '', 120),
|
|
|
44 |
90 => new lang_string('numdays', '', 90),
|
|
|
45 |
60 => new lang_string('numdays', '', 60),
|
|
|
46 |
35 => new lang_string('numdays', '', 35),
|
|
|
47 |
10 => new lang_string('numdays', '', 10),
|
|
|
48 |
5 => new lang_string('numdays', '', 5),
|
|
|
49 |
2 => new lang_string('numdays', '', 2));
|
|
|
50 |
$settings->add(new admin_setting_configselect('logstore_standard/loglifetime',
|
|
|
51 |
new lang_string('loglifetime', 'core_admin'),
|
|
|
52 |
new lang_string('configloglifetime', 'core_admin'), 0, $options));
|
|
|
53 |
|
|
|
54 |
$settings->add(new admin_setting_configtext('logstore_standard/buffersize',
|
|
|
55 |
get_string('buffersize', 'logstore_standard'),
|
|
|
56 |
'', '50', PARAM_INT));
|
|
|
57 |
}
|