]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10210 2 new preferences: showgrandtotals and grandtotalsdisplaytype
authornicolasconnault <nicolasconnault>
Fri, 6 Jul 2007 02:49:36 +0000 (02:49 +0000)
committernicolasconnault <nicolasconnault>
Fri, 6 Jul 2007 02:49:36 +0000 (02:49 +0000)
grade/report/grader/preferences_form.php
grade/report/grader/settings.php
lang/en_utf8/grades.php

index a96bf88e9fc515a5ec81ce84836e3e8080be0769..0ec3b1fb923f266d29b97842d44c87813d3523be 100644 (file)
@@ -62,7 +62,14 @@ class grader_report_preferences_form extends moodleform {
         $mform->setDefault('grade_report_gradedisplaytype', $prefs->gradedisplaytype);
         $mform->setType('grade_report_gradedisplaytype', PARAM_INT);
 
-        $mform->addElement('select','grade_report_feedbackformat', get_string('feedbackformat', 'grades'),
+        $mform->addElement('select','grade_report_grandtotalsdisplaytype', get_string('grandtotalsdisplaytype', 'grades'), 
+                array(get_string('raw', 'grades'), get_string('percentage', 'grades')));
+        $mform->setHelpButton('grade_report_grandtotalsdisplaytype', array(false, get_string('grandtotalsdisplaytype', 'grades'), false, true,
+                                                           false, get_string('configgrandtotalsdisplaytype', 'grades')));
+        $mform->setDefault('grade_report_grandtotalsdisplaytype', $prefs->grandtotalsdisplaytype);
+        $mform->setType('grade_report_grandtotalsdisplaytype', PARAM_INT);
+
+        $mform->addElement('select','grade_report_feedbackformat', get_string('feedbackformat', 'grades'), 
                 array(get_string('text', 'grades'), get_string('html', 'grades')));
         $mform->setHelpButton('grade_report_feedbackformat', array(false, get_string('feedbackformat', 'grades'), false, true,
                                                            false, get_string('configfeedbackformat', 'grades')));
@@ -116,8 +123,14 @@ class grader_report_preferences_form extends moodleform {
         $mform->setHelpButton('grade_report_showscales', array(false, get_string('showscales', 'grades'), false, true,
                                                            false, get_string('configshowscales', 'grades')));
         $mform->setDefault('grade_report_showscales', $prefs->showscales);
-        $mform->setType('grade_report_showscales', PARAM_INT);
-
+        $mform->setType('grade_report_showscales', PARAM_INT); 
+        
+        $mform->addElement('checkbox', 'grade_report_showgrandtotals', get_string('showgrandtotals', 'grades'));
+        $mform->setHelpButton('grade_report_showgrandtotals', array(false, get_string('showgrandtotals', 'grades'), false, true,
+                                                           false, get_string('configshowgrandtotals', 'grades')));
+        $mform->setDefault('grade_report_showgrandtotals', $prefs->showgrandtotals);
+        $mform->setType('grade_report_showgrandtotals', PARAM_INT); 
+        
         $mform->addElement('hidden', 'id');
         $mform->setDefault('id', $course->id);
 
index 82a381e572aff53841ebdf0595417dbdbc342fa0..746735982bd8dfb087ccbd4c53505f6af5198b47 100644 (file)
@@ -17,10 +17,16 @@ $settings->add(new admin_setting_configselect('grade_report_gradedisplaytype', g
                                           get_string('configgradedisplaytype', 'grades'), false,
                                           array( '0' => 'raw',
                                                  '1' => 'percentage')));
+$settings->add(new admin_setting_configselect('grade_report_grandtotalsdisplaytype', get_string('grandtotalsdisplaytype', 'grades'),
+                                          get_string('configgrandtotalsdisplaytype', 'grades'), false, 
+                                          array( '0' => 'raw', 
+                                                 '1' => 'percentage')));
 $settings->add(new admin_setting_configcheckbox('grade_report_showeyecons', get_string('showeyecons', 'grades'),
                                             get_string('configshoweyecons', 'grades'), 0));
 $settings->add(new admin_setting_configcheckbox('grade_report_showgroups', get_string('showgroups', 'grades'),
                                             get_string('configshowgroups', 'grades'), 0));
+$settings->add(new admin_setting_configcheckbox('grade_report_showgrandtotals', get_string('showgrandtotals', 'grades'),
+                                            get_string('configshowgrandtotals', 'grades'), 0));
 $settings->add(new admin_setting_configcheckbox('grade_report_showlocks', get_string('showlocks', 'grades'),
                                             get_string('configshowlocks', 'grades'), 0));
 $settings->add(new admin_setting_configcheckbox('grade_report_shownotes', get_string('shownotes', 'grades'),
index ab3198ddf9ceecd7bca78aebb13f9c0716757454..9ab723e1f5d32b2197bbb6147d4e0d2c45ddabb9 100644 (file)
@@ -32,7 +32,9 @@ $string['configdecimalpoints'] = 'The number of decimal points to display for ea
 $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['configfeedbackformat'] = 'The format of feedback notes attached to grades. This also determines the interface element used to enter such feedback (htmleditor for HTML format).';
 $string['configgradedisplaytype'] = 'Grades can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
+$string['configgrandtotalsdisplaytype'] = 'Grand totals can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
 $string['configshoweyecons'] = 'Whether to show an eye-con near each grade (controlling its visibility to the user).';
+$string['configshowgrandtotals'] = 'Show grand totals in the grader report.';
 $string['configshowgroups'] = 'Show group totals and means in the grader report.';
 $string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade.';
 $string['configshownotes'] = 'Whether to show a feedback icon (for adding/editing) near each grade.';
@@ -107,6 +109,7 @@ $string['gradereports'] = 'Grades report';
 $string['graderreport'] = 'Grader report';
 $string['gradetype'] = 'Grade type';
 $string['gradeweighthelp'] = 'Grade Weight Help';
+$string['grandtotalsdisplaytype'] = 'Grand totals display type';
 $string['hideadvanced'] = 'Hide Advanced Features';
 $string['hidecategory'] = 'Hidden';
 $string['highgradeascending'] = 'Sort by high grade ascending';
@@ -190,6 +193,7 @@ $string['settings'] = 'Settings';
 $string['setweights'] = 'Set Weights';
 $string['showallstudents'] = 'Show All Students';
 $string['showeyecons'] = 'Show eye-cons';
+$string['showsgrandtotals'] = 'Show grand totals';
 $string['showgroups'] = 'Show groups';
 $string['showlocks'] = 'Show locks';
 $string['shownotes'] = 'Show feedback';