require_once $CFG->libdir.'/grade/constants.php';
-$temp = new admin_settingpage('gradessettings', get_string('gradessettings', 'grades'), 'moodle/grade:manage');
+$temp = new admin_settingpage('gradessettings', get_string('generalsettings', 'grades'), 'moodle/grade:manage');
+
+// new CFG variable for gradebook (what roles to display)
+$temp->add(new admin_setting_special_gradebookroles());
// enable outcomes checkbox
$temp->add(new admin_setting_configcheckbox('enableoutcomes', get_string('enableoutcomes', 'grades'), get_string('configenableoutcomes', 'grades'), 0, PARAM_INT));
array(GRADE_REPORT_AGGREGATION_POSITION_FIRST => get_string('positionfirst', 'grades'),
GRADE_REPORT_AGGREGATION_POSITION_LAST => get_string('positionlast', 'grades'))));
-$temp->add(new admin_setting_configselect('grade_displaytype', get_string('gradedisplaytype', 'grades'),
- get_string('configgradedisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
- array(GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
- GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
- GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades'))));
-
-$temp->add(new admin_setting_configselect('grade_decimalpoints', get_string('decimalpoints', 'grades'),
- get_string('configdecimalpoints', 'grades'), 2,
- array( '0' => '0',
- '1' => '1',
- '2' => '2',
- '3' => '3',
- '4' => '4',
- '5' => '5')));
-
$temp->add(new admin_setting_configcheckbox('grade_hiddenasdate', get_string('hiddenasdate', 'grades'), get_string('confighiddenasdate', 'grades'), 0, PARAM_INT));
// enable publishing in exports/imports
$ADMIN->add('grades', $temp);
+
+/// Grade item settings
+$temp = new admin_settingpage('gradeitemsettings', get_string('gradeitemsettings', 'grades'), 'moodle/grade:manage');
+
+
+$temp->add(new admin_setting_configselect('grade_displaytype', get_string('gradedisplaytype', 'grades'),
+ get_string('configgradedisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
+ array(GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
+ GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
+ GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades'))));
+
+$temp->add(new admin_setting_configselect('grade_decimalpoints', get_string('decimalpoints', 'grades'),
+ get_string('configdecimalpoints', 'grades'), 2,
+ array( '0' => '0',
+ '1' => '1',
+ '2' => '2',
+ '3' => '3',
+ '4' => '4',
+ '5' => '5')));
+
+$temp->add(new admin_setting_configmultiselect('grade_item_advanced', get_string('gradeitemadvanced', 'grades'), get_string('configgradeitemadvanced', 'grades'),
+ array('iteminfo', 'idnumber', 'gradepass', 'plusfactor', 'multfactor', 'display', 'decimals', 'hiddenuntil', 'locktime'),
+ array('iteminfo' => get_string('iteminfo', 'grades'),
+ 'idnumber' => get_string('idnumber'),
+ 'gradetype' => get_string('gradetype', 'grades'),
+ 'scaleid' => get_string('scale'),
+ 'grademin' => get_string('grademin', 'grades'),
+ 'grademax' => get_string('grademax', 'grades'),
+ 'gradepass' => get_string('gradepass', 'grades'),
+ 'plusfactor' => get_string('plusfactor', 'grades'),
+ 'multfactor' => get_string('multfactor', 'grades'),
+ 'display' => get_string('gradedisplaytype', 'grades'),
+ 'decimals' => get_string('decimalpoints', 'grades'),
+ 'hidden' => get_string('hidden', 'grades'),
+ 'hiddenuntil' => get_string('hiddenuntil', 'grades'),
+ 'locked' => get_string('locked', 'grades'),
+ 'locktime' => get_string('locktime', 'grades'),
+ 'aggregationcoef' => get_string('aggregationcoef', 'grades'),
+ 'parentcategory' => get_string('parentcategory', 'grades'))));
+
+$ADMIN->add('grades', $temp);
+
+
/// Scales and outcomes
$scales = new admin_externalpage('scales', get_string('scales'), $CFG->wwwroot.'/grade/edit/scale/index.php', 'moodle/grade:manage');
$string['configgradeexportdisplaytype'] = 'Grades can be shown as real grades, as percentages (in reference to the minimum and maximum grades) or as letters (A, B, C etc..) during export. This can be overriden during export.';
$string['configexportdecimalpoints'] = 'The number of decimal points to display for export. This can be overriden during export.';
$string['configgradehistorylifetime'] = 'This specifies the length of time you want to keep history of changes in grade related tables. It is recommended to keep it as long as possible. If you experience performance problems or have limited database space, try to set lower value.';
+$string['configgradeitemadvanced'] = 'Select all elements that should be displayed as advanced when editing grade items.';
$string['configgradeletter'] = 'A letter or other symbol used to represent a range of grades.';
$string['configgradeletterdefault'] = 'A letter or other symbol used to represent a range of grades. Leave this field empty to use the site default (currently $a).';
$string['configgradepublishing'] = 'Enable publishing in exports and imports: Exported grades can be accessed by accessing a URL, without having to log on to a Moodle site. Grades can be imported by accessing such a URL (which means that a moodle site can import grades published by another site). By default only administrators may use this feature, please educate users before adding required capabilities to other roles (dangers of bookmark sharing and download accelerators, IP restrictions, etc.).';
$string['forstudents'] = 'For students';
$string['full'] = 'Full';
$string['fullmode'] = 'Full view';
+$string['generalsettings'] = 'General settings';
$string['grade'] = 'Grade';
$string['gradebook'] = 'Gradebook';
$string['gradebookhiddenerror'] = 'The gradebook is currently set to hide everything from students.';
$string['gradehelp'] = 'Grade Help';
$string['gradehistorylifetime'] = 'Grade history lifetime';
$string['gradeitem'] = 'Grade item';
+$string['gradeitemadvanced'] = 'Advanced grade item options';
$string['gradeitemislocked'] = 'This activity is locked in the gradebook. Changes that are made to grades in this activity will not be copied to the gradebook until it is unlocked.';
$string['gradeitemlocked'] = 'Grading locked';
$string['gradeitemsinc'] = 'Grade items to be included';
$string['gradeitemnonmembers'] = 'Included in grading';
$string['gradeitemremovemembers'] = 'Include in grading';
$string['gradeitems'] = 'Grade items';
+$string['gradeitemsettings'] = 'Grade item settings';
$string['gradeletter'] = 'Grade letter';
$string['gradeletters'] = 'Grade letters';
$string['gradeletterhelp'] = 'Grade letter Help';