Copy link to clipboard
Copied
Hello,
I am trying to find a better way to pass Captivate Variables across to a php file in order to save quiz results to a MySQL database.
The best way I can achieve this right now is using a widget which allows me to pass variables via a button to a php url.
If anyone knows of a better way to possibly analyize the $_POST data of Captivate's email function and store it to a database (such as http://wheatblog.com/2010/01/cp2db-adobe-captivate-quiz-reporting-with-phpmysql-version-2/) but will work with all question types, please let me know.
Or if anyone knows of a method of capturing Captivate Variables and storing to a MySQL database completly by using Javascript please let me know!
My current method will work, but I'd like to improve on it. Also, something like this: http://stackoverflow.com/questions/1092908/passing-captivate-parameters/1644011#1644011 might be a better method of passing the variables to my php script as I could then execute the javascript on slide entry/exit instead of requiring the use of a button, however I cannot seem to get it to work (as my Javascript skills are somewhat lacking!). Does anyone know how I could get this example to work? Where do I place that Javascript code and how to I envoke it from within Captivate?
Any help is appreciated! Thank you!
Copy link to clipboard
Copied
Nothing? Captivate is great software, but really aweful when it comes to reporting your quiz results (unless you use other Adobe software like Connect, etc) and I'd rather use my own custom code then something like Moodle or whatever.
Copy link to clipboard
Copied
Hi there
If you have Captivate 5 or newer, have you explored the Internal Server reporting? Adobe supplies a PHP script you may use to collect and process the results.
Cheers... Rick ![]()
| Helpful and Handy Links Captivate Wish Form/Bug Reporting Form |
Copy link to clipboard
Copied
Yes, but it too requires the use of Adobe software to view results (Adobe Captivate Quiz Results Analyzer) and I'm looking to store my results to a database rather than an xml file.
Knowing how to pass variables used within a Captivate presentation to the actual HTML file would be a huge help, and setting variables within the HTML file to use within a captivate Presentation would also be benificial, but I just can't seem to get a straightforward response on how to achieve this, especially one that makes sence given my limited experience with Javascript.
Thanks
Copy link to clipboard
Copied
Ryan,
I am dealing with this very issue right this moment--how fortuitous of timing.
Because of the complex nature of my client's scoring needs for this assessment for a current project, I have decided to do my scoring in a PHP script instead of within Captivate--in fact, I am completing abandoning Captivate's quiz slides. I am storing all results in a MySQL database.
I started out using the GET method with URL parameters (probably using the same widget you mentioned) but am having concerns with duplicate calls from proxy servers and some security concerns with this approach.
I am planning on doing something along the lines of AJAX doing a POST call on my PHP script.
Take a look at this: http://captivatedev.com/2009/12/19/storing-adobe-captivate-4-quiz-results-using-asp-net/
You said that you wanted to accomplish it exclusively with JavaScript, but what do you plan on doing on the server side (PHP/ASP)?
Copy link to clipboard
Copied
No, I would actually prefer to stick with PHP entirely but though maybe using a Javascript method of grabbing quiz results and variables might be more secure than using the GET method which I am currently using with that widget you speak of.
It's really funny you mention that link, because I've spoke with the author (Jim Leichliter) via email and he suggested the same thing; However, that example is far more complex than any type of coding I am used to and I had a really hard time trying to decipher it and make it work with my limited php and sql knowledge, so I kind of gave up on it.
But if you know how to make it work with Ajax doing a POST call on the PHP, then please I would love to hear your ideas!
I'm struggling trying to figure out a more secure way of doing things that I currently am, but will make it work if it's my best (any only) option for the time being.
I'm also trying to figure out a way to bring variables INTO my Captivate presentation, so that I can use a php-based login where the username is passed to the Presentation file to be displayed after logging in successfully, but am struggling with this at the moment as well!
I'll keep you posted if I managed to figure out a better solution to these issues, and hope you might do the same! Best of luck to us both!
Copy link to clipboard
Copied
I plan on coding my solution in the next couple of days (have been preoccupied by other issues on the project) and I will let you know what I come up with. It sounds like we're essentially in the same boat.
Copy link to clipboard
Copied
I've made some huge strides in getting things to work the way I want to: passing variables INTO Captivate on runtime, grabbing variables FROM Captivate and passing to PHP via Javascript and POST method, and some other cool stuff.
It's all thanks to the use of The CaptivateController by pipwerks -> http://pipwerks.com/2009/06/07/introducing-the-captivatecontroller/ who just recently updated this awesome javascript utility to allow for setting variables, which helped resolved one of my major hurdles, but also allows you to easily grab variables as well. And with a bit of patience and persistance, I've managed to incorporate it exactly how I was looking to do what I needed. I've gotten a little better at understaing how Javascript works in the process as well, which is really one of the major problems I was having, but after putting a few long days into this I am now a lot more comfortable in getting it to do what I need it to. I hope this wonderful utility will help others out there looking to do something similar to what I am trying to achieve.
Copy link to clipboard
Copied
That's good news Ryan.
Might I suggest that once your solution is complete you post a blog about it or even a longish post here to explain how you did it? That would certainly be of interest to other Adobe Captivate users seeking to achieve the same result.
If you don't currently have a blog of your own where you can post your information, I would be happy to have you as a guest blogger on my own site, www.infosemantics.com.au I've done this on other occasions when Captivate developers came up with something really useful that might have been too longwinded to explain in a typical forum post here. For example, Trihan wrote this tutorial for me about using JavaScript in Captivate.
Copy link to clipboard
Copied
Hi Ryan,
I am just trying to do exactly the same you wanted to do , send the cativate variables a a php script to store de quiz data in a databes but i am struggling with same things JS and how to send those variables ..
Please can you help me with this, i will be very apreciated!
Carlos
Copy link to clipboard
Copied
I'm also trying to do this. I'd like to make a complex CBT that allows people to log in and information is displayed dynamically based on their login.
We can't controll the user progress in our LMS, because of it's limited functionality.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more