SEE THIS POST FOR MORE DETAILS
and so on. One downside to this change – this system isn’t compatible with the Rev 1.0 version of the RTE where I’ve used the full SCORM data element names in the SCORMvars database table. But I’ll cross that hurdle when (if) I have to. So this is what my cache code – empty at present – will look like in the api.php file.
Finally, here’s a regular expression that will change variable names from their SCORM format to the format that I’m going to use internally – firstly in PHP:
$jvarname = preg_replace('/[^a-z]/','_',$varname);
var jvarname = varname.replace('/[^a-z]/g','_');
I’ll probably need both of these when I start (re-)coding the API calls, and the server-side code. I’m not going to provide a tutorial on regular expressions, but here are some references that might get you started if you don’t already know how regular expressions work:
Next time – modifying the LMSSetValue() and LMSGetValue() API calls to interact with the cache.