Code Monkey home page Code Monkey logo

scobot's Introduction

SCORM Content API Support

Build Status

logo

Project Status: Maintenace mode

API's and features have been built and tested. More tests can always be written based on scenarios. If you encounter anything please open an issue.

Communication, Packaging, Sequencing (SCORM 2004 only)

Main project (JavaScript) files are located in QUnit-Tests/js/scorm. Surrounding files are related to the Packaging portion of SCORM 2004, and SCORM 1.2 schemas are also available in the scorm12_schemas folder. Do you have to create a CAM/PIF package? - no. Most platforms support also support manual transfers or content repositories. However, most the time the imsmanifest.xml serves as a matter of record, and the surrounding optional XSD's assist in the validation of that XML file. Normally these files must be in the root of the zip. Some platforms will complain if they are not. Please also consider the use of CDNs, S3, etc... when applicable; to limit your content bandwidth and forcing the user to re-download shared assets.

Why would I use this?

  • You are looking to add SCORM support to existing content that needs to report scoring, status and or completion.
  • You are designing custom e-learning content and wish to add SCORM Support.
  • You are testing or troubleshooting a LMS Platforms SCORM compatibility.
  • Furthering your familiarization with SCORM and its possibilities.
  • Seeking a managed, modern, transparent, test driven approach to JavaScript.

Wiki has been updated with technical, non-technical information so you can obtain a more well-rounded view of e-learning as a whole. The audience is commonly broad, with varying skill sets and backgrounds. SCORM is one of the more popular e-learning standards. Since SCORM is predominantly a JavaScript communication standard coupled with packaging and sequencing - it can get complicated in a hurry. After you understand the underlying components that make up the communication, packaging, and sequencing you'll find its pretty much like building a website, and reporting what the user is doing through an API.

SCORM Support for Content

This project was created to enhance developers capabilities interfacing e-learning standards for SCORM 1.2 and SCORM 2004. Over the last 5+ years of development, there has been no end to the amount of use cases and scenarios. Feedback from platform deployments ( new and legacy ) have been rolled into to the source code. It's a combination of all the missing API support provided by the Learning Management System Runtime. SCORM itself started off as a packaging and communication standard. Later in 2004 this included sequencing and navigation to manage your table of contents. Documentation

Location of the Runtime API occurs quickly. This traverses the Document Object Model seeking out the Runtime API. Once connected, SCORM communication will initialize. SCOBot will translate API calls to SCORM 1.2 if the portal does not support SCORM 2004. This allows you to speak one language throughout your project, but be aware there are some limitations on the compatibility due to differences between the specifications.

Quick note about Packaging

There are a lot of base files that make up the packaging standard. These schemas and document type definitions are all based on the XML structures used by the packaging format. These are optional files used to support the IMS Manifest used to describe your content object(s). This enables a Learning Management System to import your content, and have some level of a one to many relationship.

Often within e-learning curriculum and instructional specialists use modules like chapters, lessons, topics, units and more. This organization allows the construction of multi-tiered hierarchies which the LMS can display in a tree, or some other navigational format. The LMS also has the ability to control navigation within SCORM 2004 beyond what was available in SCORM 1.2.

Quick note about Communication

SCOBot will search for SCORM 2004, then fail over to SCORM 1.2. If it cannot locate any API, it will fail over to itself. Since SCOBot will manage the student data, you could choose to route that to local storage, or post it to a central server. This is all up to how you or your team wants to handle fail over. There are many deep or complex parts of SCORM since the communication is mainly string based and you only request one value at a time. SCOBot will allow you to roll-up larger data chunks into one API call. This simplifies you needing to remember what name spaces, and what order to manage your own communication. This also aids in avoiding burying all your SCORM communications deep in your project or in a way that isn't re-usable throughout your training.

Technologies, Frameworks, Libraries

It is very important to understand SCORM should be treated much like loading any other data source. It's recommended you hold up rendering the training until you establish a connection so things like bookmarks, suspended data and other modes that can establish what you should be doing. So whether you load data from XML, JSON, a CSV or just more HTML and JavaScript, understand SCOBot will trigger a 'load' event once its LMS connection is ready. Listen to this event to know when its safe to continue.

QUnit Tests

These have been included to help in the development of the API. Part way thru the design it was determined they could also test a Learning Management Systems compatibility with SCORM. All too often there have been platforms that water down their SCORM support or took shortcuts that aren't apparent until you blast them with a compressed 15 minute session. You can utilize these QUnit tests to find out if your LMS is in good standing or has some issues that need to be addressed. One popular issue is a non-cached API. This means the LMS is attempting to make a round-trip to the server per request. This roughly simulates a Denial Of Service (DOS) attack, and can cripple the user experience. Those unfamiliar with the concept of Test Driven Development, can visit QUnitJS.com for more information. This is a relatively simple way to build out designed tests to ensure logic in your entire project is functioning with good and bad data.

SCOBot JavaScript

Single file script - QUnit-Tests/js/scorm.bot.pack.js files merged, minified, packed

Developer Source Code - QUnit-Tests/js/scorm/

These can be used to aid in the creation of custom shareable content objects, or even adding SCORM support to a page that previously didn't have it. Further documentation on how to implement and configure SCOBot in your project can be found within the Wiki.

Further Reading:

The SCOBot Documentation will dig into all the technical aspects of not only the integration, but pre-flight things to think about. Configuration is normally half the battle of a successful deployment, and should be considered before (not after) you start your project.

What else do you need?

Player A Player/Presentation layer was not included with this project. Commonly in the past developers used iframes, or framesets to display a series of HTML page in a sequence. They also used other technologies like Flash. A more modern HTML approach now would be to lead content via AJAX. Presenting your training may require you to construct your own player. This can mean loading, templatizing, blending views and data. Building out interactions, layouts etc ... You could be doing this by hand or using a CMS.
Packaging and or Zipping - You may find once you have SCOBot, plus your presentation you need to now bundle it. The files in this project were meant to assist you here getting a full scope of what needs to be done to make that successful. See the Wiki for more info on zipping/packaging options.

The Student Attempt and Concepts

SCORM has a CMI (Computer Managed Instruction) Object which contains data-points for things like completion, success, scoring, location, interactions and objectives. The Runtime API provides access to this data by controlling read, write as well as limits on states, character counts etc. SCOBot rolls in all these rules in order to make your implementation have a higher rate of success. The base requirement of a Shareable Content Object is that it initialize and terminate. Popular issues that come up even in enterprise training are things like -

  • Content doesn't terminate due to a exit event issue, or authoring oversight.
  • Content never ends the attempt, and is stuck in 'suspend' mode forever.
  • Redirects (like a language selector) within the content could break LMS functionality.
  • LMS launches content in review mode after you report a score and suspend for later.
  • The list can go on and on...

As a content developer, these problems can compromise tens of thousands of your training materials. This also commonly forces you to redeploy your content and even go as far as having to cache-bust your SCOs so the student can see the updates. Just like any website, you can have browser compatibility, security changes and feature support that pop up over the life cycle of your project(s).

Debugging / Transparency

SCOverseer - see the Bookmarklet button on that page (drag it to your bookmarks bar). Directions on page.

Thanks for taking the time to take a look, and thanks to everyone that's assisted with feedback.

scobot's People

Contributors

brandonbradley avatar cybercussion avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scobot's Issues

Trouble with scorm.setvalue('adl.nav.request', 'continue');

I'm having trouble getting the LMS to move on to the next SCO after calling

scorm.setvalue('adl.nav.request', 'continue');

I copied the ScoBot.finish() function and came up with this:

/**
 * Next
 * This will move to the next sco in the sequence.
 * @returns {String} 'true' or 'false'
 */
this.next = function ()
{
    if (isStarted)
    {
        scorm.debug(settings.prefix + ": I am moving next...", 3);
        scorm.setvalue('adl.nav.request', 'continue');
        updateStatus();
        scorm.commit();
    }
    return notStartedYet();
};

But whenever I call my ScoBot.next() function, the SCO page does not move on to the next one in the manifest.

I've tried calling

scorm.set('success_status', 'passed');

to work with updateStatus() but I'm still getting no dice.

It appears to me that SCORM_API is set up to create standalone SCOs, not a squence of SCOs in a single content package, so maybe I'm trying to do something that's not intended... =/

Any direction on this issue would most appreciated.

Thank you.

Can you use SCObot with scormpool player to emulate an LMS>

Hi,

I am a product owner at leapest.com, and we are evaluating SCObot. We are currently using the scormpool player to serve scorm packages without an LMS. Is it possible to use SCObot in conjunction with scormpool to get and set cmi object data across instances? Please let us know if you are available for detailed discussions?

Best regards,
Harry

Tests always expect Pacific time

Expected:

"Tue Mar 20 2012 10:47:54 GMT-0700 (PDT)"

Result:

"Tue Mar 20 2012 11:31:06 GMT-0500 (Central Standard Time)"

I'm in the central time zone. Are the tests hardcoded to pacific?

SCORM Player

Hi,

Is this a SCORM player capable of parsing the imsmanifest.xml file and serving the content with sequencing?

I went through most of the documentation but couldn't really find a way to parse a SCORM content package.

Thanks,
Thihara

happyEnding not working when closing SCO via browser exit button

Hi,

We're experiencing a problem with the completion status when leaving an SCO.
Our SCO is made of a web page where we add an exit button. When we use this button to leave the course, the "happy ending" is well sent to the LMS (with success as "passed", status as "completed" and score as "100%"), but if we leave the course by closing the window, only the "passed" is correctly returned, while the status is set as "incomplete" and score as "unknown".

Here is the custom integration we're using:

<script type="text/javascript">
    var scorm = new SCOBotBase({
        debug: true,
        exit_type: 'finish',
        success_status: 'passed',
        completion_status: 'completed'
    });
    var SB = new SCOBot({
        happyEnding: true,
        initiate_timer: false,
        scorm_strict: true,
        base64: false,
        useJSONSuspendData: false,
        doNotStatusUntilFinish: false,
        sequencing: {
            nav: {
                request: 'exitAll'
            }
        }
    });

    SCOBotUtil.addEvent(SB, 'load', function(e) {
        player = new SCOPlayer();
        SB.happyEnding();
        SB.commit();
        return false;
    });

    SCOBotUtil.addEvent(SB, 'unload', function(e) {
        player.exit();
        scorm.setvalue('adl.nav.request', 'exitAll');
        SB.happyEnding();
        SB.finish();
        return false;
    });

    (function () {
        var doneBtns = document.getElementsByClassName('lms-finish'),
            printBtns = document.getElementsByClassName('do-print');

        var i;
        for (i in doneBtns) {
            doneBtns[i].onclick = function () {
                scorm.setvalue('adl.nav.request', 'exitAll');
                SB.happyEnding();
                SB.finish();
            };
        }

        for (i in printBtns) {
            printBtns[i].onclick = function () {
                window.print();
            };
        }
    })();
</script>

We've set the nav.request value to exitAll because we have only one SCO per course, and using any other value caused some LMS to relaunch the same SCO when close it via the custom exit button.

I've tried forcing the datas to be commited on launch, but it does not seem to work either.

Any idea of what could be wrong here?

Thanks for your help!

AICC Player

Hi,
I'm trying to consume scorm / AICC complaint course from my web application. Are there any standard players that can do this?

cmi data not saved

Hi,
I'm able to run a SCORM 2004 (4th edition) using the SCOBot but the cmi object is never updated.
After interacting with the course I'm expecting to have some data saved into the cmi (session_time, suspend_data, interactions, ...) but it is always at the initial state.

Below my code

<script type="text/javascript" src="./js/SCOBotUtil.js"></script>
<script type="text/javascript" src="./js/SCOBot_API_1484_11.js"></script>
<script type="text/javascript" src="./js/SCOBotBase.js"></script>
<script type="text/javascript" src="./js/SCOBot.js"></script>

<script type="text/javascript">
	var scorm = new SCOBotBase({                   
	        debug: true,
	        exit_type: 'suspend',
	        success_status: 'passed',
	    }),
	    SB    = new SCOBot({
	        happyEnding: true
	    });

Thank you

Suspend data is null after refreshing the page when the course is launched very first time.

I am using the scobot js for initializing and launching scorm based course. I am having the following issue when I try to get suspended data.

when the course is launched very first time the suspended data is null and as soon as the course started I save the suspended data using js and it is successfully saved. The issue occurs when I don't close the course window and just refresh it with CTRL+F5. Then I get suspended data null in the following method

SCOBotUtil.addEvent(SB, 'load', function (e) {         // in 4.x.x
    // SCOBot already took care of connection to the LMS and Initialize!
    // Do everything else you would do to fire up or resume your content here.
    var suspendData = getLMSValue("cmi.suspend_data");

    console.log(`From Scobot Js = ${suspendData}`);
    return false;
});

But when I again refresh the page using CTRL+F5 it works fine. Also, after launching the course very first time and then I close the window and start the course again it works fine.

my question is why I am getting suspended data null after launching course very first time and then do a hard refresh without closing the course window? It should give me suspended data

Updating an interaction

Hi,

first of all, thank you for providing the SCOBot open-source, it's really a big helper.

I am using the SCOBot#setInteraction method to record question answers. I have a case in my project where I want to update only the timestamp(the time when the user starts working actively on the interaction). In the wiki section it is stated that one could send only the items that have updated(another great feature).
Unfortunately, I get error messages stating that I have not set some items. I was assuming that the SCOBot would just write the timestamp in the existing interaction. Do I misunderstand what you have written in the wiki?

Thank you very much in advance for your time.

"use strict" Causes a 301 Error in Pegasus With Chrome

"use strict"; causes a 301 error in Pegasus when using Chrome.

Error Code: 301
Error Message: General Get Failure
Diagnostic: Exception occured in GetValue

I snooped around and looked at the source code for the window.API_1484_11 object that Pegasus uses. This is the snippet for the GetValue() method:

function RetrieveValue(strDataElementName)
{
    try
    {
        if (arguments.callee.caller!=null&&arguments.callee.caller.caller!=null)
        {
            // snipped
        }
    }
    catch(ex)
    {
        return SetErrorState(strEmpty,"301","Exception occured in GetValue")
    }
}

What happens is arguments.callee.caller raises an Uncaught TypeError: Illegal access to a strict mode caller function. exception in Chrome. Pegasus is trying to call the caller function but since that function is in strict mode it raises an exception. The catch catches the exception and returns the 301 error code.

The recommended solution would be to remove the "use strict"; declaration so that the Scorm API is compatible with different LMS environments. I understand you want to be jslint compliant but that compliance hinders compatibility.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.