Captivate Widgets and suspend_data

276 views
Skip to first unread message

Ryan Meyer

unread,
Apr 16, 2012, 5:24:49 PM4/16/12
to elearning-technolo...@googlegroups.com
Hi all,
I've hunted around quite a bit through the lackluster Adobe documentation and forums and can't find any definitive answer to this.
I'm developing a custom Interactive Widget for Captivate 5.5 (using the excellent Widget Factory library here http://www.infosemantics.com.au/widgetfactory/info.)
I'm looking for a place in the Captivate widget (or Widget Factory) API where I can create and store custom properties that will make their way to suspend_data, so that they will be stored and recalled across SCORM sessions. It looks like user-defined Captivate Variables would do the trick, but I don't know what the variables will be beforehand (since it depends on the number of attempts), and I'd prefer to not have to have authors remember to define a variable every time they want to use the widget.
Thanks in advance for any advice!
-Ryan

Philip Hutchison

unread,
Apr 16, 2012, 7:01:09 PM4/16/12
to elearning-technolo...@googlegroups.com
Hi Ryan

I'm not sure about the widget API (contact Tristan Ward about that), but I *can* warn you about suspend_data -- Captivate uses it quite heavily, sometimes to the point of overflowing, so it isn't available for your use.

Whenever suspend_data is unavailable, I normally suggest using cmi.interactions as a workaround. However, Captivate also uses cmi.interactions, and since interactions are required be numbered sequentially (no skipping to interaction #9999), you'd probably gum up Captivate's use of cmi.interactions. 

So what's left?  If you're using SCORM 2004, you can use cmi.comments_from_learner (specifically cmi.comments_from_learner.n.comment), but you'll be limited to 4000 bytes of data (per comment) compared to cmi.suspend_data's 64,000 bytes in SCORM 2004. See the run-time details here.


- philip




-Ryan

--
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.

Ryan Meyer

unread,
Apr 16, 2012, 7:56:33 PM4/16/12
to elearning-technolo...@googlegroups.com
Thanks Philip. I'm assuming that user variables are stored in suspend_data, although I still need to actually verify that. I'd hope that Captivate doesn't take up 64KB of data on its own! Appending to suspend_data would definitely be ideal here.
I'll already be using interactions, so that's out of the picture anyway. Comments is a good thought. I know you've written about this before, but is there a "clean", approved, documented way of making SCORM calls from within Captivate assuming their default templates are used? Or is it just reverse engineer and hope for the best?
Thanks again,
Ryan

Philip Hutchison

unread,
Apr 16, 2012, 8:11:36 PM4/16/12
to elearning-technolo...@googlegroups.com
I believe Captivate uses a custom base64-encoded string for suspend_data; appending more onto the string might break it when Captivate tries to decode it.

If you want to make SCORM calls from inside Captivate, the safest way is probably using Captivate_DoExternalInterface -- it's a JavaScript function built into the SCORM template. Captivate uses it by default, and my revised templates also use it.

From within Captivate, invoke the following JavaScript:

Captivate_DoExternalInterface(command, parameter, value, variable)

Such as

Captivate_DoExternalInterface("SetValue", "cmi.score.raw", "100", "")

The "variable" argument is used for returning a 'success' value to Captivate. You can *probably* use an empty string here, but I haven't tested it.


- philip

Ryan Meyer

unread,
Apr 17, 2012, 5:13:59 PM4/17/12
to elearning-technolo...@googlegroups.com
In the case of GetValue calls, it appears that the Captivate_DoExternalInterface call passes the data back directly to an internally defined Captivate object that I don't have access to. Have you been able to use that call to pull data into your Actionscript class, or only to push data out?

It's looking like I may just have to write my own Javascript function to access their 'g_objAPI reference to the SCORM API, or bypass their stuff altogether and utilize something like your AS3/JS API to handle everything in my own code.

Thanks for all the help!
-Ryan

Philip Hutchison

unread,
Apr 17, 2012, 7:57:41 PM4/17/12
to elearning-technolo...@googlegroups.com
Ahh... right. If you want to retrieve GetValue data then pass it to a custom Captivate variable, you'll need to use JavaScript to get the value from the LMS (g_objAPI is the right method if you're using the built-in CP templates), then use JavaScript again to pass the retrieved string to a Captivate variable. I suggest using my CaptivateController JS utility to pass data to Captivate:  swf.set(param, value)
Reply all
Reply to author
Forward
0 new messages