You may be looking for the LMS Runtime API_1484_11. This project does not currently expose that, but does have a LMS Mimic or Local API_1484_11 used when no LMS is present. More on that below...
- Save you time trying to support the SCORM Standard. Yes, its Initialize, Get Value, Set Value, Commit, and Terminate on the surface, but it goes way beyond that.
- Educate - I'm learning, you're learning, we are all learning
- Modernize - No one likes 500 global variable constants coupled with endless other issues associated with un-managed code.
- Transparency - Know why something isn't working, and have logging to back it up.
- Test - Drove the whole project with unit tests against the specification. Scenarios, make having a complete test impossible. Which is why there is always room for more testing.
I've kept this project split up into 3 logical portions, leaving room for anyone to add or subtract from the complete package. The main focal point would be 'QUnit-Tests/js/scorm/', as the surrounding files are simply supporting files like JQuery, QUnit, and further README files. I've also added all the files that go into a Content Aggregation Model. This is a package used to export your content to a learning management server. The portions of this project is split into the following sections:
QUnit-Tests/js/scorm/SCORM_API.js (Required in a deployment)- Tip: This file technically shouldn't be edited. This is the main 'long-hand' SCORM 2004 that connects to the LMS 'API_1484_11' (2004) or 'API' (1.2). With some additions to rollback to SCORM 1.2. Please note, I've only taken the SCORM 1.2 rollback so far, as it was needed on another project I worked on. There will be cases where there just isn't enough space to store some items if your going from 2004 to 1.2 (fair warning). This supplies the base support of SCORM (Connection to the LMS, initialize, get/set value, commit, terminate).
QUnit-Tests/js/scorm/SCOBot.js (Optional in a deployment)- Tip: This is totally customizable to fit your needs. Edit away. This is a boiled down series of API's that do common things we all do in a Shareable Content Object. I often get asked questions about SCORM, and I always try to inform people that API Wrappers are commonly just 'line of sight' to the LMS. There is mild enforcement of the specification, but most of that comes from the LMS API_1484_11. SCOBot, is an attempt to rollup all that between the lines stuff that our content commonly has to do. From managing ISO 8601 time, responses and response patterns, structured suspend data, scoring etc ...
QUnit-Tests/js/scorm/Local_API_1484_11.js (Optional in a deployment)- Tip: This file can be modified if needed. This holds the CMI Object (customizable), and lightly enforces the specification. This is a LMS mimic as boiled down, and will slowly be strengthened with-in reason. Its not the most strict so don't expect it to throw every single error right now. It keeps the entire CMI object and console logs the JSON object so you can view whats changed during local testing. If it doesn't cost (lines of code and or file size) a huge amount to strengthen it up I'll slowly be rolling in those error handlers and validators. SCORM is a rather large spec to enforce however, and my only concern is this might cost more than its worth. I had considered adding local storage here however in the case of a offline SCO since it could connect to this when its ran offline. But, this will also add more code and I'd rather that be an option later when and if it arises.
Also have now added a minified, or packed version of all 3 of these files in a 29KB easy to use single file for those not doing there own builds. See the scorm.bot.pack.js which is only the 3 above files merged, minified and packed.
If your testing a LMS, feel free to edit the imsmanifest.xml to fit your needs. Change the tests to match your launch parameters or launch data. These tests are not meant to remain static. Make it fit your needs.
qunit_SCORM_API.html - This will run a series of 90+ tests against SCORM which include some local debug, gets and sets as well as classic Initialize, GetValue, SetValue, Commit and Terminate. Even some illegal calls. This whole package is great to run on a LMS to view if the LMS is compliant with SCORM. The test for this is found at 'js/test/scorm_api.js'.
qunit_SCOBot.html - This will run through a series of 230+ tests rolled up common functionality that pelts the SCORM_API with all the calls, stressing out the Interactions, Objectives, Suspend Data functionality. This will continue to grow, as I expand the tests to include proper and improper data formats.
In action at http://hivelms.com/test.html *see QUnit SCO.
I also recommend trying out a bookmarklet I made to check the status of a content object running on your LMS. SCOverseer - see the Bookmarklet button on that page (drag it to your bookmarks bar). Directions on page.