0

Is it possible for Captivate 6 to exchange data with a PHP script via POST/GET while maintaining our ability to package our module into SCORM? Our module needs to exchange data from the user and send to our server farm for some computational-heavy calculations, which are then used in the module to modify the information displayed to the user. This is independent of the SCORM functionality.

I have seen a few examples where people have set the reporting options of their module to "email" (as opposed to SCORM) and then modified the email reporting javascript functions provided by Captivate to send data via GET/POST using XMLHttpRequest. In our case this will not work because I still need to do my reporting via SCORM. However, I also need to access some server side resources on our web server to drive the Captivate presentation.

Any ideas?

ЯegDwight
  • 24,821
  • 10
  • 45
  • 52
carlos
  • 1
  • 1

1 Answers1

1

You can get/set variables in Captivate using JavaScript.

  1. Extract data from Captivate using JavaScript (my open-source CaptivateController utility is designed to make this easy).
  2. Pass the data to your PHP page using xmlhttprequest (aka AJAX). *
  3. Send any return values to Captivate using JavaScript (again, the CaptivateController makes this easy).

Then do whatever you wish with the data inside Captivate.

This is all independent of SCORM. Bear in mind that a true SCORM package does not rely on an external PHP script, but there is no technical reason why it wouldn't work.

* Watch out for cross-domain scripting issues when trying to pass the data from your course to your PHP file and back. If you run into problems, search StackOverflow -- there are plenty of StackOverflow posts covering cross-domain scripting issues.

pipwerks
  • 4,440
  • 1
  • 20
  • 24