/**
* First implementation of the preferences in the form of a moodleform.
* TODO add "reset to site defaults" button
- * TODO show site defaults near each setting
*/
class grader_report_preferences_form extends moodleform {
//--------------------------------------------------------------------------------
$preferences = array();
$preferences['prefgeneral'] = array(
- 'studentsperpage' => 'text',
- 'quickgrading' => $checkbox_default,
- 'quickfeedback' => $checkbox_default,
- 'decimalpoints' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default', 0, 1, 2, 3, 4, 5),
- 'aggregationposition' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_AGGREGATION_POSITION_LEFT => get_string('left', 'grades'),
- GRADE_REPORT_AGGREGATION_POSITION_RIGHT => get_string('right', 'grades')),
- 'aggregationview' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_AGGREGATION_VIEW_FULL => get_string('full', 'grades'),
- GRADE_REPORT_AGGREGATION_VIEW_COMPACT => get_string('compact', 'grades')),
- 'gradedisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
- GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
- GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
- 'meanselection' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_AGGREGATE_MEAN_ALL => get_string('meanall', 'grades'),
- GRADE_AGGREGATE_MEAN_GRADED => get_string('meangraded', 'grades')),
- 'enableajax' => $checkbox_default);
-
- $preferences['prefshow'] = array('showcalculations' => $checkbox_default,
- 'showeyecons' => $checkbox_default,
- 'showaverages' => $checkbox_default,
- 'showgroups' => $checkbox_default,
- 'showlocks' => $checkbox_default,
- 'showranges' => $checkbox_default,
- 'showuserimage' => $checkbox_default,);
+ 'studentsperpage' => 'text',
+ 'quickgrading' => $checkbox_default,
+ 'quickfeedback' => $checkbox_default,
+ 'decimalpoints' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default', 0, 1, 2, 3, 4, 5),
+ 'aggregationposition' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+ GRADE_REPORT_AGGREGATION_POSITION_LEFT => get_string('left', 'grades'),
+ GRADE_REPORT_AGGREGATION_POSITION_RIGHT => get_string('right', 'grades')),
+ 'aggregationview' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+ GRADE_REPORT_AGGREGATION_VIEW_FULL => get_string('full', 'grades'),
+ GRADE_REPORT_AGGREGATION_VIEW_COMPACT => get_string('compact', 'grades')),
+ 'gradedisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+ GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
+ GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
+ GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
+ 'meanselection' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+ GRADE_AGGREGATE_MEAN_ALL => get_string('meanall', 'grades'),
+ GRADE_AGGREGATE_MEAN_GRADED => get_string('meangraded', 'grades')),
+ 'enableajax' => $checkbox_default);
+
+ $preferences['prefshow'] = array('showcalculations' => $checkbox_default,
+ 'showeyecons' => $checkbox_default,
+ 'showaverages' => $checkbox_default,
+ 'showgroups' => $checkbox_default,
+ 'showlocks' => $checkbox_default,
+ 'showranges' => $checkbox_default,
+ 'showuserimage' => $checkbox_default,
+ 'showactivityicons' => $checkbox_default);
$preferences['prefrows'] = array(
'averagesdisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
$string['configrangesdisplaytype'] = 'Specifies how to display the range for each column in the grader report. The default and recommended value is Inherit, which first checks the display type of each column, and if such is not set explicitly, defaults to the more general Grade Display Type. If other display types are selected, they ignore the individual settings for each column, and use exclusively the selected type.';
$string['configshowcalculations'] = 'Whether to show calculator icons near each grade item and category, tooltips over calculated items and a visual indicator that a column is calculated.';
$string['configshoweyecons'] = 'Whether to show a show/hide icon near each grade (controlling its visibility to the user).';
+$string['configshowactivityicons'] = 'Show an activity icon next to each grade item linked to an activity, in the grader report.';
$string['configshowaverages'] = 'Show column averages in the grader report.';
$string['configshowgroups'] = 'Show group averages and means in the grader report.';
$string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade.';
$string['settings'] = 'Settings';
$string['setweights'] = 'Set Weights';
$string['showallstudents'] = 'Show All Students';
+$string['showactivityicons'] = 'Show activity icons';
$string['showaverages'] = 'Show column averages';
$string['showcalculations'] = 'Show calculations';
$string['showeyecons'] = 'Show show/hide icons';