]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13716 - When storing progress of scorm activity a 404 is
authorpoltawski <poltawski>
Fri, 2 May 2008 10:48:54 +0000 (10:48 +0000)
committerpoltawski <poltawski>
Fri, 2 May 2008 10:48:54 +0000 (10:48 +0000)
encountered and js failure on split. Cast to string to avoid this.

thanks to Peter Chamberlin of LJCreate
merged from MOODLE_19_STABLE

mod/scorm/datamodels/scorm_12.js.php
mod/scorm/datamodels/scorm_13.js.php

index 6e5ceb0cdfb6dcbdb5e838183398af7b292fe63e..e95f396cadaf78cb3314465db58c2d0b3903f07f 100644 (file)
@@ -544,7 +544,7 @@ function SCORMapi1_2() {
         
         var myRequest = NewHttpReq();
         result = DoRequest(myRequest,"<?php p($CFG->wwwroot) ?>/mod/scorm/datamodel.php","id=<?php p($id) ?>&sesskey=<?php p($USER->sesskey) ?>"+datastring);
-        results = result.split('\n');
+        results = String(result).split('\n');
         errorCode = results[1];
         return results[0];
     }
index dba2a5795f74dd704493becd76df4c4b4d6c9886..52784050f259a0c92f34d0a6d6cfde1f073df85e 100644 (file)
@@ -1120,7 +1120,7 @@ function SCORMapi1_3() {
                 echo 'popupwin(result);';
             }
         ?>
-        var results = result.split('\n');
+        var results = String(result).split('\n');
         if ((results.length > 2) && (navrequest != '')) {
             eval(results[2]);
         }