# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/grade/edit/tree/category_form.php
--- moodle/grade/edit/tree/category_form.php Base (1.36)
+++ moodle/grade/edit/tree/category_form.php Locally Modified (Based On 1.36)
@@ -1,4 +1,3 @@
-<<<<<<< category_form.php
 <?php  //$Id: category_form.php,v 1.36 2009/05/29 17:30:53 skodak Exp $
 
 ///////////////////////////////////////////////////////////////////////////
@@ -429,11 +428,12 @@
                     if ($coefstring == 'aggregationcoefextrasum') {
                         // advcheckbox is not compatible with disabledIf!
                         $element =& $mform->createElement('checkbox', 'grade_item_aggregationcoef', get_string($coefstring, 'grades'));
+                        $mform->setDefault('grade_item_aggregationcoef', (int) $grade_item->aggregationcoef); // must be cast to int, otherwise "0" counts as true :S
                     } else {
                         $element =& $mform->createElement('text', 'grade_item_aggregationcoef', get_string($coefstring, 'grades'));
+                        $mform->setDefault('grade_item_aggregationcoef', $grade_item->aggregationcoef);
                     }
                     $mform->insertElementBefore($element, 'parentcategory');
-                    $mform->setDefault('grade_item_aggregationcoef', (int) $grade_item->aggregationcoef); // must be cast to int, otherwise "0" counts as true :S
                     $mform->setHelpButton('grade_item_aggregationcoef', array($coefstring, get_string($coefstring, 'grades'), 'grade'), true);
                 }
             }
