]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool...
authorpiers <piers>
Fri, 22 Aug 2008 01:35:26 +0000 (01:35 +0000)
committerpiers <piers>
Fri, 22 Aug 2008 01:35:26 +0000 (01:35 +0000)
mod/scorm/api.php
mod/scorm/datamodels/scorm_12.js.php
mod/scorm/datamodels/scorm_13.js.php

index 3d6c70b6018c7f9fafbb6b5a61cfc0c0b99a35b4..771cd4b194202d98f4bb78ad8fb0be1f6518d177 100644 (file)
@@ -66,6 +66,9 @@
     } else {
         print_error('cannotfindsco', 'scorm');
     }
+    if (!$sco = scorm_get_sco($scoid)) {
+        print_error('cannotfindsco', 'scorm');
+    }
     $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');
index e787c423662a6d9057951f717578235f1bf1bb30..75b9418a84535168605b2b798944c7ed282add62 100644 (file)
@@ -626,7 +626,7 @@ var API = new SCORMapi1_2();
 // pull in the debugging utilities
 if (debugging('',DEBUG_DEVELOPER)) {
     include_once($CFG->dirroot.'/mod/scorm/datamodels/debug.js.php');
-    echo 'AppendToLog("Moodle SCORM 1.2 API Loaded", 0);';
+    echo 'AppendToLog("Moodle SCORM 1.2 API Loaded, Activity: '.$scorm->name.', SCO: '.$sco->identifier.'", 0);';
 }
  ?>
 
index c8f5f23876a0d574146dbf12365d226e3ec58b3a..9d4dabb1682a8dda576f66df35af54512b870dbc 100644 (file)
@@ -1173,6 +1173,6 @@ var API_1484_11 = new SCORMapi1_3();
 // pull in the debugging utilities
 if (debugging('',DEBUG_DEVELOPER)) {
     include_once($CFG->dirroot.'/mod/scorm/datamodels/debug.js.php');
-    echo 'AppendToLog("Moodle SCORM 1.3 API Loaded", 0);';
+    echo 'AppendToLog("Moodle SCORM 1.3 API Loaded, Activity: '.$scorm->name.', SCO: '.$sco->identifier.'", 0);';
 }
  ?>
\ No newline at end of file