Jan 13, 2009

I'm not yet Captivated by Lectora

I'm putting together a self-paced web-based training course for how to order textbooks using a PeopleSoft application. I'm using Lectora to develop a SCORM package that will eventually be imported and used in the LMS. The course will contain several simulations I am creating in Captivate 3.

So far I've found Lectora to be a good course development tool. There is definitely room for improvement but it is meeting my needs right now. The problem I am facing now is how to communicate with the flash objects I use in Lectora. Specifically, I want to find the status and grade that the flash application has assigned to the learner. I am trying to use some flash I've created in Articulate Quizmaker and Captivate. For now, I'm focusing on the Captivate integration.

Currently I see a few ways to integrate:

1) Use the e-mail command in Captivate and overwrite the JavaScript function for sending the mail to instead write out to variables I create in Lectora. See Topic: Captivate to Lectora Instructions on the Trivantis Community Forum. This looks very promising but is a hack and I'd prefer to avoid hacks if possible.

2) Use Javascript calls from within Captivate to write to variables in Lectora. This may be a better route but I'm still trying to get this to work. In theory it should be working but instead of writing to the variable, it is writing to the screen as a new HTML page. I know that sounds bazaar and I expect after a little more trial and error I'll have found out how to accomplish this.

3) Call a Javascript flash API from Lectora to pull the values out of the flash object. This is the preferred method because all the logic can stay in Lectora which is my main authoring tool.

There is some documentation that I can't seem to find that would help me in these tasks. For #2, it would be nice to have a Lectora developer's guide that would list what Javascript calls I can make. For example, unless you inspect the behind the scenes code, you won't know that Lectora attaches a "Var" prefix to its variables in Javascript. So, test1Score becomes Vartest1Score. These are important things to know! Also, apparently I there are calls to advanced to the next page, exit, and so forth. I need some documentation on this. Next step...contact Lectora Support.

For #3, I need a Captivate developer's guide that tells me how to extract variables out of a Captivate flash object from Javascript.

So, I've got some tasks ahead of me. Any advice is appreciated.

8 comments:

maxg said...
This comment has been removed by the author.
maxg said...

You'd have to capture the score variable name in Captivate in order to pass its value along to Lectora. I'm not sure how to do that. (Maybe export the Captivate project out to Flash?)

Lectora offers a mechansim to offload a variable value from Flash through a Lectora action. The .swf has to be accessible from the location to which you are adding the action (e.g. on the same Lectora page). From the action list, there will be available a "Flash Command" option. It will ask you for the target (the .swf), the command you want to execute ("Get Variable") and then the "Name" of the Flash variable, and the Lectora "Variable" you want to pass the value to.

(I'm using version 9 of Lectora, but I think the Flash Command predates 9 if you have an earlier version).

The Lectora javascript call to set a variable's value is Varname.set(value) ("name" being the variable's name and "value" the value you want to set it to). In Flash actionscript2 you can use a getURL() call to pass the value to the variable:

jString = "javascript.Varname.set(" + score + ");";
getUrl(jString);

(where "score" is the Flash variable's name.

I haven't tried actionscript3 yet.

If you use the getURL() call from Flash, you must have the Lectora variable accessible from the same page. I do this by sticking an "On Show" "Modify Variable" dummy action on the page itself (I set the variable to equal its own value).

tchowdhu@adobe.com said...

If your simulations and quizzes are from Captivate, why do you need to have Lectora as the aggregator?

Is there anything specific that you have in your course which prevents you from using Captivate all the way through?

However, if you want to get the integration question answered, please put in a post in teh Adobe Captivate user forums and someone will get back to you.

J. Shoaf said...

maxg: While I'm familiar with JavaScript, I'm new to flash programming. I'll look into the getURL method and actionscript. Thanks for the advice. I hope I can find out where the score variable is located in Captivate.

J. Shoaf said...

tchowdhu: Captivate does not have the flexibility Lectora does with regards to managing variables and actions. So I'm sticking with a combination of the two for now. I'll post my question on the Captivate forum...thanks for the suggestion.

Ashish said...

Captivate 4 offers lot more flexiblity in using Variables. For one, it is very easy to set and get the variables using Javascript. Try this -

var frames = document.Captivate.cpGetValue('rdinfoFrameCount');
alert(frames);

In addition, Captivate 4 brings the concept of User Variables. You can define the variable in Captivate and set it from Javascript.

Anonymous said...

The Captivate 4 demo below illustrates how you can collect user information before a quiz, use the user information to customize question feedback messages, display user information on a quiz completion certificate, use JavaScript to display quiz results and other information, and give the participant the option to post their quiz results to a database.

You can test to demo here (http://www.myshbp.com/captivate/cap4demo.htm).

Isaac

Anonymous said...

You might find the here
here interesting.

I have found there are some subtle differences between as2 and as3 using externalInterface. Lectora's variables have this weird scope and you have to references them (within Lectora) for Flash to access them sometimes. Oh well. The Flash / Lectora development nightmare continues...