Javascript Scorm 1.2 API [closed]

你。 提交于 2019-12-04 08:22:52

问题


I need to make an existing LMS Scorm 1.2 compliant (only the basic calls). Does anyone know of any free scripts for this out there so as not to have to write this from scratch?

Thanks!

Michael


回答1:


Check this out: http://scormpool.com/search/player.aspx

I was able to download their JavaScript files and play my own SCORM 1.2 as well as 2004 courses.

Make sure you download two different API.js files, one for 1.2 and another for 2004.




回答2:


I recently created and made available a simple SCORM(1.2) API you can download and use freely - you can download from here:

https://github.com/gabrieldoty/simplify-scorm




回答3:


There used to be a sample SCORM run-time API implementation called "escorte4js" but it is no longer downloadable from its creator's site. You might try searching for it to see if somebody who used it in an application still has a copy they can send you.

You can also take a look at the ADL Sample Run-time Environment. It is an open source application that contains a reference implementation of SCORM 1.2.

There are also several open source LMS's that have implemented SCORM 1.2 (to varying degrees of success). You could look at Moodle, Illias or Sakai.

Implementing a truly compatible SCORM player is harder than it first looks. Implementing the specification is just the first step. The real trick to SCORM (or really any interoperability standard) is figuring out all of the subtle ways in which others have interpreted the standard differently and ensuring that your implementation is flexible enough to accommodate all of those differences. I recently wrote a blog post on that topic that might interest you. Look under the SCORM Explained side of that same site for more free SCORM resources.

Mike




回答4:


Michael,

Good news - most of SCORM 1.2 is optional (see my breakdown doc below). Now depending on build vs buy, the other posts are correct. This can range in price, and commonly they come with some pre-created platform code either for .NET/Java or otherwise.

I built out just the JavaScript portion but it still requires you interface that with your LMS backend server side scripts or API's.

I will attempt to quickly break down how this all works and save you a little time reading hundreds of pages of a white paper.

Main parts

  1. Server side you'll need to unzip SCORM Packages called CAM or PIF packages. These include the little portable website, and a imsmanifest.xml.
  2. You'll need to be able to parse this imsmanifest.xml so you can extract the Title, and resources used by the content. Typically, you toss these into a content share, and possibly store the data points into your Database or NOSQL option.
  3. There possibly are launch data or launch parameters contained within the imsmanifest which get added when the SCO is launched. Launch Parameters get tacked into the URL like a query string (index.html?name=value&sky=blue)
  4. You have to build out a TOC view or Lesson Viewer in your LMS. When the student clicks a desired module you'll need to obtain the student attempt for SCORM 1.2. I use JSON to support the CMI Object. Some content suspends, some just launches and terminates.
  5. Once you have the student attempt for that lesson, you'll need to expose the "API" JavaScript Runtime, and support read/writes to the student attempt (CMI Object). SCORM has some rules about the in's and out's of that object and the Runtime API enforces it.
  6. There are key things that trigger you to store the student attempt to your backend server. I do this on LMSCommit. If you do it on every LMSSetValue, you'll begin to do a DDoS attack on your server. DNS response times will end up lagging over 250ms and you can potentially have a poor UX.
  7. Once the SCO triggers a LMSFinish, that is a sign you can end the student attempt, and possibly unload the SCO.

There are more subtle parts maintained launch/relaunch of content. LMS total time (running the content). If you opt to support Objectives and Interactions. There are little gotchya's in the specification if you go for a full 100% support. Content Developers inevitably run into some of these when taking their content to other LMS Platforms.

The SCO

The SCO commonly contains the necessary JavaScript to find the "API" variable you've exposed at your LMS (On the web page) via a popup, new window, tab or IFRAME. It has a algorithm to scan the DOM for it. This is why I informed you above that your LMS needs to have the student attempt and the "API" exposed before you launch the SCO. Failure to do that will most likely result in the SCO running in a non-persisted mode.

The Runtime for SCORM 1.2

Base concept of the JavaScript you'll need to create. You need a JavaScript Function Object called "API". This needs to support methods:

  • LMSInitialize()
  • LMSGetValue(key)
  • LMSSetValue(key, value)
  • LMSCommit()
  • LMSFinish(
  • LMSGetLastError()
  • LMSGetErrorString()
  • LMSGetDiagnostic()

I have a bunch of Wiki docs on https://github.com/cybercussion/SCOBot/wiki as well as the complete SCORM 1.2, 2004 breakdown. https://dl.dropboxusercontent.com/u/3459294/SCOBot-Content-API-Standards-Breakdown.pdf

Tips

So ballpark time if you know what you are doing you could stand something up in a few days to a week. Without any knowledge, this could take you a few months to perfect. As I've tried to highlight above there are a lot of other dependancies. The SCO, the imsmanifest.xml, The Runtime API, the Student Attempt and all the management and knowing what to listen for or trigger. This is the main reason this larger effort costs $$. Attempting to pick and pull from open source projects like Moodle or some of those ancient links posted above will only get you so far. Honestly, most of them are so tightly coupled with the LMS you would spend more time teasing it out than just writing your own from scratch. I built mine from 2009-2015. I started with the content API which I supply under a Creative Commons license. I built the Runtime API in conjunction with it as a form of a unit test. Later, deciding to bundle it as a bolt on to other peoples platforms, Android/iOS projects, Electron/NodeJS apps via USB Stick or Server.

Good luck.




回答5:


I have found just this one http://www.jcasolutions.com/simple-scorm-lms-adapter, but it's not free ($5.000) ;-(




回答6:


If anyone lands here a total SCORM newb like me, understand that your LMS will likely have SCORM built into it. You're likely fiddling with SCORM because your client is stuck in the dark ages. Find out what LMS they're using and install it. Then you'll (most likely) have access to a SCORM 1.2 API via the LMS.



来源:https://stackoverflow.com/questions/953119/javascript-scorm-1-2-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!