Merge branch 'master_MDL-42792' of git://github.com/danmarsden/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 14 Jan 2014 03:28:39 +0000 (11:28 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 14 Jan 2014 03:28:39 +0000 (11:28 +0800)
mod/scorm/request.js

index 9895d49..190fe95 100644 (file)
@@ -41,7 +41,11 @@ function DoRequest(httpReq,url,param) {
     //popupwin(url+"\n"+param);
     httpReq.open("POST", url,false);
     httpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-    httpReq.send(param);
+    try {
+        httpReq.send(param);
+    } catch (e) {
+        return false;
+    }
     if (httpReq.status == 200) {
         //popupwin(url+"\n"+param+"\n"+httpReq.responseText);
         return httpReq.responseText;