1
votes

Main thrust of question:

When a user re-enters a module which they had already completed and passed, the LMS reflects the course as not having been passed by unchecking the second checkbox in the course menu. It seems that the pipwerks SCORM API wrapper for JS cannot get a satisfactory status of the course from the LMS and it is automatically setting back the status to incomplete. How can I fix this?

Background and Environment

We've created an HTML/CSS/JS course which is packaged as a multi-SCO PIF. Each SCO within contains a series of slides and an assessment. When a user has gone through all the slides and taken the assessment, I set cmi.completion_status to completed. If they passed the assessment, I set cmi.success_status to passed and if not I set it to failed.

The below code snippet shows use of my custom SCORM session and assessment scoring code to do this:

if (scorm_session && scoring_info.isComplete()) {
    scorm_session.setParam('cmi.score.min', 0);
    scorm_session.setParam('cmi.score.max', 100);
    scorm_session.setParam('cmi.score.raw', scoring_info.getScore());
    scorm_session.setParam('cmi.success_status', scoring_info.isPass() ? 'passed' : 'failed');
    scorm_session.setParam('cmi.completion_status', 'completed');
}

This works correctly--I see the AJAX request go out with the proper statuses in the data. Further, I see in the LMS course menu that the first checkbox for that module gets checked for completion, and if passed I see the second one get checked as well.

When the user leaves that module to go to another, those checkboxes stay checked correctly. If the user completely exits the course and later comes back, those boxes are still checked. If, however, the user re-enters a module he has passed by clicking the title in the course menu, the "passed" checkbox gets unchecked. So if user wants to go back and look at something in a module he has already completed and passed, he is given the visual indication that he is no longer considered to have passed the course.

It appears that this status change is being triggered by the pipwerks SCORM API wrapper for JS, but it's due to info it gets back from the LMS on module entry. I see in the console that, on entry, the API asks the LMS for the course status (the API wrapper runs scorm.status("get");). If it receives not attempted or unknown it calls scorm.status("set", "incomplete").

I see in the console that the request for status goes out and unknown is returned--even when I have explicitly set it to completed and passed. I then immediately see a transmission setting the status to incomplete as the code I described says it will.

This is happening both on http://cloud.scorm.com as well as a Moodle installation we have in place.

1
What is cmi.exit set to? And what does the LMS return for cmi.entry? As far as I recall (without checking the code), if you set success_status = passed and completion_status = completed in the pipwerks wrapper, by default it will send cmi.exit = "normal" automatically - that tells the LMS that the attempt on that SCO has ended, and it will look at the next session as a new attempt - giving you a new data model (cmi.entry will be "ab-initio").JimmiTh

1 Answers

3
votes

By spec, if a SCORM SCO is completed, then subsequently relaunched, the second launch is to be treated as a new attempt. This cannot be controlled by the course, this can only be overridden in the LMS's course handling and/or launch options. Not all LMSs provide this option, but I've seen it in Moodle (SCORM 1.2), and I imagine SCORM Cloud would provide the option, too.

Regarding the wrapper's handling of the completion status, the wrapper sets incomplete only if the course status is not attempted or unknown. If the LMS returns any other value, the wrapper will leave it alone.

If you feel the wrapper's completion status handling is causing a problem, you can disable it by setting this flag before initializing the course:

scorm.handleCompletionStatus = false;