Search This Blog

Friday, March 5, 2010

LMS Quirks, Issues, and Work- Arounds : LRN Learning System (part 2)

Now that we have the SCORM 1.2 package running on the LMS there has been another issues that has popped up. The issue is that the single SCO SCORM package automatically "completes with no score" in the LMS when the student launches the course. The SCORM data is clearly NOT sending cmi.core.lesson_status [see below ---SCORM DEBUG REPORT ---].

Now here is the FUN part. In this particular LMS (LRN Learning System) if you do not set the lesson status at all as soon as the course launches then the LMS ASSUMES THAT YOU WANT IT MARKED COMPLETED !!!

This kind of stuff is what makes me rant on this blog :)...

There is even a comment in the LMS javascript to this effect [see the bold text below]:
IN FILE: wrapperEscape.js
Method:persistData:

if (this.isInitialized) {
            /*set the lesson status to completed if the SCO doesn't set the lesson_status*/
            if(!this.isSCOSetStatus){
                if(!this.prevStatus){
                    this.prevStatus = this.CMIDataModel["cmi.core.lesson_status"].cache;
                }
                this.CMIDataModel["cmi.core.lesson_status"].cache = "completed";
            }          
            this.persistData();
            this.isInitialized = false;
        } else {
            this.errorCode = SCORM12_ERR.NOT_INIT;
            message += "failed!";
            SCORM12_UTL.logAPI(message,this);
            return "false";
        }

--- One possible solution ---
        isInitialized = doLMSInitialize();
        v = doLMSGetValue("cmi.core.lesson_status");
        if(v == "not attempted" || v == "" || v == "incomplete")
        {
            //every session you have to set the lesson_status = incomplete, failing to do this will cause the course to automatically be merked completed by the LMS            doLMSSetValue("cmi.core.lesson_status","incomplete");
        }


This debug report can be generated by adding ?debug=true to the end of the sco launch file name OR issuing the following command in the IE8 debugger:
top.location.href="http:/LMS_URL/lrn_start.html?debug=true&aicc_sid=xxxxxxxx&aicc_url=http://LMS_URL/app/a
icc/xscorm_handler&mode=preview&media=off&mode=preview";

---SCORM DEBUG REPORT ---
11:35:30 DEBUG - debug starting...
11:35:32 DEBUG - LMSInitialize()--succeed!
11:35:32 DEBUG - result:0--No error
11:35:32 DEBUG - LMSGetValue(cmi.core.lesson_status)--incomplete!
11:35:32 DEBUG - result:0--No error
11:35:32 DEBUG - LMSGetLastError()--0
11:35:32 DEBUG - LMSGetValue(cmi.suspend_data)--0,0,0,0!
11:35:32 DEBUG - result:0--No error
11:35:32 DEBUG - LMSGetLastError()--0
11:35:32 DEBUG - LMSGetValue(cmi.suspend_data)--0,0,0,0!
11:35:32 DEBUG - result:0--No error
11:35:32 DEBUG - LMSGetLastError()--0
11:40:09 DEBUG - LMSSetValue(cmi.core.session_time,0000:04:37.41)--succeed!
11:40:09 DEBUG - result:0--No error
11:40:09 DEBUG - LMSCommit()--succeed!
11:40:09 DEBUG - result:0--No error