MDL-28541 SCORM ADL TEST CM-01 MDL-28740 fixing cmi.scaled_passing_score returning...
authorMayank Gupa <mayankgupta2005@gmail.com>
Thu, 4 Aug 2011 13:15:04 +0000 (18:45 +0530)
committerDan Marsden <dan@danmarsden.com>
Mon, 15 Aug 2011 01:47:40 +0000 (13:47 +1200)
mod/scorm/api.php

index e67fd70..9972aaf 100644 (file)
@@ -93,6 +93,9 @@ if ($scodatas = scorm_get_sco($scoid, SCO_DATA)) {
 if (!$sco = scorm_get_sco($scoid)) {
     print_error('cannotfindsco', 'scorm');
 }
+if ($scorm->version == "SCORM_1.3") {
+    $userdata->{'cmi.scaled_passing_score'} = $DB->get_field('scorm_seq_objective', 'minnormalizedmeasure', array('scoid'=>$scoid));
+}
 $scorm->version = strtolower(clean_param($scorm->version, PARAM_SAFEDIR));   // Just to be safe
 if (file_exists($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php')) {
     include_once($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php');