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 |
* Version information
|
|
|
19 |
*
|
|
|
20 |
* @package report_coursesize
|
|
|
21 |
* @copyright 2014 Catalyst IT {@link http://www.catalyst.net.nz}
|
|
|
22 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
defined('MOODLE_INTERNAL') || die;
|
|
|
26 |
|
|
|
27 |
$ADMIN->add('reports', new admin_externalpage('reportcoursesize', get_string('pluginname', 'report_coursesize'),
|
|
|
28 |
"$CFG->wwwroot/report/coursesize/index.php", 'report/coursesize:view'));
|
|
|
29 |
|
|
|
30 |
$settings = new admin_settingpage('report_coursesize_settings', new lang_string('pluginname', 'report_coursesize'));
|
|
|
31 |
if ($ADMIN->fulltree) {
|
|
|
32 |
$settings->add(new admin_setting_configselect(
|
|
|
33 |
'report_coursesize/calcmethod',
|
|
|
34 |
new lang_string('calcmethod', 'report_coursesize'),
|
|
|
35 |
new lang_string('calcmethodhelp', 'report_coursesize'),
|
|
|
36 |
'cron',
|
|
|
37 |
array(
|
|
|
38 |
'cron' => new lang_string('calcmethodcron', 'report_coursesize'),
|
|
|
39 |
'live' => new lang_string('calcmethodlive', 'report_coursesize'),
|
|
|
40 |
)
|
|
|
41 |
));
|
|
|
42 |
|
|
|
43 |
$settings->add(new admin_setting_configtext(
|
|
|
44 |
'report_coursesize/numberofusers',
|
|
|
45 |
new lang_string('numberofusers', 'report_coursesize'),
|
|
|
46 |
new lang_string('numberofusershelp', 'report_coursesize'),
|
|
|
47 |
10,
|
|
|
48 |
PARAM_INT
|
|
|
49 |
));
|
|
|
50 |
}
|