Search code examples
javascriptjqueryhtmlscormpresentation

SCORM: jump between SCOs when button in the presentation is clicked


So, I'm working on a website in which people can create presentations. The website has a functionality to export the presentations in SCORM format (in 1.2 or in 2004). I am working on this functionality right now and it's my first time meeting SCORM.

So in my presentations there are buttons that can redirect you to other slides. For example you are on slide 4 and the button redirects you to slide 7.

For now I am building the SCORM with one SCO (Sherable Content Object) and all the navigation is handled by a custom navigation bar I made inside my presentation.

So let's go to the actual question. I want to build my presentation without my custom navigation bar so that the navigation can be handled by the LMS (Learning Management System). I did that by creating multiple SCOs (one SCO per slide) but I don't find a possible solution for my redirecting buttons. How can i "jump" from slide(SCO) 4 to slide(SCO) 7 when clicking on a button. Is it possible from the Run Time API, in 1.2 or maybe only in 2004 or it's not possible at all.

EDIT: So I'm trying to implement adl.nav.request with continue or continue in scorm 2004 4th generation but I'm not getting any luck. I made it with the nav request - choice, but continue keeps returning me false

After initialization of the Scorm Api which works fine I do:

console.log(ScoApi.api.GetValue('adl.nav.request_valid.choice.{target=4}'));
console.log(ScoApi.api.GetValue('adl.nav.request_valid.continue'));
if (ScoApi.api.GetValue('adl.nav.request_valid.choice.{target=4}')) {
    ScoApi.api.SetValue('adl.nav.request', '{target=4}choice');
} else {
    console.log('Not supported!');
}

.. and I get true for the choice and false for the continue from the console.log() in cloud.scorm.com and two unknown in Moodle. (Does unknown mean that the LMS doesn't support them?)

In my manifest I have the controlMode with it's attributes defined like this:

<imsss:sequencing>
    <imsss:controlMode choice="true" choiceExit="true" flow="true"/>
</imsss:sequencing>

Choice - Allows learners to select the order in which they view the content.

Flow - Requires learners to view the content in an order defined by the instructional designer

Choice Exit - Controls if learner may select an activity outside the active aggregation via choice.

That's what I read about them. I have tried changing them but the result was the same. What am I doing wrong here? :(

That is my manifest:

<?xml version="1.0" standalone="no" ?>
<manifest identifier="com.scorm.manifesttemplates.scorm2004.4thEd.nometadata" version="1"
          xmlns = "http://www.imsglobal.org/xsd/imscp_v1p1"
          xmlns:adlcp = "http://www.adlnet.org/xsd/adlcp_v1p3"
          xmlns:adlseq = "http://www.adlnet.org/xsd/adlseq_v1p3"
          xmlns:adlnav = "http://www.adlnet.org/xsd/adlnav_v1p3"
          xmlns:imsss = "http://www.imsglobal.org/xsd/imsss"
          xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation = "http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
                                http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd
                                http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd
                                http://www.adlnet.org/xsd/adlnav_v1p3 adlnav_v1p3.xsd
                                http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd" >

    <metadata>
        <schema>ADL SCORM</schema>
        <schemaversion>2004 4th Edition</schemaversion>
    </metadata>

    <organizations default="158ltd.omo.org">
        <organization identifier="158ltd.omo.org">
            <title>sdasdf</title>
            <item identifier="course_main_folder">
                <title>sdasdf</title>
                <item identifier="3" identifierref="54182fce77661">
                    <title>1</title>
                </item>
                <item identifier="4" identifierref="54182fce77b28">
                    <title>2</title>
                </item>
                <item identifier="5" identifierref="54182fce77ebd">
                    <title>3</title>
                </item>
                <item identifier="54182fce786c7">
                    <title>visible group</title>
                <item identifier="6" identifierref="54182fce784f8">
                    <title>Wooho</title>
                </item>
                </item>
            </item>
            <imsss:sequencing>
                <imsss:controlMode choice="true" choiceExit="true" flow="true"/>
            </imsss:sequencing>
        </organization>
    </organizations>

    <resources>
        <resource identifier="54182fce77661" type="webcontent" adlcp:scormType="sco" href="content/slide_3.html">
            <file href="content/slide_3.html" />
        </resource>
        <resource identifier="54182fce77b28" type="webcontent" adlcp:scormType="sco" href="content/slide_4.html">
            <file href="content/slide_4.html" />
        </resource>
        <resource identifier="54182fce77ebd" type="webcontent" adlcp:scormType="sco" href="content/slide_5.html">
            <file href="content/slide_5.html" />
        </resource>
        <resource identifier="54182fce784f8" type="webcontent" adlcp:scormType="sco" href="content/slide_6.html">
            <file href="content/slide_6.html" />
        </resource>
    </resources>
</manifest>

Solution

  • For deployment on many LMS systems the way they set up the specification is a mix of both the SCORM 2004 Sequence and Navigation within the imsmanifest.xml. This is apart of the packaging (Content Aggregation Model) spec. And secondly utilizing the new runtime capabilities via 'adl.nav.x'.

    I've personally found this portion of the spec tricky because you are requesting (within the SCO) and all the SCO's in your organization need to be aware of each other. Meaning your CAM has identifiers for all the Activities and or resources and your SCO's would need to know they were requesting to move to content by those ID's. This is called a "choice" navigation request where you pass the target of what you want to go to:

    Continue or Previous:

    if (wrapper.GetValue("adl.nav.request_valid.continue") === 'true') {    
        wrapper.SetValue("adl.nav.request", "continue");
    } else {
        // not supported (fail over)
    }
    

    Skip, Jump or Choose as they've referred to it in the docs:

    if (wrapper.GetValue("adl.nav.request_valid.choice.{target=PAGE-D}") === 'true') {
        wrapper.SetValue("adl.nav.request", "{target=PAGE-D}choice");
    } else {
        // not supported (fail over)
    }
    

    Further more, within the Sequence and Navigation you have options to control the flow - whether the student can navigate freely, only go forward among other options. You could technically pass in the CAM identifiers via launch data or parameters into each SCO so you'd know what was available.

    You may be able to control some of your required behavior directly with Simple Sequencing rules having pre/post criteria for skipping, exiting, restarting etc ... This allows you to set up performance rules about how the students move through your lesson. For all that I'd highly recommend reading up on the SCORM SeqNav PDF via ADL or checkout 3rd Edition if 4th isn't adopted by the LMS your on (patched in 2009). You may have more detail about IMS Simple Sequencing directly from IMS Global. There was what appears to be a bit of a feud between ADL and IMS over some of of the higher points which is entertaining all the same.

    On hand editing XML (imsmanifest.xml) - You can control the sequence of all or part of your lesson structure by adding:

    <imsss:sequencing>
        <imsss:controlMode choice="true" flow="true" />
    </imsss:sequencing>
    

    flow defaults to false, but true allows sequencing requests. choice defaults to true.

    I'll follow up with a more complete example (zip). I did notice I checked for a boolean in my if statement above which actually responds 'true'. So that was a oversight on my part.

    Sample with Choice 'adl.nav.request' via previous, continue and choice. But choice='true' required for that to work.

    https://dl.dropboxusercontent.com/u/3459294/scorm/one-page-progression.zip

    Only other way to manage the sequence is to dive into precondition rules and actions.

    Thanks, Mark