-
1. Re: Captivate functions to communicate with LMS api
Lilybiri Jul 22, 2014 8:12 AM (in response to ziofonta222)Which version of CP?
-
2. Re: Captivate functions to communicate with LMS api
ziofonta222 Jul 22, 2014 8:43 AM (in response to Lilybiri)I'm using Captivate 7, i have upgraded to Captivate 8 a couple of day ago, so the answer is "Captivate 8" thanks
-
3. Re: Captivate functions to communicate with LMS api
ziofonta222 Jul 25, 2014 5:22 PM (in response to ziofonta222)So, nobody here can advice me in one direction for some documentation on javascript to read/write data between Captivate and LMS using Scorm 1.2 data model?
-
4. Re: Captivate functions to communicate with LMS api
ziofonta222 Aug 19, 2014 5:42 PM (in response to ziofonta222)answring to myself, i found this useful reference for using Javascript in Captivate.
http://helpx.adobe.com/captivate/using/common-js-interface.html
after different tryouts, i also found that native scorm functions are defined into scormdriver.js (published into the scorm package) and examining that file you can find the way to achieve several operations on scorm variables.
Those functions can be called into the javascript window (by executing javascript command using an advanced action) as they are defined inside the scormdriver.js.
Example:
SetObjectiveScore("id1", 20, 30, 0);
will behave as it is supposed by scorm data model specification, for a scorm 1.2 package it will do the following on the LMS (just tested on Moodle):
LMSSetValue("cmi.objectives_0.id", "id1")
LMSSetValue("cmi.objectives_0.score.raw", "20")
LMSSetValue("cmi.objectives_0.score.max", "30")
LMSSetValue("cmi.objectives_0.score.min", "0")
all those Captivate lms native functions are evaluated so that, depending on the scorm version you are publishing, they are automatically translated to fix the appropriate syntax for the corresponding scorm data model (there are some differences betweeb scorm 1.2 and scorm 2004 when setting some parameters, and also scorm 2004 have more variables available).
In Captivate 8 there is no need to distinguish between swf and html5 content when you need to use Javascript to refer to user-defined variables, while for prior version you need to set your Javascript with conditional check as in the linked example:
Display the Student's Name From Your LMS Using Adobe Captivate 6.x - CaptivateDev.com
the following syntax is used to set a variable in Captivate 8 (finally, one simple syntax!)
window.cpAPIInterface.setVariableValue("user-defined-variable-name", value);
hope this can help!


