Merge branch 'MDL-45029-master' of git://github.com/lameze/moodle
authorDamyon Wiese <damyon@moodle.com>
Wed, 20 Aug 2014 05:58:22 +0000 (13:58 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 20 Aug 2014 05:58:22 +0000 (13:58 +0800)
Conflicts:
course/modlib.php

course/modlib.php

index fd03337..14c91bf 100644 (file)
@@ -285,7 +285,7 @@ function edit_module_post_actions($moduleinfo, $course) {
                     $outcome_item->set_parent($moduleinfo->gradecat);
                 }
                 $gradecategory = $outcome_item->get_parent_category();
-                if (!empty($moduleinfo->add)) {
+                if ($outcomeexists == false) {
                     if (grade_category::aggregation_uses_aggregationcoef($gradecategory->aggregation)) {
                         if ($gradecategory->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN) {
                             $outcome_item->aggregationcoef = 1;