]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11618 removed the inherit override from decimals and gradetype used on grader...
authorskodak <skodak>
Sun, 7 Oct 2007 18:15:57 +0000 (18:15 +0000)
committerskodak <skodak>
Sun, 7 Oct 2007 18:15:57 +0000 (18:15 +0000)
admin/settings/grades.php
grade/report/grader/lib.php
grade/report/grader/preferences.php
grade/report/grader/preferences_form.php
grade/report/grader/settings.php
lang/en_utf8/grades.php
lib/grade/grade_item.php
version.php

index 0859c75c3565c5427defd45972da503e0d2418f9..0a825c8e75366ce4fcacd955c556a4a7f468f775 100644 (file)
@@ -4,12 +4,30 @@
 
 // General settings
 
+require_once $CFG->libdir.'/grade/constants.php';
+
 $temp = new admin_settingpage('gradessettings', get_string('gradessettings', 'grades'));
 $temp->add(new admin_setting_special_gradeexport());
 // enable outcomes checkbox
 $temp->add(new admin_setting_configcheckbox('enableoutcomes', get_string('enableoutcomes', 'grades'), get_string('configenableoutcomes', 'grades'), 0, PARAM_INT));
 // enable publishing in exports/imports
 $temp->add(new admin_setting_configcheckbox('gradepublishing', get_string('gradepublishing', 'grades'), get_string('configgradepublishing', 'grades'), 0, PARAM_INT));
+
+$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')));
+
 $ADMIN->add('grades', $temp);
 
 /// Scales and outcomes
@@ -22,8 +40,8 @@ $letters = new admin_externalpage('letters', get_string('letters', 'grades'), $C
 $ADMIN->add('grades', $letters);
 
 /// Grade category settings
-require_once $CFG->libdir . '/grade/constants.php';
 $temp = new admin_settingpage('gradecategorysettings', get_string('gradecategorysettings', 'grades'));
+
 $strnoforce = get_string('noforce', 'grades');
 
     // Aggregation type
index 4c151b74b72dca10c530b9abf1e37fac536d35f2..20f24cae0aee1373b98c355fa5fdb01bc9405ddc 100644 (file)
@@ -904,18 +904,23 @@ class grade_report_grader extends grade_report {
                 $decimalpoints = $item->get_decimals();
 
                 // Determine which display type to use for this average
-                $gradedisplaytype = $item->get_displaytype();
-
                 if ($USER->gradeediting[$this->courseid]) {
                     $displaytype = GRADE_DISPLAY_TYPE_REAL;
-                } elseif ($averagesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT) { // Inherit specific column or general preference
-                    $displaytype = $gradedisplaytype;
-                } else { // General preference overrides specific column display type
+
+                } else if ($averagesdisplaytype == GRADE_REPORT_PREFERENCE_DEFAULT 
+                        or $averagesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT) {
+                    $displaytype = $item->get_displaytype();
+
+                } else {
                     $displaytype = $averagesdisplaytype;
                 }
 
                 // Override grade_item setting if a display preference (not inherit) was set for the averages
-                if ($averagesdecimalpoints != GRADE_REPORT_PREFERENCE_INHERIT) {
+                if ($averagesdecimalpoints == GRADE_REPORT_PREFERENCE_DEFAULT 
+                 or $averagesdecimalpoints == GRADE_REPORT_PREFERENCE_INHERIT) {
+                    $decimalpoints = $item->get_decimals();
+
+                } else {
                     $decimalpoints = $averagesdecimalpoints;
                 }
 
@@ -923,30 +928,10 @@ class grade_report_grader extends grade_report {
                     $avghtml .= '<td class="cell c' . $columncount++.'">-</td>';
                 } else {
                     $sum = $sum_array[$item->id];
-
-                    if ($item->scaleid) {
-                        if ($grouponly) {
-                            $finalsum = $sum_array[$item->id];
-                            $finalavg = $finalsum/$mean_count;
-                        } else {
-                            $finalavg = $sum/$mean_count;
-                        }
-                        $scaleval = round($finalavg);
-                        $scale_object = new grade_scale(array('id' => $item->scaleid), false);
-                        $gradehtml = $scale_object->get_nearest_item($scaleval);
-                        $rawvalue = $scaleval;
-                    } else {
-                        $rawgradeval = $sum/$mean_count;
-                        $gradeval = format_float($sum/$mean_count, $decimalpoints);
-                        $gradehtml = $gradeval;
-                    }
-
-                    if ($displaytype == GRADE_DISPLAY_TYPE_PERCENTAGE or $displaytype == GRADE_DISPLAY_TYPE_LETTER) {
-                        $gradeshtml = grade_format_gradevalue($rawgradeval, $item, true, $displaytype, null);
-                    }
+                    $avgradeval = $sum/$mean_count;
+                    $gradehtml = grade_format_gradevalue($avgradeval, $item, true, $displaytype, $decimalpoints);
 
                     $numberofgrades = '';
-
                     if ($shownumberofgrades) {
                         $numberofgrades = " ($mean_count)";
                     }
@@ -968,47 +953,46 @@ class grade_report_grader extends grade_report {
 
         $scalehtml = '';
         if ($this->get_pref('showranges')) {
-            $rangesdisplaytype = $this->get_pref('rangesdisplaytype');
+            $rangesdisplaytype   = $this->get_pref('rangesdisplaytype');
             $rangesdecimalpoints = $this->get_pref('rangesdecimalpoints');
+
             $scalehtml = '<tr class="r'.$this->rowcount++.'">'
                        . '<th class="header c0 range" scope="row">'.$this->get_lang_string('range','grades').'</th>';
 
             $columncount = 1;
             foreach ($this->items as $item) {
 
-                // Determine which display type to use for this range
-                $decimalpoints = $item->get_decimals();
-                $gradedisplaytype = $item->get_displaytype();
-
+                // Determine which display type to use for this average
                 if ($USER->gradeediting[$this->courseid]) {
                     $displaytype = GRADE_DISPLAY_TYPE_REAL;
-                } elseif ($rangesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT) { // Inherit specific column or general preference
-                    $displaytype = $gradedisplaytype;
-                } else { // General preference overrides specific column display type
+
+                } else if ($rangesdisplaytype == GRADE_REPORT_PREFERENCE_DEFAULT 
+                        or $rangesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT) {
+                    $displaytype = $item->get_displaytype();
+
+                } else {
                     $displaytype = $rangesdisplaytype;
                 }
 
-                // If ranges decimal points pref is set (but not to inherit), override grade_item setting
-                if ($rangesdecimalpoints != GRADE_REPORT_PREFERENCE_INHERIT) {
+                // Override grade_item setting if a display preference (not default) was set for the averages
+                if ($rangesdecimalpoints == GRADE_REPORT_PREFERENCE_DEFAULT 
+                 or $rangesdecimalpoints == GRADE_REPORT_PREFERENCE_INHERIT) {
+                    $decimalpoints = $item->get_decimals();
+
+                } else {
                     $decimalpoints = $rangesdecimalpoints;
                 }
 
-                $grademin = 0;
-                $grademax = 100;
-
-                if ($displaytype == GRADE_DISPLAY_TYPE_REAL) {
-                    $grademin = format_float($item->grademin, $decimalpoints);
-                    $grademax = format_float($item->grademax, $decimalpoints);
-                } elseif ($displaytype == GRADE_DISPLAY_TYPE_PERCENTAGE) {
-                    $grademin = 0;
-                    $grademax = 100;
-                } elseif ($displaytype == GRADE_DISPLAY_TYPE_LETTER) {
-                    $letters = grade_report::get_grade_letters();
-                    $grademin = end($letters);
-                    $grademax = reset($letters);
+                if ($displaytype == GRADE_DISPLAY_TYPE_PERCENTAGE) {
+                    $grademin = "0 %";
+                    $grademax = "100 %";
+
+                } else {
+                    $grademin = grade_format_gradevalue($item->grademin, $item, true, $displaytype, $decimalpoints);
+                    $grademax = grade_format_gradevalue($item->grademax, $item, true, $displaytype, $decimalpoints);
                 }
 
-                $scalehtml .= '<th class="header c'.$columncount++.' range">'. $grademin.'-'. $grademax.'</th>';
+                $scalehtml .= '<th class="header c'.$columncount++.' range">'. $grademin.'&ndash;'. $grademax.'</th>';
             }
             $scalehtml .= '</tr>';
         }
index e7fa4c53795484a491c24784203da4ea91971e5d..b61b1f0a2e462e8b748b574c82eac4a5957a0278 100644 (file)
@@ -59,7 +59,7 @@ if ($data = data_submitted()) {
         }
     }
 
-    redirect($CFG->wwwroot . '/grade/report/grader/index.php?id='.$courseid, get_string('changessaved'), 1);
+    redirect($CFG->wwwroot . '/grade/report/grader/index.php?id='.$courseid); // message here breaks accessability and is sloooowww
     exit;
 }
 
index fd9bfd38592751b9b2144e1fc9b1d845ba3ed031..bed4d87e4dd10bed54540223a4a1880d131ab3fd 100644 (file)
@@ -21,12 +21,11 @@ class grader_report_preferences_form extends moodleform {
         $strconfiggradeboundary = get_string('configgradeboundary', 'grades');
         $strgradeletter         = get_string('gradeletter', 'grades');
         $strconfiggradeletter   = get_string('configgradeletter', 'grades');
-        $strinherit             = get_string('inherit', 'grades');
         $stryes                 = get_string('yes');
         $strno                  = get_string('no');
 
 
-        $checkbox_default = array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default', 0 => $strno, 1 => $stryes);
+        $checkbox_default = array(GRADE_REPORT_PREFERENCE_DEFAULT => '*default*', 0 => $strno, 1 => $stryes);
 
 /// form definition with preferences defaults
 //--------------------------------------------------------------------------------
@@ -35,11 +34,11 @@ class grader_report_preferences_form extends moodleform {
         // Initialise the preferences arrays with grade:manage capabilities
         if (has_capability('moodle/grade:manage', $context)) {
             $preferences['prefgeneral'] = array(
-                          'aggregationview'     => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+                          'aggregationview'     => array(GRADE_REPORT_PREFERENCE_DEFAULT => '*default*',
                                                          GRADE_REPORT_AGGREGATION_VIEW_FULL => get_string('fullmode', 'grades'),
                                                          GRADE_REPORT_AGGREGATION_VIEW_AGGREGATES_ONLY => get_string('aggregatesonly', 'grades'),
                                                          GRADE_REPORT_AGGREGATION_VIEW_GRADES_ONLY => get_string('gradesonly', 'grades')),
-                          'meanselection'       => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+                          'meanselection'       => array(GRADE_REPORT_PREFERENCE_DEFAULT => '*default*',
                                                          GRADE_REPORT_MEAN_ALL => get_string('meanall', 'grades'),
                                                          GRADE_REPORT_MEAN_GRADED => get_string('meangraded', 'grades')));
 
@@ -51,20 +50,18 @@ class grader_report_preferences_form extends moodleform {
                                              'showlocks'         => $checkbox_default);
 
             $preferences['prefrows'] = array(
-                        'averagesdisplaytype'    => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
-                                                          GRADE_REPORT_PREFERENCE_INHERIT => $strinherit, 
+                        'averagesdisplaytype'    => array(GRADE_REPORT_PREFERENCE_DEFAULT => get_string('default'),
                                                           GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
                                                           GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
                                                           GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
-                        'rangesdisplaytype'      => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
-                                                          GRADE_REPORT_PREFERENCE_INHERIT => $strinherit, 
+                        'rangesdisplaytype'      => array(GRADE_REPORT_PREFERENCE_DEFAULT => get_string('default'),
                                                           GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
                                                           GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
                                                           GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
-                        'averagesdecimalpoints'  => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
-                                                          GRADE_REPORT_PREFERENCE_INHERIT => $strinherit, 0, 1, 2, 3, 4, 5),
-                        'rangesdecimalpoints'    => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
-                                                          GRADE_REPORT_PREFERENCE_INHERIT => $strinherit, 0, 1, 2, 3, 4, 5));
+                        'averagesdecimalpoints'  => array(GRADE_REPORT_PREFERENCE_DEFAULT => get_string('default'),
+                                                          '0'=>0, '1'=>1, '2'=>2, '3'=>3, '4'=>4, '5'=>5),
+                        'rangesdecimalpoints'    => array(GRADE_REPORT_PREFERENCE_DEFAULT => get_string('default'),
+                                                          '0'=>0, '1'=>1, '2'=>2, '3'=>3, '4'=>4, '5'=>5));
 
         }
 
@@ -77,7 +74,7 @@ class grader_report_preferences_form extends moodleform {
         // View capability is the lowest permission. Users with grade:manage or grade:edit must also have grader:view
         if (has_capability('gradereport/grader:view', $context)) {
             $preferences['prefgeneral']['studentsperpage'] = 'text';
-            $preferences['prefgeneral']['aggregationposition'] = array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
+            $preferences['prefgeneral']['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'));
             // $preferences['prefgeneral']['enableajax'] = $checkbox_default;
@@ -123,8 +120,8 @@ class grader_report_preferences_form extends moodleform {
 
                 $help_string = get_string("config$lang_string", 'grades');
 
-                // Replace the 'default' value with the site default language string
-                if (!is_null($options) AND isset($options[GRADE_REPORT_PREFERENCE_DEFAULT]) && $options[GRADE_REPORT_PREFERENCE_DEFAULT] == 'default') {
+                // Replace the '*default*' value with the site default language string - 'default' might collide with custom language packs
+                if (!is_null($options) AND isset($options[GRADE_REPORT_PREFERENCE_DEFAULT]) && $options[GRADE_REPORT_PREFERENCE_DEFAULT] == '*default*') {
                     $options[GRADE_REPORT_PREFERENCE_DEFAULT] = get_string('sitedefault', 'grades', $default);
                 } elseif ($type == 'text') {
                     $help_string = get_string("config{$lang_string}default", 'grades', $default);
@@ -146,7 +143,6 @@ class grader_report_preferences_form extends moodleform {
         $this->add_action_buttons();
     }
 
-
 /// perform some extra moodle validation
     function validation($data){
         $errors= array();
index 757285ff9acd93a17d3bd415992dd9a3a0570715..164d69b299ede07223cb8df179bc4d3d4212e138 100644 (file)
@@ -5,6 +5,7 @@ $strinherit             = get_string('inherit', 'grades');
 $strpercentage          = get_string('percentage', 'grades');
 $strreal                = get_string('real', 'grades');
 $strletter              = get_string('letter', 'grades');
+$strdefault             = get_string('default');
 
 /// Add settings for this module to the $settings object (it's already defined)
 $settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
@@ -16,15 +17,6 @@ $settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get
 $settings->add(new admin_setting_configcheckbox('grade_report_quickfeedback', get_string('quickfeedback', 'grades'),
                                             get_string('configquickfeedback', 'grades'), 1));
 
-$settings->add(new admin_setting_configselect('grade_report_decimalpoints', get_string('decimalpoints', 'grades'),
-                                          get_string('configdecimalpoints', 'grades'), 2,
-                                          array( '0' => '0',
-                                                 '1' => '1',
-                                                 '2' => '2',
-                                                 '3' => '3',
-                                                 '4' => '4',
-                                                 '5' => '5')));
-
 $settings->add(new admin_setting_configselect('grade_report_aggregationposition', get_string('aggregationposition', 'grades'),
                                           get_string('configaggregationposition', 'grades'), GRADE_REPORT_AGGREGATION_POSITION_RIGHT,
                                           array(GRADE_REPORT_AGGREGATION_POSITION_LEFT => get_string('left', 'grades'),
@@ -36,12 +28,6 @@ $settings->add(new admin_setting_configselect('grade_report_aggregationview', ge
                                                 GRADE_REPORT_AGGREGATION_VIEW_AGGREGATES_ONLY => get_string('aggregatesonly', 'grades'),
                                                 GRADE_REPORT_AGGREGATION_VIEW_GRADES_ONLY => get_string('gradesonly', 'grades'))));
 
-$settings->add(new admin_setting_configselect('grade_report_gradedisplaytype', get_string('gradedisplaytype', 'grades'),
-                                          get_string('configgradedisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
-                                          array(GRADE_DISPLAY_TYPE_REAL => $strreal,
-                                                GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
-                                                GRADE_DISPLAY_TYPE_LETTER => $strletter)));
-
 $settings->add(new admin_setting_configselect('grade_report_meanselection', get_string('meanselection', 'grades'),
                                           get_string('configmeanselection', 'grades'), GRADE_REPORT_MEAN_ALL,
                                           array(GRADE_REPORT_MEAN_ALL => get_string('meanall', 'grades'),
@@ -78,22 +64,22 @@ $settings->add(new admin_setting_configcheckbox('grade_report_shownumberofgrades
                                             get_string('configshownumberofgrades', 'grades'), 0));
 
 $settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
-                                          get_string('configaveragesdisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
-                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+                                          get_string('configaveragesdisplaytype', 'grades'), GRADE_REPORT_PREFERENCE_DEFAULT,
+                                          array(GRADE_REPORT_PREFERENCE_DEFAULT => $strdefault,
                                                 GRADE_DISPLAY_TYPE_REAL => $strreal,
                                                 GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
                                                 GRADE_DISPLAY_TYPE_LETTER => $strletter)));
 
 $settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
-                                          get_string('configrangesdisplaytype', 'grades'), GRADE_DISPLAY_TYPE_REAL,
-                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+                                          get_string('configrangesdisplaytype', 'grades'), GRADE_REPORT_PREFERENCE_DEFAULT,
+                                          array(GRADE_REPORT_PREFERENCE_DEFAULT => $strdefault,
                                                 GRADE_DISPLAY_TYPE_REAL => $strreal,
                                                 GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
                                                 GRADE_DISPLAY_TYPE_LETTER => $strletter)));
 
 $settings->add(new admin_setting_configselect('grade_report_averagesdecimalpoints', get_string('averagesdecimalpoints', 'grades'),
                                           get_string('configaveragesdecimalpoints', 'grades'), 2,
-                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+                                          array(GRADE_REPORT_PREFERENCE_DEFAULT => $strdefault,
                                                  '0' => '0',
                                                  '1' => '1',
                                                  '2' => '2',
@@ -102,7 +88,7 @@ $settings->add(new admin_setting_configselect('grade_report_averagesdecimalpoint
                                                  '5' => '5')));
 $settings->add(new admin_setting_configselect('grade_report_rangesdecimalpoints', get_string('rangesdecimalpoints', 'grades'),
                                           get_string('configrangesdecimalpoints', 'grades'), 2,
-                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+                                          array(GRADE_REPORT_PREFERENCE_DEFAULT => $strdefault,
                                                  '0' => '0',
                                                  '1' => '1',
                                                  '2' => '2',
index 62f9d7c081742f90140b300cd7994531ed238012..014ad7159593486e2d91cf7aca1b4ebaf5ad3d37 100644 (file)
@@ -60,8 +60,8 @@ $string['choosecategory'] = 'Select Category';
 $string['compact'] = 'Compact';
 $string['configaggregationposition'] = 'The position of the aggregation column in the grader report table, in reference to the real grades.';
 $string['configaggregationview'] = 'Each category can be displayed in three ways: Full mode (aggregated column and grade item columns), the aggregated column only, or the grade items alone.';
-$string['configaveragesdecimalpoints'] = 'The number of decimal points to display for each average (group or whole), below a column of grades. This can be overriden per grading item.';
-$string['configaveragesdisplaytype'] = 'Specifies how to display the averages 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['configaveragesdecimalpoints'] = 'The number of decimal points to display for each average (group or whole), below a column of grades.';
+$string['configaveragesdisplaytype'] = 'Specifies how to display the averages for each column in the grader report. Default means to use the display type of each column.';
 $string['configbulkcheckboxes'] = 'Checkboxes near each grade for Bulk grade operations.';
 $string['configcoursegradedisplaytype'] = 'Select the default display type of grades for this course. You can also select the site default value. Grades can be shown as real grades, as percentages (in reference to the minimum and maximum grades) or as letters (A, B, C etc..). Selecting Letters will allow you to define your own grade letters and boundaries.';
 $string['configdecimalpoints'] = 'The number of decimal points to display for each grade. This can be overriden per grading item.';
@@ -76,7 +76,7 @@ $string['configmeanselection'] = 'Select which types of grades will be included
 $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['configrangesdecimalpoints'] = 'The number of decimal points to display for each range, above a column of grades. This can be overriden per grading item.';
-$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['configrangesdisplaytype'] = 'Specifies how to display the range for each column in the grader report. Default means to use the display type of each column.';
 $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.';
index 39a869bf65ed86796b5f90954fc25011fb6e14da..d0f29c18c60a7c0612657a43e7f21d9442d358f2 100644 (file)
@@ -1714,7 +1714,7 @@ class grade_item extends grade_object {
 
             $gradedisplaytype = get_field('grade_items', 'display', 'courseid', $this->courseid, 'itemtype', 'course');
             if ($gradedisplaytype == GRADE_DISPLAY_TYPE_DEFAULT) {
-                $gradedisplaytype = $CFG->grade_report_gradedisplaytype;
+                $gradedisplaytype = $CFG->grade_displaytype;
             }
             $cache[$this->courseid] = $gradedisplaytype;
             return $gradedisplaytype;
@@ -1740,7 +1740,7 @@ class grade_item extends grade_object {
             }
             $gradedecimals = get_field('grade_items', 'decimals', 'courseid', $this->courseid, 'itemtype', 'course');
             if (is_null($gradedecimals)) {
-                $gradedecimals = $CFG->grade_report_decimalpoints;
+                $gradedecimals = $CFG->grade_decimalpoints;
             }
             $cache[$this->courseid] = $gradedecimals;
             return $gradedecimals;
index e8f1def9d4480b262d10d27d9e2f14057cd33aaf..7028f34cfd06799b7fc63edd7c7115d384f685cf 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-    $version = 2007100700;  // YYYYMMDD = date
+    $version = 2007100701;  // YYYYMMDD = date
                             //       XY = increments within a single day
 
     $release = '1.9 Beta +';   // Human-friendly version name