The SCORM API wrapper (v1.1.7) has been updated to automatically set the initial course status and the exit status.
The point of my SCORM API wrapper is to make working with SCORM easier. These two new functions are intended to ensure you follow best practices with your SCORM code while reducing the amount of tedious code you will need to write for your course.
Setting the initial course status
Even though there are many ways to use SCORM, one task every course should handle is changing SCORM’s initial state of “not attempted” (or sometimes “unknown”) to “incomplete”. The logic being that if the learner launched the SCO, the lesson can be considered ‘started’ but not completed yet. To meet this need, the following logic has been added to the wrapper:
- Upon connection to the LMS, the wrapper will automatically request the course status.
- If the course status is “not attempted” or “unknown”, the wrapper will instruct the LMS to set the status to “incomplete”.
- If the reported status was anything other than “not attempted” or “unknown”, the wrapper will not make any changes.
The wrapper does not automatically handle setting a completion status at the end of a course.
This feature is compatible with both SCORM 1.2 and SCORM 2004, and is enabled by default.
pipwerks.SCORM.handleCompletionStatus = false;
Setting the exit status
As I mentioned in my previous post, using cmi.core.exit (SCORM 1.2) and cmi.exit (SCORM 2004) is a good idea, and one that’s easily overlooked. If you don’t explicitly set the exit status to “suspend” for an incomplete course, the LMS is supposed to consider the course complete, and make the suspend_data unavailable. Simply stated, forgetting to set the exit status can really muck things up!
To help ensure your exit status is always set, I’ve added the following logic to the wrapper:
Upon terminating the course session (
- If the exit status has already been set by the course, do nothing.
- If the exit status has not been set, check the course status, then:
- If the course has been set to completed (and/or “passed” in SCORM 1.2), then automatically set the exit mode to “logout” (SCORM 1.2) or “normal” (SCORM 2004).
- If the course has not been set to completed (and/or “passed” in SCORM 1.2), we assume the learner will be coming back to complete the course at a later time. Therefore, we will automatically set the exit mode to “suspend”.
pipwerks.SCORM.handleExitMode = false;
Get the latest version of the wrapper
You can download the latest version of the wrapper (and other goodies) from the downloads page.
New SCORM ebook coming soon!
I'm writing an ebook explaining how to build an HTML-based SCORM course. Subscribe to be notified when it's ready, as well as receive early bird pricing and some free goodies!