]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17178 - fix grade update so that it happens both when the lesson status, and...
authorpiers <piers>
Sun, 9 Nov 2008 22:27:18 +0000 (22:27 +0000)
committerpiers <piers>
Sun, 9 Nov 2008 22:27:18 +0000 (22:27 +0000)
mod/scorm/locallib.php

index f1a93408d95d0aaf348c7f88246cc5d4c143ffdb..ebe990193ffd8d0280ec6c22a8dfb6a4cd103acb 100755 (executable)
@@ -275,16 +275,12 @@ function scorm_insert_track($userid,$scormid,$scoid,$attempt,$element,$value,$fo
         $id = $DB->insert_record('scorm_scoes_track',$track);
     }
 
-    // MDL-9552, update the gradebook everything raw score is sent
-    // Scoring by learning objects also needs to be included in the gradebook update
     if (strstr($element, '.score.raw') ||
         (($element == 'cmi.core.lesson_status' || $element == 'cmi.completion_status') && ($track->value == 'completed' || $track->value == 'passed'))) {
         $scorm = $DB->get_record('scorm', array('id' => $scormid));
         $grademethod = $scorm->grademethod % 10;
-        if (strstr($element, '.score.raw') || $grademethod == GRADESCOES) {
-            include_once('lib.php');
-            scorm_update_grades($scorm, $userid);
-        }
+        include_once('lib.php');
+        scorm_update_grades($scorm, $userid);
     }
 
     return $id;