-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.php
70 lines (61 loc) · 3.45 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
<?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/>.
/**
* Defines site settings for the user grade forecast gradebook report
*
* @package gradereport_forecast
* @copyright 2016 Louisiana State University, Chad Mazilly, Robert Russo, Dave Elliott
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configcheckbox(
'grade_report_forecast_showlettergrade',
get_string('showlettergrade', 'grades'),
get_string('showlettergrade', 'grades'), 1));
$settings->add(new admin_setting_configcheckbox(
'grade_report_forecast_showgradepercentage',
get_string('showpercentage', 'grades'),
get_string('showpercentage_help', 'grades'), 1));
$settings->add(new admin_setting_configselect('grade_report_forecast_rangedecimals', get_string('rangedecimals', 'grades'),
get_string('rangedecimals_help', 'grades'), 0, array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5)));
$options = array(0 => get_string('shownohidden', 'grades'),
1 => get_string('showhiddenuntilonly', 'grades'),
2 => get_string('showallhidden', 'grades'));
$settings->add(new admin_setting_configselect(
'grade_report_forecast_showhiddenitems',
get_string('showhiddenitems', 'grades'),
get_string('showhiddenitems_help', 'grades'), 1, $options));
$settings->add(new admin_setting_configselect(
'grade_report_forecast_showtotalsifcontainhidden',
get_string('hidetotalifhiddenitems', 'grades'),
get_string('hidetotalifhiddenitems_help', 'grades'),
GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN,
array(GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN => get_string('hide'),
GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN => get_string('hidetotalshowexhiddenitems', 'grades'),
GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN => get_string('hidetotalshowinchiddenitems', 'grades'))));
$settings->add(new admin_setting_configcheckbox(
'grade_report_forecast_enabledforstudents',
get_string('enabled_for_students', 'gradereport_forecast'),
get_string('enabled_for_students_desc', 'gradereport_forecast'), 1));
$settings->add(new admin_setting_configcheckbox(
'grade_report_forecast_mustmakeenabled',
get_string('must_make_enabled', 'gradereport_forecast'),
get_string('must_make_enabled_desc', 'gradereport_forecast'), 0));
$settings->add(new admin_setting_configtext('grade_report_forecast_debouncewaittime',
get_string('debounce_wait_time', 'gradereport_forecast'),
get_string('debounce_wait_time_desc', 'gradereport_forecast'), '1000'));
}