From: piers Date: Sun, 9 Nov 2008 22:27:18 +0000 (+0000) Subject: MDL-17178 - fix grade update so that it happens both when the lesson status, and... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7f7946fdd7a816ee5ba580f9082eaa8c1e8ed2d6;p=moodle.git MDL-17178 - fix grade update so that it happens both when the lesson status, and the score changes. --- diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index f1a93408d9..ebe990193f 100755 --- a/mod/scorm/locallib.php +++ b/mod/scorm/locallib.php @@ -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;