]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18403: Completion system can cause problems if grade completion is somehow enable...
authorsam_marshall <sam_marshall>
Fri, 27 Feb 2009 14:35:05 +0000 (14:35 +0000)
committersam_marshall <sam_marshall>
Fri, 27 Feb 2009 14:35:05 +0000 (14:35 +0000)
lib/completionlib.php

index 4f15b4e83c7f64087677ea5794f53e078b4ae14b..b8884a3968eca5e051e4795d976d9a2c85b1eb5d 100644 (file)
@@ -661,10 +661,11 @@ WHERE
     }
 
     public function inform_grade_changed($cm, $item, $grade, $deleted) {
-        // Bail out now if completion is not enabled for course-module, grade
-        // is not used to compute completion, or this is a different numbered
-        // grade
+        // Bail out now if completion is not enabled for course-module, it is enabled
+        // but is set to manual, grade is not used to compute completion, or this
+        // is a different numbered grade
         if (!$this->is_enabled($cm) ||
+            $cm->completion == COMPLETION_TRACKING_MANUAL ||
             is_null($cm->completiongradeitemnumber) ||
             $item->itemnumber != $cm->completiongradeitemnumber) {