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 |
* Defines site config settings for the grader report
|
|
|
19 |
*
|
|
|
20 |
* @package gradereport_grader
|
|
|
21 |
* @copyright 2007 Moodle Pty Ltd (http://moodle.com)
|
|
|
22 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
defined('MOODLE_INTERNAL') || die;
|
|
|
26 |
|
|
|
27 |
if ($ADMIN->fulltree) {
|
|
|
28 |
|
|
|
29 |
$strinherit = get_string('inherit', 'grades');
|
|
|
30 |
$strpercentage = get_string('percentage', 'grades');
|
|
|
31 |
$strreal = get_string('real', 'grades');
|
|
|
32 |
$strletter = get_string('letter', 'grades');
|
|
|
33 |
|
|
|
34 |
$settings->add(new admin_setting_configcheckbox('grade_report_showonlyactiveenrol', get_string('showonlyactiveenrol', 'grades'),
|
|
|
35 |
get_string('showonlyactiveenrol_help', 'grades'), 1));
|
|
|
36 |
|
|
|
37 |
$settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get_string('quickgrading', 'grades'),
|
|
|
38 |
get_string('quickgrading_help', 'grades'), 1));
|
|
|
39 |
|
|
|
40 |
$settings->add(new admin_setting_configselect('grade_report_meanselection', get_string('meanselection', 'grades'),
|
|
|
41 |
get_string('meanselection_help', 'grades'), GRADE_REPORT_MEAN_GRADED,
|
|
|
42 |
array(GRADE_REPORT_MEAN_ALL => get_string('meanall', 'grades'),
|
|
|
43 |
GRADE_REPORT_MEAN_GRADED => get_string('meangraded', 'grades'))));
|
|
|
44 |
|
|
|
45 |
$settings->add(new admin_setting_configcheckbox('grade_report_showaverages', get_string('showaverages', 'grades'),
|
|
|
46 |
get_string('showaverages_help', 'grades'), 1));
|
|
|
47 |
|
|
|
48 |
$settings->add(new admin_setting_configcheckbox('grade_report_showranges', get_string('showranges', 'grades'),
|
|
|
49 |
get_string('showranges_help', 'grades'), 0));
|
|
|
50 |
|
|
|
51 |
$settings->add(new admin_setting_configcheckbox('grade_report_showuserimage', get_string('showuserimage', 'grades'),
|
|
|
52 |
get_string('showuserimage_help', 'grades'), 1));
|
|
|
53 |
|
|
|
54 |
$settings->add(new admin_setting_configcheckbox('grade_report_shownumberofgrades', get_string('shownumberofgrades', 'grades'),
|
|
|
55 |
get_string('shownumberofgrades_help', 'grades'), 0));
|
|
|
56 |
|
|
|
57 |
$settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
|
|
|
58 |
get_string('averagesdisplaytype_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
|
|
|
59 |
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
|
|
|
60 |
GRADE_DISPLAY_TYPE_REAL => $strreal,
|
|
|
61 |
GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
|
|
|
62 |
GRADE_DISPLAY_TYPE_LETTER => $strletter)));
|
|
|
63 |
|
|
|
64 |
$settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
|
|
|
65 |
get_string('rangesdisplaytype_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
|
|
|
66 |
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
|
|
|
67 |
GRADE_DISPLAY_TYPE_REAL => $strreal,
|
|
|
68 |
GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
|
|
|
69 |
GRADE_DISPLAY_TYPE_LETTER => $strletter)));
|
|
|
70 |
|
|
|
71 |
$settings->add(new admin_setting_configselect('grade_report_averagesdecimalpoints', get_string('averagesdecimalpoints', 'grades'),
|
|
|
72 |
get_string('averagesdecimalpoints_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
|
|
|
73 |
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
|
|
|
74 |
'0' => '0',
|
|
|
75 |
'1' => '1',
|
|
|
76 |
'2' => '2',
|
|
|
77 |
'3' => '3',
|
|
|
78 |
'4' => '4',
|
|
|
79 |
'5' => '5')));
|
|
|
80 |
$settings->add(new admin_setting_configselect('grade_report_rangesdecimalpoints', get_string('rangesdecimalpoints', 'grades'),
|
|
|
81 |
get_string('rangesdecimalpoints_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
|
|
|
82 |
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
|
|
|
83 |
'0' => '0',
|
|
|
84 |
'1' => '1',
|
|
|
85 |
'2' => '2',
|
|
|
86 |
'3' => '3',
|
|
|
87 |
'4' => '4',
|
|
|
88 |
'5' => '5')));
|
|
|
89 |
|
|
|
90 |
}
|