]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9629 New setting and language strings. Also using constants from gradelib in...
authornicolasconnault <nicolasconnault>
Mon, 16 Jul 2007 09:18:02 +0000 (09:18 +0000)
committernicolasconnault <nicolasconnault>
Mon, 16 Jul 2007 09:18:02 +0000 (09:18 +0000)
grade/report/grader/preferences_form.php
grade/report/grader/settings.php
lang/en_utf8/grades.php

index 16c98e67a9bf0a4ba01eb110331f8cec45d6acaf..0b9b91d4ea73fb1599fa19e68cdb328ff5688835 100644 (file)
@@ -29,10 +29,16 @@ class grader_report_preferences_form extends moodleform {
                              'showranges'             => 'advcheckbox',
                              'quickgrading'           => 'advcheckbox',
                              'quickfeedback'          => 'advcheckbox',
-                             'aggregationposition'    => array(get_string('left', 'grades'), get_string('right', 'grades')),
-                             'aggregationview'        => array(get_string('full', 'grades'), get_string('compact', 'grades')),
-                             'gradedisplaytype'       => array(get_string('raw', 'grades'), get_string('percentage', 'grades')),
-                             'averagesdisplaytype'    => array(get_string('raw', 'grades'), get_string('percentage', 'grades')),
+                             'meanselection'          => array(GRADE_AGGREGATE_MEAN_ALL => get_string('meanall', 'grades'),
+                                                               GRADE_AGGREGATE_MEAN_GRADED => get_string('meangraded', 'grades')),
+                             'aggregationposition'    => array(GRADER_REPORT_AGGREGATION_POSITION_LEFT => get_string('left', 'grades'),
+                                                               GRADER_REPORT_AGGREGATION_POSITION_RIGHT => get_string('right', 'grades')),
+                             'aggregationview'        => array(GRADER_REPORT_AGGREGATION_VIEW_FULL => get_string('full', 'grades'),
+                                                               GRADER_REPORT_AGGREGATION_VIEW_COMPACT => get_string('compact', 'grades')),
+                             'gradedisplaytype'       => array(GRADER_REPORT_GRADE_DISPLAY_TYPE_RAW => get_string('raw', 'grades'),
+                                                               GRADER_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades')),
+                             'averagesdisplaytype'    => array(GRADER_REPORT_GRADE_DISPLAY_TYPE_RAW => get_string('raw', 'grades'),
+                                                               GRADER_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades')),
                              'decimalpoints'          => array(0, 1, 2, 3, 4, 5),
                              'studentsperpage'        => 'text');
 
index ac314402b5104abd2542f7c83dec4c79f338b1ed..2b72478faab944f80795717bc850b6c586293a13 100644 (file)
@@ -1,13 +1,16 @@
 <?php // $Id$
+require_once($CFG->libdir.'/gradelib.php');
 
 /// Add settings for this module to the $settings object (it's already defined)
 $settings->add(new admin_setting_configselect('grade_report_aggregationposition', get_string('aggregationposition', 'grades'),
                                           get_string('configaggregationposition', 'grades'), false,
-                                          array(get_string('left', 'grades'), get_string('right', 'grades'))));
+                                          array(GRADER_REPORT_AGGREGATION_POSITION_LEFT => get_string('left', 'grades'),
+                                                GRADER_REPORT_AGGREGATION_POSITION_RIGHT => get_string('right', 'grades'))));
 
 $settings->add(new admin_setting_configselect('grade_report_aggregationview', get_string('aggregationview', 'grades'),
                                           get_string('configaggregationview', 'grades'), false,
-                                          array(get_string('full', 'grades'), get_string('compact', 'grades'))));
+                                          array(GRADER_REPORT_AGGREGATION_VIEW_FULL => get_string('full', 'grades'),
+                                                GRADER_REPORT_AGGREGATION_VIEW_COMPACT => get_string('compact', 'grades'))));
 
 $settings->add(new admin_setting_configcheckbox('grade_report_bulkcheckboxes', get_string('bulkcheckboxes', 'grades'),
                                             get_string('configbulkcheckboxes', 'grades'), 0));
@@ -17,11 +20,18 @@ $settings->add(new admin_setting_configcheckbox('grade_report_enableajax', get_s
 
 $settings->add(new admin_setting_configselect('grade_report_gradedisplaytype', get_string('gradedisplaytype', 'grades'),
                                           get_string('configgradedisplaytype', 'grades'), false,
-                                          array(get_string('raw', 'grades'), get_string('percentage', 'grades'))));
+                                          array(GRADER_REPORT_GRADE_DISPLAY_TYPE_RAW => get_string('raw', 'grades'),
+                                                GRADER_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'))));
 
 $settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
                                           get_string('configaveragesdisplaytype', 'grades'), false,
-                                          array(get_string('raw', 'grades'), get_string('percentage', 'grades'))));
+                                          array(GRADER_REPORT_GRADE_DISPLAY_TYPE_RAW => get_string('raw', 'grades'),
+                                                GRADER_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'))));
+
+$settings->add(new admin_setting_configselect('grade_report_meanselection', get_string('meanselection', 'grades'),
+                                          get_string('configmeanselection', 'grades'), false,
+                                          array(GRADE_AGGREGATE_MEAN_ALL => get_string('meanall', 'grades'),
+                                                GRADE_AGGREGATE_MEAN_GRADED => get_string('meangraded', 'grades'))));
 
 $settings->add(new admin_setting_configcheckbox('grade_report_showcalculations', get_string('showcalculations', 'grades'),
                                             get_string('configshowcalculations', 'grades'), 0));
index 9cd26ca58606cbc93ad60c3d79840de0dcb8f0d1..9616de54c2a9ba9af46bb850cf9eb323b4adc16c 100644 (file)
@@ -32,17 +32,18 @@ $string['choosecategory'] = 'Select Category';
 $string['compact'] = 'Compact';
 $string['configaggregationposition'] = 'The position of the aggregation column in the grader report table, in reference to the raw grades.';
 $string['configaggregationview'] = 'The way aggregations are displayed: either alongside the raw grades, or in a compact form in which only one type is shown in the table at once: the raw grades OR the aggregated grades.';
+$string['configaveragesdisplaytype'] = 'Column averages can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
 $string['configbulkcheckboxes'] = 'Checkboxes near each grade for Bulk grade operations.';
 $string['configdecimalpoints'] = 'The number of decimal points to display for each grade. This can be overriden per grading item.';
 $string['configenableajax'] = 'Adds a layer of AJAX functionality to the grader report, simplifying and speeding up common operations. Depends on Javascript being switched on at the user\'s browser level.';
 $string['configgradedisplaytype'] = 'Grades can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
-$string['configaveragesdisplaytype'] = 'Column totals can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
+$string['configmeanselection'] = 'Select which types of grades will be included in the column averages. Cells with no grade can be ignored, or counted as 0 (default setting).';
 $string['configquickfeedback'] = 'Quick Feedback adds a text input element in each grade cell on the grader report, allowing you to edit many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.';
 $string['configquickgrading'] = 'Quick Grading adds a text input element in each grade cell on the grader report, allowing you to edit the feedback for many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.';
 $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['configshowaverages'] = 'Show column averages in the grader report.';
-$string['configshowgroups'] = 'Show group totals and means 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['configshowfeedback'] = 'Whether to show a feedback icon (for adding/editing) near each grade.';
 $string['configshowranges'] = 'Display a row showing the range of possible for each grading item in the grader report.';
@@ -155,6 +156,9 @@ $string['mapto'] = 'Map to';
 $string['max'] = 'Highest';
 $string['maxgrade'] = 'Max Grade';
 $string['mappings'] = 'Grade item mappings';
+$string['meanall'] = 'All grades';
+$string['meangraded'] = 'Non-empty grades';
+$string['meanselection'] = 'Grades selected for averages';
 $string['median'] = 'Median';
 $string['min'] = 'Lowest';
 $string['mode'] = 'Mode';