SCORM 1.2 API Examples/Tutorials

前端 未结 4 661
甜味超标
甜味超标 2021-02-04 18:28

I have spent a considerable amount of time searching for SCORM 1.2 API tutorials/examples, which turns out to be quite a difficult task.

The only sample I have found is

4条回答
  •  天命终不由人
    2021-02-04 19:04

    I think the main difficulty is parsing the specificaion. Most of SCORM 1.2 is optional, so you can pick and choose what and how much of it you want to support. Triggering error codes, diagnostic messages, validating or not. All decisions you can make. But from a JavaScript perspective its about as easy as Nathan shows, with the exception you need to construct your CMI Object which you can do using JSON as an example.

    I set up a similar mimic for running locally here https://github.com/cybercussion/SCOBot/blob/master/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js with SCORM 2004 in mind. The name spaces between the two versions changed so it's not a 1:1. This does not include all the rich rules, validations and error messages commonly thrown by a true runtime, and it wasn't meant to.

    Building out a complete Runtime API can be time consuming. You commonly need to blend in Test Driven Development, and shake out the hundreds of pages of the specification.

    1. Set up your API
    2. Set your student attempt
    3. Load your content
    4. Wait for user interactivty
    5. You'll need to post your student attempt on LMSCommit(''). This means commonly a synchronous Ajax Post to your backend. I've seen other LMS systems take a non-cached approach where every LMSGetValue/SetValue is a round trip to the server. SCORM didn't really dictate what was a best practice here, but that much chatter leads to an insane amount of DNS Lag (beach balls, hour glasses) and a weakened user expierience.

    There are a lot of use cases, but I wouldn't talk you out of checking it all out. Good knowledge to have regardless.

提交回复
热议问题