DoSubmit and Close from Captivate (BWP)

Dec 28, 2010 at 8:36 PM

I am using Adobe Captivate for the packages, and the frameset from BWP.  From this wonderful forum, I have figured out how to enable flow for autostart, and hide the frames once started.  The last part of my puzzle is the scripting to submit the attempt and either go to a "complete" page, or simply close the window.  Currently, it just hangs, or closes without setting status to complete.  In Captivate, there is a section to enter script on ending.

When I enter script #1:

 top.API_GetFramesetManager().ClearContentFrameAndPost("DS", null);

It does perform the submit properly, registers it as complete, but then hangs on the "Please Wait" page.

 

When I enter script #2:

top.API_GetFramesetManager().ClearContentFrameAndPost("DS", null);
top.API_GetFramesetManager().IsClosing(true);

It submits the attempt, registers it as complete, but closes before letting go of the swf file so my lms errors that the swf is in use.

 

When I enter script #3:  (same as above but commands reversed)

top.API_GetFramesetManager().IsClosing(true);
top.API_GetFramesetManager().ClearContentFrameAndPost("DS", null);

It submits the attempt, does not register it as complete, but properly closes the window.

I have been spinning my wheels on this all day researching the FramesetMgr.js file for any clue.  The ClearContentFrameAndPost seems to be a good solution as it makes sure were ready to submit.  It just seems that when I put any command after that, the script doesn't get a chance to stop and the page holds onto the swf.  Has anyone been able to get this working? 

Dec 29, 2010 at 12:46 AM

I have added a function to the Adobe provided scorm_support.js which is called when Captivate exits

function SCORMExit()
{
    g_objAPI.SetValue("adl.nav.request", "continue");
    return "Results Saved";
}

The last <item> in imsmanifest.xml looks like this

            <item identifier="LTGFindingRecords" isvisible="false" identifierref="LTGFindingRecords_RES">
                <title>Finding Records</title>
                <imsss:sequencing>
                    <imsss:objectives>
                        <imsss:primaryObjective objectiveID="PRIMARYOBJ" satisfiedByMeasure="true">
                            <imsss:minNormalizedMeasure/>
                        </imsss:primaryObjective>
                    </imsss:objectives>
                    <imsss:sequencingRules>
                        <imsss:postConditionRule>
                            <imsss:ruleConditions>
                                <imsss:ruleCondition condition="completed"/>
                            </imsss:ruleConditions>
                            <imsss:ruleAction action="exitAll"/>
                        </imsss:postConditionRule>
                    </imsss:sequencingRules>
                </imsss:sequencing>
                <adlcp:dataFromLMS>.</adlcp:dataFromLMS>
                <adlcp:timeLimitAction>exit,message</adlcp:timeLimitAction>
            </item>

Works for me.  Your mileage may vary.
Dec 29, 2010 at 3:37 PM

Thanks for the reply Paul,

This got me great mileage.  The additional sequencing rule in the manifest had no effect.  However, in my ending script, I added your script after "top.API_GetFramesetManager().ClearContentFrameAndPost("DS", null);".  This forwards navigation onto the completed page you get when you open a completed package.  This is close enough to what I was looking for.  Thank you again for sharing Paul.

Dec 31, 2010 at 3:32 AM

I mis-spoke, the additional sequencing didn't work because the objective wasn't being met.  Got it all working now and it is perfect.  Thank you again Paul.