]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14008 various SUM aggregation bugfixes; merged from MOODLE_19_STABLE
authorskodak <skodak>
Sat, 22 Mar 2008 21:26:31 +0000 (21:26 +0000)
committerskodak <skodak>
Sat, 22 Mar 2008 21:26:31 +0000 (21:26 +0000)
grade/edit/tree/item_form.php
grade/edit/tree/outcomeitem_form.php

index 1a65097de4b2c80f54e954871b57e4dbc151fa9c..03da5e7252280798027d802c8a0990a6b23827bc 100644 (file)
@@ -153,7 +153,7 @@ class edit_item_form extends moodleform {
                     $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextra') ? 'aggregationcoefextra' : 'aggregationcoef';
 
                 } else if ($cat->aggregation == GRADE_AGGREGATE_SUM) {
-                    $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasump') ? 'aggregationcoefextrasum' : 'aggregationcoef';
+                    $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasum') ? 'aggregationcoefextrasum' : 'aggregationcoef';
 
                 } else {
                     $coefstring = 'aggregationcoef';
@@ -174,7 +174,7 @@ class edit_item_form extends moodleform {
             } else {
                 $mform->addElement('text', 'aggregationcoef', get_string($coefstring, 'grades'));
             }
-            $mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'), true);
+            $mform->setHelpButton('aggregationcoef', array($coefstring, get_string($coefstring, 'grades'), 'grade'), true);
         }
 
 /// hidden params
@@ -281,7 +281,7 @@ class edit_item_form extends moodleform {
 
                     if ($aggcoef !== '') {
                         $agg_el->setLabel(get_string($aggcoef, 'grades'));
-                        $mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'), true);
+                        $mform->setHelpButton('aggregationcoef', array($aggcoef, get_string($aggcoef, 'grades'), 'grade'), true);
                     }
                 }
             }
index 8c99a5a6516e58152f39fc4121f5747e54095276..6b0178185ea846918e6dd4e57b3968744df01813 100644 (file)
@@ -104,7 +104,7 @@ class edit_outcomeitem_form extends moodleform {
                     $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextra') ? 'aggregationcoefextra' : 'aggregationcoef';
 
                 } else if ($cat->aggregation == GRADE_AGGREGATE_SUM) {
-                    $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasump') ? 'aggregationcoefextrasum' : 'aggregationcoef';
+                    $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasum') ? 'aggregationcoefextrasum' : 'aggregationcoef';
 
                 } else {
                     $coefstring = 'aggregationcoef';
@@ -126,7 +126,7 @@ class edit_outcomeitem_form extends moodleform {
             } else {
                 $mform->addElement('text', 'aggregationcoef', get_string($coefstring, 'grades'));
             }
-            $mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'), true);
+            $mform->setHelpButton('aggregationcoef', array($coefstring, get_string($coefstring, 'grades'), 'grade'), true);
         }
 
 /// hidden params
@@ -208,7 +208,7 @@ class edit_outcomeitem_form extends moodleform {
 
                     if ($aggcoef !== '') {
                         $agg_el->setLabel(get_string($aggcoef, 'grades'));
-                        $mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'));
+                        $mform->setHelpButton('aggregationcoef', array($aggcoef, get_string($aggcoef, 'grades'), 'grade'));
                     }
                 }
             }