Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Storing Captivate Test Scores in a Database

Guest
Nov 08, 2007 Nov 08, 2007
I've been tasked with capturing data (the quiz results) from Captivate 2 in a database. I've tinkered around with exporting the course for SCORM 1.2 and 2004 and modifying the wrapper, but since I don't have a proper API in place, it's not communicating the data. If anyone knows how to "hotwire" it to send an xmlhttprequest (or just get the scores into plain ol' javascript), that would be fantastic.

I've already looked at the dev article ( http://www.adobe.com/devnet/captivate/articles/store_cpresults.html) for intercepting the data as it's sent via the email function.

This would be perfectly fine except that the user has to click a button to submit the results. I'm not sure how to have captivate trigger the email function when the results slide loads.

Another route I thought about taking would be to use Captivate's "Execute Javascript" under "Project end options." This would be ideal, but I don't know what variable names to use to send the user's score. This would be a cleaner way than grabbing the data from the send email function, but I'll go with whatever works.

I'd appreciate any help with capturing the quiz scores as I'm now getting desperate for some sort of acceptable solution.

Thanks!


-edit-

It looks like _percentCorrect is the variable I want to use from Flash, but I'm not sure how to get it out of ActionScript and into Javascript. It seems to escape quotes. If I do alert("hi");, it'll pop up an alert box with "hi" in it.

If I do alert(_percentCorrect);, it throws an error like you might expect. I was hoping that I could do something along the lines of alert("+_percentCorrect+");, but that just alerts the text "+_percentCorrect+". (same with single quotes)

TOPICS
Quizzing and LMS
6.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 08, 2007 Nov 08, 2007
I think I may be on to something.

If captivate won't give up the variable willingly, then I can always steal it. I'm working on a swf to "wrap" the captivate file in that will snatch the score up once it's calculated. I'm not sure if this'll work, but it seems to be the most promising idea I've had thus far.

I can access the test score like this:
container.slide X_scoring_mc._scoreDisplay._percentCorrect

The only problem is the "X" part. That's the slide number that the test is located on (w...
Translate
Advocate ,
Nov 08, 2007 Nov 08, 2007
Hi Keith and welcome to the forums!

Captivate's internal variables are not documented, so your best best is to go with the approach outlined in the Developer Center article.

As shown in the article, the scores are already available in Javascript when using the "Send E-mail" reporting option. They're stored in the gstrEmailBody variable. Tim's article even strips those values out and drops them into a form to be submitted a page that stores the data in the database.

You just need to replace the reference to 'insert.cfm' on page 3 of Tim's article to the name of your own page that stores the results in your database with your field and table names.

As for having the results sent automatically, you'd then only need to do an Execute Javascript of:

sendMail();

As for where to put the call, you'd probably be better off adding a brief (0.1 seconds) page AFTER the results slide and put the Execute Javascript call there... this allows you to use the Project End option to close the window, which is a best practice.

I'd also add a global "sent" flag to the sendMail() function to ensure that results are only submitted once (assuming some people actually use the Send E-Mail button), but otherwise Tim's article can be used pretty much as-is.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 08, 2007 Nov 08, 2007
Thanks for the reply!

'As shown in the article, the scores are already available in Javascript when using the "Send E-mail" reporting option. They're stored in the gstrEmailBody variable.'

As best as I can tell, here's what happens when you click the "send email" button:

Captivate populates document.emailForm.Results (the hidden HTML form on the page).
The sendMail function is then called to grab the data from the form and then send it via email.

If I click the "send email" button, this works properly. I can alert(gstrEmailBody) and get the information that I need. However, if I don't press the button and use the sendMail() function (called from "Execute Javascript" under "Project end options"), Captivate doesn't populate the HTML form and therefore sends a blank email.

Is there any way to either:
Trick Captivate into thinking that the Send Email button has been pressed (therefore filling in the "Results" form element).
-or-
Somehow feed in the results data from captivate directly into javascript (or anything else I can grab the data with)?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2007 Nov 21, 2007
Hi Keith,

This is something that I have seen a lot. If you have the time would you mind reporting this as a bug using the Adobe Captivate Feature Request/Bug Report Form ? This is something that the Adobe Captivate team really need to address once and for all.

Regards - Mark
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 08, 2007 Nov 08, 2007
The assumption is that you've followed all the steps through page 3 of Tim's article.

Page 3 is where he creates a replacement sendMail() function that overrides the default Captivate functionality. Instead of populating the default form, his code pulls out the results information and creates a popup window that kicks off the custom submission process.

You don't necessarily need to use a popup window, but doing so avoids potential issues with custom inter-project navigation.

I'm not aware of any way to hack into Captivate's tracking mechanisms, since the internal workings are not exposed or documented anywhere outside of some basic navigation variables you can set (search the Captivate Help file for 'variables' and you'll see what's available).

The best approach I've seen is to assume the user didn't click the Send E-mail button and include a dedicated Execute Javascript call to sendMail(), but make the function only submits the results once just in case.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 08, 2007 Nov 08, 2007
Ah.. okay. It looks like I was mistaken about the order Captivate does things in. I was thinking that Captivate populated the form and Javascript got the values from it.

The problem still remains, though. If I simply call sendMail() from the captivate slide, it sends gstrEmailBody as a null value. However, if I click on the Send Email button, it sends the data as it should. I'm thinking that captivate has some actionscript associated with the button besides just calling the function -- something that "packages" it for emailing.

If I alert(htmlString); when clicking the button (with the function from the dev article), then it has all of the data that I need. If I do the same thing from my own sendMail() call from Captivate, it still generates the HTML output, but the variables are null (it'll have something like Raw Score = NaN rather than the proper value).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 08, 2007 Nov 08, 2007
Keith, sorry for the misunderstanding on my part.

I did a quick test and it seems that you are indeed correct. The special sauce *does* seem to be applied only when the Send E-mail button is clicked.

That definitely limits the usefulness of the approach unless we can tap into the variables and/or functions Captivate uses internally to manage the results data...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 08, 2007 Nov 08, 2007
I think I may be on to something.

If captivate won't give up the variable willingly, then I can always steal it. I'm working on a swf to "wrap" the captivate file in that will snatch the score up once it's calculated. I'm not sure if this'll work, but it seems to be the most promising idea I've had thus far.

I can access the test score like this:
container.slide X_scoring_mc._scoreDisplay._percentCorrect

The only problem is the "X" part. That's the slide number that the test is located on (which oddly enough seems to be one slide less than Captivate says it is. I guess the swf starts counting at 0 and Captivate starts at 1).

If I can figure out some way to detect which slide the quiz review is on, then I think I'm home free. If I can get the variable out of the captivate SWF and into my own, then I can pass it to javascript in a sane way.

-edit-

WOOHOO! Wrapping the captivate SWF in my own worked like a charm. I have it passing the score to a javascript function aptly named catch_score();

Here's the actionscript I used incase someone else has to do this (it's not the prettiest, but at least it works =P) --

//Frame 1:
if (file==undefined) {file="lesson.swf";}
//this way the file can be set by passing it into the swf from HTML
loadMovie(file,"container");


//Frame 5:
for (x=0;x<_level0.container.rdinfoSlidesInProject;x++){
if (eval("_level0.container.slide"+x+"_scoring_mc._scoreDisplay._percentCorrect")!=undefined) {
score = eval("_level0.container.slide"+x+"_scoring_mc._scoreDisplay._percentCorrect");
getURL("javascript:catch_score('"+score+"');", "_self");
gotoAndStop(6);//just to stop wasting CPU with this nasty script.
}
}

//Frame 10:
gotoAndPlay(5);
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 20, 2007 Nov 20, 2007
I'm using Captivate to create quizzes that my ASP.NET developer needs to integrate with my website database. I want the database to keep track of user results, points earned, etc...I'm not using any specific Learning Management System. Do you know of any websites or books that help explain how to do this?
thanks! ~ Mike
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2007 Nov 20, 2007
Hi Mike and welcome to our community

Near the beginning of this thread is a link that points to an article on the Adobe Developer Center. Did you miss it? I believe the link provided in this thread offers what you are seeking.

Cheers... Rick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2007 Nov 20, 2007
Sorry, duplicate post due to forum issues.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 20, 2007 Nov 20, 2007
I couldn't find that article. I think it has moved or been removed. Any ideas?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2007 Nov 20, 2007
Hi again

Yeah, looks like whoever created that link created it wrong and included a closing parenthesis. Try the one below:

Click here

Note for the future. If you have your browser address bar showing, you can usually see things like that.

Cheers... Rick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 20, 2007 Nov 20, 2007
I read through the article and passed it on to my developer. I'm not sure it will help him though.

Do you know of any websites that specifically address using Captivate to poplate online databases? Should I post this question as a seperate forum question?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 20, 2007 Nov 20, 2007
Sending Captivate results to an arbitrary database is not a supported activity, so I doubt you'll have any better luck posting a separate question.

The only known ways to make it work are listed in this thread: either by hacking into Captivate's e-mail functionality to make it do your bidding (as shown in the Dev Center article), or by reading the internal variables Captivate uses, as Keith does in the post above.

If a light doesn't come on for your developer after they've read the Dev Center article and/or looked through Keith's code above, you're probably out of luck. Or, you need a new developer.

The e-mail approach is actually fairly simple to modify for your own use... any decent web developer should easily be able to accept the passed variables (passed via the popup form page built by the Javascript code on page 3 of Tim's Dev Center article) and then write that data to a database of your choosing.

The hard part is having access to your individual server environment to obtain the correct database DSN, know what methods are available for accessing the database, create the necessary database tables/fields/stored procedures/etc.

**** Edit ****

Removed comment about needing to use Captivate 3 to be able to customize the Submit button. In digging around on an unrelated issue, I found that you can change the caption of the E-mail submit button in Captivate 2 as well:

Quiz Manager | Quiz Settings tab | Quiz Result Messages button | Email button text

Best of luck!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2007 Nov 21, 2007
Adobe Captivate team needs to provide an update or a patch to allow captivate to expose its much needed internal variables to developers.
Until then Captivate will never be a full size eLearning development tool.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2007 Nov 21, 2007
I still can't understand why it's so hard to find information that helps explain what to do with Captivate quiz results?? I'm pushing 6 hours of looking, calling, emailing people. Is populating to a database that rare and difficult to do? Granted, I don't konw much about SCORM, Adobe Enterprise, and LMS in general, but there has to be some help available somewhere??

If Adobe markets Quiz integration (especially to educators like me) then why do they assume everyone knows what to do with the results? I'm a pretty resourceful librarian, but I feel stumped at finding information 😞 Please help me if you can.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2007 Nov 21, 2007
I know the frustration Mike.
It seems that Captivate doesnt really have much "how to" information or online support.
Adobe give you a help file that is worthless in terms of sample code.
I`m not even sure you get a user manual with the software.

I have used Authorware for the past two years and it is an excellent package.
But since Adobe decided to kill Macromedia's Authorware in hope of pushing their offering of Captivate.
Captivate is still an infant and does not have the power of Authorware.
I have to use captivate on this clients project, instead of Authorware.

The client refuses to use Authorware (because it is no longer supported by Adobe), but still expects to get the same eLearning results that Authorware provides.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2007 Nov 21, 2007
Thanks BurTech. To me, when any form of training occurs, whether it's electronic or in real life, without effective use of assessment, there is no true way of evaluating whether or not the student has learned. I'd imagine this woud be in the forfront of any ID or educator who uses Captivate. (unless they just like the bells and whistles of Captivate and don't care about assessment).

Since you're required to use Captivate, what will you do with your clients quiz results?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 21, 2007 Nov 21, 2007
Mr Mike,

To answer your question, yes, populating Captivate-generated results to a custom database *is* that rare and difficult to do. Captivate was never designed to do what you're asking, so I'm not surprised you're finding it hard going.

Captivate supports a number of e-Learning industry standards, including SCORM, AICC as well as Adobe's own Connect Enterprise product. Granted, that support can be somewhat flaky depending on the LMS you choose and is very poorly documented on Adobe's part, but at least you have a right to expect it to work since it's a heavily promoted feature.

That said, are you looking for SCORM/LMS resources or are you still wanting to integrate Captivate quizzes with a custom backend solution?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2007 Nov 21, 2007
The captivate course I`m working on right now is a strange beast.
The course has to work across different domains
The Plateau LMS is seperate from the content server, so I`m using an asp proxy.
Captivate doesn't retrive any user data from the LMS so I have created a custom js file to access the AICC code via the proxy.

I keep track of the slides the user completes and update the LMS when needed
I use the email feature of Captivate, but I trap the gstrEmailBody variable.
Strip out what I need and send the score and other data to the LMS via the proxy.

My other issue I have with captivate is that the user has to start at the beginning everytime they enter the course.
Why should a user have to go thru 49 slides just to get to slide 50 where they left off, or retake a quiz they already took and passed just to get to the slide 50.

Have you taken a look at another product called Articulate.
Its a good eLearning product, but if you have to meet accessibilty or 508 requirments, dont waste your time using it.
If I didnt have to meet those requirments myself, I would be using Articulate instead of Captivate.



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2007 Nov 21, 2007
Hi jbradley88,
yes, I'd still like to impliment data from Captivate into a backend database. My ASP.NET based website will consist of hundreds of interactive quizzes. The goal is for thousands of users to (simultaniously) earn points as they pass these quizzes.

I love the quiz features of Captivate as well as how it can easily impliment Flash based eye candy that my users (kids) will love. We just need toprocess the quiz results to our database - all in a secure and efficient mannor.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2007 Nov 21, 2007
Hi BurTech,
I was told that using the email feaure would not be as secure and efficient. Perhaps it's an issue when I have thousands of simultanious users??? It seems like Captivate is meant to communicate with a premade LMS and not just a database??? Not to say that it's impossible though. I took a peek at Articulate. It looks GREAT, but it seems like I'll have the same issue of not knowin how to process the quiz reults??
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2007 Nov 21, 2007
You would only be passing the quiz score or percent correct and maybe some identifying marker of the user.
Doesnt matter if its the email feature or if captivate could talk to your database.
Data still has to be transfered over the wide open internet.

Once the captivate swf loads, the only data transfered back to the server would be what you send it via a script of some sort.
If your web server can't handle a few kb of data transfered back from thousands of simultanious users, getting the quiz score is the least of your problems.


quote:

Originally posted by: Mr_Mike_M
Hi BurTech,
I was told that using the email feaure would not be as secure and efficient. Perhaps it's an issue when I have thousands of simultanious users??? It seems like Captivate is meant to communicate with a premade LMS and not just a database??? Not to say that it's impossible though. I took a peek at Articulate. It looks GREAT, but it seems like I'll have the same issue of not knowin how to process the quiz reults??


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2007 Nov 21, 2007
Mike, it shouldnt be hard to implement the capture of the quiz score and insert it into a database.
Since it is ASP.NET, have the developer create an template that will capture the gstrEmailBody data value with javascript and use ajax to call a seperate webservice componant or another asp.net script to perform the database insert.

By using ajax or a webservice, the data transfer can be quick and transparent to the user. Plus with ASP.NET you won't need a web page refresh for any of this to happen behind the scenes.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources