-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.php
105 lines (83 loc) · 7.06 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
<?php
// This file is part of Moodle - http://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 <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
$strinherit = get_string('inherit', 'grades');
$strpercentage = get_string('percentage', 'grades');
$strreal = get_string('real', 'grades');
$strletter = get_string('letter', 'grades');
/// Add settings for this module to the $settings object (it's already defined)
$settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
get_string('studentsperpage_help', 'grades'), 100));
$settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get_string('quickgrading', 'grades'),
get_string('quickgrading_help', 'grades'), 1));
$settings->add(new admin_setting_configcheckbox('grade_report_showquickfeedback', get_string('quickfeedback', 'grades'),
get_string('showquickfeedback_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_fixedstudents', get_string('fixedstudents', 'grades'),
get_string('fixedstudents_help', 'grades'), 0));
$settings->add(new admin_setting_configselect('grade_report_meanselection', get_string('meanselection', 'grades'),
get_string('meanselection_help', 'grades'), GRADE_REPORT_MEAN_GRADED,
array(GRADE_REPORT_MEAN_ALL => get_string('meanall', 'grades'),
GRADE_REPORT_MEAN_GRADED => get_string('meangraded', 'grades'))));
$settings->add(new admin_setting_configcheckbox('grade_report_enableajax', get_string('enableajax', 'grades'),
get_string('enableajax_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_showcalculations', get_string('showcalculations', 'grades'),
get_string('showcalculations_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_showeyecons', get_string('showeyecons', 'grades'),
get_string('showeyecons_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_showaverages', get_string('showaverages', 'grades'),
get_string('showaverages_help', 'grades'), 1));
$settings->add(new admin_setting_configcheckbox('grade_report_showlocks', get_string('showlocks', 'grades'),
get_string('showlocks_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_showranges', get_string('showranges', 'grades'),
get_string('showranges_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_showidnumber', get_string('showidnumber','gradereport_marking'),
get_string('showidnumber_help','gradereport_marking'), 1));
$settings->add(new admin_setting_configcheckbox('grade_report_showactivityicons', get_string('showactivityicons', 'grades'),
get_string('showactivityicons_help', 'grades'), 1));
$settings->add(new admin_setting_configcheckbox('grade_report_shownumberofgrades', get_string('shownumberofgrades', 'grades'),
get_string('shownumberofgrades_help', 'grades'), 0));
$settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
get_string('averagesdisplaytype_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
GRADE_DISPLAY_TYPE_REAL => $strreal,
GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
GRADE_DISPLAY_TYPE_LETTER => $strletter)));
$settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
get_string('rangesdisplaytype_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
GRADE_DISPLAY_TYPE_REAL => $strreal,
GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
GRADE_DISPLAY_TYPE_LETTER => $strletter)));
$settings->add(new admin_setting_configselect('grade_report_averagesdecimalpoints', get_string('averagesdecimalpoints', 'grades'),
get_string('averagesdecimalpoints_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
'0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5')));
$settings->add(new admin_setting_configselect('grade_report_rangesdecimalpoints', get_string('rangesdecimalpoints', 'grades'),
get_string('rangesdecimalpoints_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT,
array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
'0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5')));
}