source: moodle/trunk/fuentes/admin/tool/log/store/standard/settings.php @ 136

Last change on this file since 136 was 136, checked in by mabarracus, 4 years ago

Ported code to xenial

File size: 2.1 KB
Line 
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
25defined('MOODLE_INTERNAL') || die();
26
27if ($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    $options = array(
34        0    => new lang_string('neverdeletelogs'),
35        1000 => new lang_string('numdays', '', 1000),
36        365  => new lang_string('numdays', '', 365),
37        180  => new lang_string('numdays', '', 180),
38        150  => new lang_string('numdays', '', 150),
39        120  => new lang_string('numdays', '', 120),
40        90   => new lang_string('numdays', '', 90),
41        60   => new lang_string('numdays', '', 60),
42        35   => new lang_string('numdays', '', 35),
43        10   => new lang_string('numdays', '', 10),
44        5    => new lang_string('numdays', '', 5),
45        2    => new lang_string('numdays', '', 2));
46    $settings->add(new admin_setting_configselect('logstore_standard/loglifetime',
47        new lang_string('loglifetime', 'core_admin'),
48        new lang_string('configloglifetime', 'core_admin'), 0, $options));
49
50    $settings->add(new admin_setting_configtext('logstore_standard/buffersize',
51        get_string('buffersize', 'logstore_standard'),
52        '', '50', PARAM_INT));
53}
Note: See TracBrowser for help on using the repository browser.