3 // This file is part of Moodle - http://moodle.org/
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 defined('MOODLE_INTERNAL') ||
die;
20 if ($ADMIN->fulltree
) {
22 $strinherit = get_string('inherit', 'grades');
23 $strpercentage = get_string('percentage', 'grades');
24 $strreal = get_string('real', 'grades');
25 $strletter = get_string('letter', 'grades');
27 /// Add settings for this module to the $settings object (it's already defined)
28 $settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
29 get_string('studentsperpage_help', 'grades'), 100));
31 $settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get_string('quickgrading', 'grades'),
32 get_string('quickgrading_help', 'grades'), 1));
34 $settings->add(new admin_setting_configcheckbox('grade_report_showquickfeedback', get_string('quickfeedback', 'grades'),
35 get_string('showquickfeedback_help', 'grades'), 0));
37 $settings->add(new admin_setting_configcheckbox('grade_report_fixedstudents', get_string('fixedstudents', 'grades'),
38 get_string('fixedstudents_help', 'grades'), 0));
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'))));
45 $settings->add(new admin_setting_configcheckbox('grade_report_enableajax', get_string('enableajax', 'grades'),
46 get_string('enableajax_help', 'grades'), 0));
48 $settings->add(new admin_setting_configcheckbox('grade_report_showcalculations', get_string('showcalculations', 'grades'),
49 get_string('showcalculations_help', 'grades'), 0));
51 $settings->add(new admin_setting_configcheckbox('grade_report_showeyecons', get_string('showeyecons', 'grades'),
52 get_string('showeyecons_help', 'grades'), 0));
54 $settings->add(new admin_setting_configcheckbox('grade_report_showaverages', get_string('showaverages', 'grades'),
55 get_string('showaverages_help', 'grades'), 1));
57 $settings->add(new admin_setting_configcheckbox('grade_report_showlocks', get_string('showlocks', 'grades'),
58 get_string('showlocks_help', 'grades'), 0));
60 $settings->add(new admin_setting_configcheckbox('grade_report_showranges', get_string('showranges', 'grades'),
61 get_string('showranges_help', 'grades'), 0));
63 $settings->add(new admin_setting_configcheckbox('grade_report_showuserimage', get_string('showuserimage', 'grades'),
64 get_string('showuserimage_help', 'grades'), 1));
66 $settings->add(new admin_setting_configcheckbox('grade_report_showuseridnumber', get_string('showuseridnumber', 'grades'),
67 get_string('showuseridnumber_help', 'grades'), 0));
69 $settings->add(new admin_setting_configcheckbox('grade_report_showactivityicons', get_string('showactivityicons', 'grades'),
70 get_string('showactivityicons_help', 'grades'), 1));
72 $settings->add(new admin_setting_configcheckbox('grade_report_shownumberofgrades', get_string('shownumberofgrades', 'grades'),
73 get_string('shownumberofgrades_help', 'grades'), 0));
75 $settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
76 get_string('averagesdisplaytype_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT
,
77 array(GRADE_REPORT_PREFERENCE_INHERIT
=> $strinherit,
78 GRADE_DISPLAY_TYPE_REAL
=> $strreal,
79 GRADE_DISPLAY_TYPE_PERCENTAGE
=> $strpercentage,
80 GRADE_DISPLAY_TYPE_LETTER
=> $strletter)));
82 $settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
83 get_string('rangesdisplaytype_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT
,
84 array(GRADE_REPORT_PREFERENCE_INHERIT
=> $strinherit,
85 GRADE_DISPLAY_TYPE_REAL
=> $strreal,
86 GRADE_DISPLAY_TYPE_PERCENTAGE
=> $strpercentage,
87 GRADE_DISPLAY_TYPE_LETTER
=> $strletter)));
89 $settings->add(new admin_setting_configselect('grade_report_averagesdecimalpoints', get_string('averagesdecimalpoints', 'grades'),
90 get_string('averagesdecimalpoints_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT
,
91 array(GRADE_REPORT_PREFERENCE_INHERIT
=> $strinherit,
98 $settings->add(new admin_setting_configselect('grade_report_rangesdecimalpoints', get_string('rangesdecimalpoints', 'grades'),
99 get_string('rangesdecimalpoints_help', 'grades'), GRADE_REPORT_PREFERENCE_INHERIT
,
100 array(GRADE_REPORT_PREFERENCE_INHERIT
=> $strinherit,