cmi.core.exit and pipewerks

279 views
Skip to first unread message

giorg

unread,
Jan 13, 2011, 10:05:52 AM1/13/11
to eLearning Technology and Development
Hey guys,

kind of newbie here. I've read a lot on the Net and understood that
the scorm files generated by captivate lack of the right setting for
the "resume" functionality, in fact core.cmi.exit is never sent to the
LMS (in my case Moodle 2, had some debug). Now is there anybody out
there experienced with the JS generated by Captivate? Where to set
some JS call and which exactly? Or is it possible to achieve that
through the pipewerks wrapper? If yes, is there any tutorial?

Thanks a lot

Andrea

rsug...@pivotpointelearning.com

unread,
Jan 13, 2011, 2:15:37 PM1/13/11
to elearning-technolo...@googlegroups.com

Hello Andrea,

 

I’ve built a custom template to fix this (and other Captivate quirks).  To accomplish what you want:

 

1.  After publishing your project, find “function Captivate_DoFSCommand” in the published htm page.

2.  Within this function locate the line “} else if ( strFSCmd == "LMSSetValue" || strFSCmd=="SetValue") {“

3.  Place the following code directly after the line in step 2 and before the strErr = eval('g_objAPI.' + strFSCmd + '(\"' + strFSArg1 + '\",\"' + strFSArg2 + '\");'); line:
if(strFSArg1 == “cmi.core.lesson_status” && strFSArg2 == “incomplete”)
  strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');

4.  Do the same with “function Captivate_DoExternalInterface” (I’m not sure if Captivate is using ExternalInterface (I’ve read in numerous places it is an unfinished attempt) but I p[laced it there also just in case)

 

This is coded for SCORM 1.2, make adjustments for SCORM 2004 as necessary.

 

Raymond Sugel Sr
cid:image001.png@01CA9746.34805150
eLearning Consultant
224-293-4135 (O)

847-370-6163 (C)
rsug...@pivotpointelearning.com
www.pivotpointelearning.com

--

You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.

To post to this group, send email to elearning-technolo...@googlegroups.com.

To unsubscribe from this group, send email to elearning-technology-and...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/elearning-technology-and-development?hl=en.

image001.png

Andrea Giorgini

unread,
Jan 14, 2011, 4:13:16 AM1/14/11
to elearning-technolo...@googlegroups.com
On 1/13/11 8:15 PM, rsug...@pivotpointelearning.com wrote:

Hello Andrea,

 

I’ve built a custom template to fix this (and other Captivate quirks).  To accomplish what you want:

 

1.  After publishing your project, find “function Captivate_DoFSCommand” in the published htm page.

2.  Within this function locate the line “} else if ( strFSCmd == "LMSSetValue" || strFSCmd=="SetValue") {“

3.  Place the following code directly after the line in step 2 and before the strErr = eval('g_objAPI.' + strFSCmd + '(\"' + strFSArg1 + '\",\"' + strFSArg2 + '\");'); line:
if(strFSArg1 == “cmi.core.lesson_status” && strFSArg2 == “incomplete”)
  strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');

4.  Do the same with “function Captivate_DoExternalInterface” (I’m not sure if Captivate is using ExternalInterface (I’ve read in numerous places it is an unfinished attempt) but I p[laced it there also just in case)

 

This is coded for SCORM 1.2, make adjustments for SCORM 2004 as necessary.

 

Raymond Sugel Sr

Hey Raymond,

thank you very much for your answer. I did what you suggest but still, with the debugging active, I cannot see the cmi.core.exit variable passing...

Any suggestion?

Thanks a lot

Andrea

Andrea Giorgini

unread,
Jan 14, 2011, 6:30:03 AM1/14/11
to elearning-technolo...@googlegroups.com
On 1/13/11 8:15 PM, rsug...@pivotpointelearning.com wrote:

Hello Andrea,

 

I’ve built a custom template to fix this (and other Captivate quirks). 

Hi,

ok now I'm completely lost: I've commented out both Captivate_DoExternalInterface and Captivate_DoFSCommand but in the debugging window I can still see

Fri, 14 Jan 2011 11:23:58 GMT: LMSGetValue("cmi.core.score.min") - => 0
Fri, 14 Jan 2011 11:23:58 GMT: LMSGetValue("cmi.core.score.raw") - => 0
Fri, 14 Jan 2011 11:23:59 GMT: LMSSetValue("cmi.core.score.raw", "0") => 0
Fri, 14 Jan 2011 11:24:00 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Fri, 14 Jan 2011 11:24:00 GMT: LMSSetValue("cmi.core.lesson_location", "0") => 0
Fri, 14 Jan 2011 11:24:00 GMT: LMSSetValue("cmi.core.session_time", "00:00:05") => 0

What am I doing wrong?

Thanks a lot

rsug...@pivotpointelearning.com

unread,
Jan 14, 2011, 7:47:38 AM1/14/11
to elearning-technolo...@googlegroups.com

I’m not familiar with Moodle, but is it possible when Moodle launches content it is in a “player” that is performing SCORM duties?  Reason I ask this is I worked with a client’s customized version of SumTotal a while back and the custom version had a “player” for the content that handled SCORM duties.  The content, on its own, was not SCORM conformant but when launched through this “player” SCORM actions were performed.

--

image001.png

giorg

unread,
Jan 14, 2011, 8:29:41 AM1/14/11
to eLearning Technology and Development
On Jan 14, 1:47 pm, <rsuge...@pivotpointelearning.com> wrote:
> I'm not familiar with Moodle, but is it possible when Moodle launches
> content it is in a "player" that is performing SCORM duties?  Reason I ask
> this is I worked with a client's customized version of SumTotal a while back
> and the custom version had a "player" for the content that handled SCORM
> duties.  The content, on its own, was not SCORM conformant but when launched
> through this "player" SCORM actions were performed.

Hey,

actually moodle does have a player.php, but I did not have a look at
the code... so u confirm that those 2 functions are the interesting
ones?

Thank you

John Campbell

unread,
Jan 14, 2011, 9:22:41 AM1/14/11
to elearning-technolo...@googlegroups.com
There is a 3rd location you need to watch for.  I did work for a Captivate (not sure the version) client in December and for Firefox to work, I had to customize:

./SCORM_support/scorm_support.js

Look for the function "dataFromFlash".  They needed custom navigation to occur when cmi.completion_status was set, so I had to do something like this:

 if (strSCOfunction == "SetValue" && strSCOproperty == "cmi.completion_status" && varSCOvalue == "completed") {
        MyCustomCompletion();
 }

It has become very evident working with Captivate clients that there is a real problem doing anything other than single SCO or very simple multi-SCO (1.2 style) designs with Captivate.   The built-in SCORM support causes more trouble than it actually helps.  I'm now suggesting to clients that if possible, they completely disable any SCORM support that it provides and use JavaScript callouts at key events to trigger customized SCORM communications.  This is more the approach that Articulate takes.  Articulate is loosely coupled from the SCORM API, allowing greater ease of customization.  They are different tools for different purposes, but the latter took a more developer friendly approach to design.

It's too bad as Captivate is so widely used.  They really had a chance to further SCORM use and adoption, but have made it difficult for all.

jpc

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To post to this group, send email to elearning-technolo...@googlegroups.com.
To unsubscribe from this group, send email to elearning-technology-and...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elearning-technology-and-development?hl=en.



--
John Campbell
(713) 364-4323

rsug...@pivotpointelearning.com

unread,
Jan 14, 2011, 9:31:51 AM1/14/11
to elearning-technolo...@googlegroups.com

Not sure how interesting they are, just trying to come up with a reason for the SCORM calls being made while the DoExternalInterface/DoFSCommand functions are not in play (commented out).

 

One way to confirm my thoughts is to publish the Captivate project with eLearning (Quiz Reporting) NOT enabled.  Load it to Moodle and run it with the debugger.  This will ensure Captivate is not making any calls to SCORM.  See if you are getting any SCORM calls from the player.  If this is the case try to hook up with someone who knows Moodle better than I do.  It may be the “player” overrides SCORM calls made from Captivate, not sure.

 

It could also be in the settings you’re using when publishing the Captivate project, specifically the Report Status setting.  There are two choices 1) Complete/Incomplete or 2) Pass/Fail.  If it is set to Pass/Fail Captivate may not be trying to pass a call to set cmi.core.lesson_status to incomplete which is the only status where cmi.core.exit should be set to suspend.  A lesson_status of fail is still considered by SCORM and every LMS I have worked with to be what is usually called Complete – Failed Test by LMSs.  In other words the SCO is considered complete and there is no reason for cmi.core.exit to be set to suspend.

-----Original Message-----
From: elearning-technolo...@googlegroups.com [mailto:elearning-technolo...@googlegroups.com] On Behalf Of giorg
Sent: Friday, January 14, 2011 7:30 AM
To: eLearning Technology and Development

--

image001.png

Andrea Giorgini

unread,
Jan 14, 2011, 9:43:50 AM1/14/11
to elearning-technolo...@googlegroups.com
On 1/14/11 3:31 PM, rsug...@pivotpointelearning.com wrote:

Not sure how interesting they are, just trying to come up with a reason for the SCORM calls being made while the DoExternalInterface/DoFSCommand functions are not in play (commented out).

 

One way to confirm my thoughts is to publish the Captivate project with eLearning (Quiz Reporting) NOT enabled.  Load it to Moodle and run it with the debugger.  This will ensure Captivate is not making any calls to SCORM.  See if you are getting any SCORM calls from the player.  If this is the case try to hook up with someone who knows Moodle better than I do.  It may be the “player” overrides SCORM calls made from Captivate, not sure.

I will give this a try imediately :)

It could also be in the settings you’re using when publishing the Captivate project, specifically the Report Status setting.  There are two choices 1) Complete/Incomplete or 2) Pass/Fail.  If it is set to Pass/Fail Captivate may not be trying to pass a call to set cmi.core.lesson_status to incomplete which is the only status where cmi.core.exit should be set to suspend.  A lesson_status of fail is still considered by SCORM and every LMS I have worked with to be what is usually called Complete – Failed Test by LMSs.  In other words the SCO is considered complete and there is no reason for cmi.core.exit to be set to suspend.

about this I'm sure: the setting is complete/incomplete, and in the debug window cmi.core.lesson_status is set to incomplete.

@John: thanks for the tip, I tried adding:


strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');
CaptivateObj.SetScormVariable(strFSArg3, strErr);

at the end of that function, inside the if:

if(strSCOfunction == "LMSFinish" || strSCOfunction == "Terminate")

but still no way...

thanks you guys

John Campbell

unread,
Jan 14, 2011, 9:48:41 AM1/14/11
to elearning-technolo...@googlegroups.com
If you think the calls are coming from somewhere other than Captivate, then just replace your HTML file with a dummy one that has no Captivate object at all.  Just put some "Hello" HTML in there.

Launch it and watch your logs.  That will ensure that the API is not being called by your content (as it isn't in the picture).

jpc

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To post to this group, send email to elearning-technolo...@googlegroups.com.
To unsubscribe from this group, send email to elearning-technology-and...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elearning-technology-and-development?hl=en.

Andrea Giorgini

unread,
Jan 14, 2011, 10:08:04 AM1/14/11
to elearning-technolo...@googlegroups.com
On 1/14/11 3:48 PM, John Campbell wrote:
If you think the calls are coming from somewhere other than Captivate, then just replace your HTML file with a dummy one that has no Captivate object at all. �Just put some "Hello" HTML in there.

Launch it and watch your logs. �That will ensure that the API is not being called by your content (as it isn't in the picture).

Alright guys,

definitely those 2 functions are not used in my case, and in my opinion they are used only if the client uses IE. Indeed, I found a function that is definitely called by the scorm: Finish(), because if I take it off then the final commits are not sent to the LMS. Now, I added inside the function:


strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');
CaptivateObj.SetScormVariable(strFSArg3, strErr);

but nothing happens, so it must not be the right piece of code... Would be nice to have there something like Raymond suggested at the beginning:

if(strFSArg1 == �cmi.core.lesson_status� && strFSArg2 == �incomplete�)
� strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');

but now what's the right code?

Thanks a lot

Andrea

Andrea Giorgini

unread,
Jan 14, 2011, 11:02:52 AM1/14/11
to elearning-technolo...@googlegroups.com
Alright guys,

eventually I won. I write this here 'cause maybe somebody else in the
future will need it.

All I did was to add the following lines:

if (strSCOfunction == "LMSSetValue" && strSCOproperty ==
"cmi.core.lesson_status" && varSCOvalue == "incomplete")
{
g_objAPI.LMSSetValue("cmi.core.exit", "suspend");
}

inside the datafromflash() function within the scorm_support.js file,
right before

if(strSCOfunction == "LMSFinish" || strSCOfunction == "Terminate")

and it works like a charm.

Thank you very much for your support.

Andrea

John Campbell

unread,
Jan 14, 2011, 10:52:54 AM1/14/11
to elearning-technolo...@googlegroups.com
In Finish(), and anywhere in the JS code, you can just say:

g_objAPI.SetValue("cmi.whatever", "your value");

Though be careful.  There are times when you might not want to suspend.  You may need to put it in an if/then block and suspend based on certain criteria.

jpc


On Fri, Jan 14, 2011 at 9:08 AM, Andrea Giorgini <agi...@gmail.com> wrote:
On 1/14/11 3:48 PM, John Campbell wrote:
If you think the calls are coming from somewhere other than Captivate, then just replace your HTML file with a dummy one that has no Captivate object at all.  Just put some "Hello" HTML in there.

Launch it and watch your logs.  That will ensure that the API is not being called by your content (as it isn't in the picture).

Alright guys,

definitely those 2 functions are not used in my case, and in my opinion they are used only if the client uses IE. Indeed, I found a function that is definitely called by the scorm: Finish(), because if I take it off then the final commits are not sent to the LMS. Now, I added inside the function:


strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');
CaptivateObj.SetScormVariable(strFSArg3, strErr);

but nothing happens, so it must not be the right piece of code... Would be nice to have there something like Raymond suggested at the beginning:
if(strFSArg1 == “cmi.core.lesson_status” && strFSArg2 == “incomplete”)
  strErr = eval('g_objAPI.' + strFSCmd + '(\"cmi.core.exit\",\"suspend\");');

but now what's the right code?

Thanks a lot

Andrea

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To post to this group, send email to elearning-technolo...@googlegroups.com.
To unsubscribe from this group, send email to elearning-technology-and...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elearning-technology-and-development?hl=en.
Reply all
Reply to author
Forward
0 new messages