-
1. Re: communication with lmsAPI scorm variables
ziofonta222 Aug 19, 2014 5:35 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 corresponting 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).
Hope this can help.
