Details
Description
In /mod/scorm/datamodels/scorm_12js.php, method LMSFinish() on line 185 writes back the session data through the StoreData() function. If successful, StoreData() returns the string "true". Currently the result of this call is captured but unhandled. Just below where it is called there is a hard coded return "true"; statement. So if StoreData() fails for whatever reason (proxy auth issue, network traffic, firewall block) in its HttpRequest attempt then all the student's work will be silently lost. That's a rather serious issue when it comes to online learning, and it's just happened to me several times during testing.
I raised this issue once before nearly a year ago in http://tracker.moodle.org/browse/MDL-13716 (which has since been reviewed and closed)
Hi Peter - having a look at this I notice that StoreData() returns the correct thing if the HTTP call succeeds (either true or false), but would in effect return nothing or garbage in the HTTP call failed. It is easy to fix the return from LMSFinish() to just return the result of StoreData(), but what should the correct behaviour be in the case of an HTTP failure - "false" ?
Cheers,
Piers Harding.