Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCORM 1.2 API Examples/Tutorials

Tags:

api

scorm

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 this: http://www.vsscorm.net/2009/05/30/ground-rules/

It is a solid tutorial but I would like to find some more information from other sources.

All suggestions are appreciated.

like image 896
Hoogie Avatar asked Mar 02 '15 19:03

Hoogie


People also ask

What is API and SCORM?

The API is essentially a simple JavaScript object that presents all SCORM RTE functions for use. For example, a SCORM course will search for the API object, after which it will be able to call “save”, “get”, “start” and “exit” type commands.

What does SCORM 1.2 mean?

In the SCORM 1.2 specification, SCORM-compliant learning content is either—in SCORM terminology—a Content Aggregation Package or a Resource Package. A Resource Package is a collection of learning assets that is not intended for delivery as such, for example to archive or migrate a collection of asset.

Is SCORM 1.2 or 2004 better?

SCORM 1.2 is in all likelihood the most commonly used specification in the industry. The biggest advantage of SCORM 1.2 is that uploading content to the LMS is as easy as uploading a ZIP file. Unfortunately, SCORM 1.2 lacks many of the features of the more modern specifications, like SCORM 2004.


1 Answers

Like Andrew mentioned it is really hard to fully implement SCORM yourself. I believe Moodle doesn't even support Scorm 2004.

AICC is extremely easy to implement by comparison but it harder to do redirects on completion etc.. and has less functionality.

In my system I have implemented the minimum set of functionality to support simple courses generated with tools like Articulate. Different courses call the api in a different order or get/set different values in the model so you would want to test any new course formats closely. This is what I found to be the hardest part is compensating for the different behavior exhibited by different courses.

The vsscorm you mentioned is actually the best step by step explanation I have found on how to implement the server side I think he got up to 60 posts as he implemented more and more.
http://www.vsscorm.net/

Once you get it communicating with the server the Rustici docs and Run-Time API reference is very helpful for referencing model value descriptions and default values
http://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/

Pipwerks has some interesting tools and blog posts though they are mostly focused on course creation.
http://pipwerks.com/downloads/

Also the ADL docs but it's been a long time since I looked at them. http://www.adlnet.gov/scorm/scorm-version-1-2/

If you download the Scorm 1.2 version (Basic Run-Time Calls) and place the code posted below in an html file in the root of the course then open that page in the browser via a web server it will make the course think it's inside an LMS enough to not complain and will log all the api calls it makes.
http://scorm.com/scorm-explained/technical-scorm/golf-examples/

<html>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script>
        var API = {};

        (function ($) {
            $(document).ready(setupScormApi());

            function setupScormApi() {
                API.LMSInitialize = LMSInitialize;
                API.LMSGetValue = LMSGetValue;
                API.LMSSetValue = LMSSetValue;
                API.LMSCommit = LMSCommit;
                API.LMSFinish = LMSFinish;
                API.LMSGetLastError = LMSGetLastError;
                API.LMSGetDiagnostic = LMSGetDiagnostic;
                API.LMSGetErrorString = LMSGetErrorString;

                window.open("shared/launchpage.html", "popupname","resizable,scrollbars,status");
            }
            function LMSInitialize(initializeInput) {
                displayLog("LMSInitialize: " + initializeInput);
                return true;
            }
            function LMSGetValue(varname) {
                displayLog("LMSGetValue: " + varname);
                return "";
            }
            function LMSSetValue(varname, varvalue) {
                displayLog("LMSSetValue: " + varname + "=" + varvalue);
                return "";
            }
            function LMSCommit(commitInput) {
                displayLog("LMSCommit: " + commitInput);
                return true;
            }
            function LMSFinish(finishInput) {
                displayLog("LMSFinish: " + finishInput);
                return true;
            }
            function LMSGetLastError() {
                displayLog("LMSGetLastError: ");
                return 0;
            }
            function LMSGetDiagnostic(errorCode) {
                displayLog("LMSGetDiagnostic: " + errorCode);
                return "";
            }
            function LMSGetErrorString(errorCode) {
                displayLog("LMSGetErrorString: " + errorCode);
                return "";
            }
            function displayLog(textToDisplay){
                var loggerWindow = document.getElementById("logDisplay");
                var item = document.createElement("div");
                item.innerText = textToDisplay;
                loggerWindow.appendChild(item);
            }
        })(jQuery);
    </script>
    <div id="logDisplay">
    </div>
</html>
like image 180
Nathan Smith Avatar answered Oct 27 '22 06:10

Nathan Smith