Testing interactions in Dokeos SCORM tool
Because one of the most complicated tools in Dokeos is the SCORM tool (found in dokeos/main/newscorm/ ), and because I am currently checking the inner-workings of the interactions inside this tool (Dokeos version 1.8.5), I thought it would be good to write down, once and for all, how I actually check whether the tool is right or wrong, and whether the content is actually the culprit or not.
Getting the right tools
Getting Firebug installed in Firefox is easy (download and restart Firefox), and activating it for your current Dokeos portal is just a matter of clicking the little cockroach icon in the bottom-right corner of your browser and choosing to activate the “Script” feature.
Setting the breakpoints
So what we want is to put some logging (huh… some breakpoints, sorry) on the interactions case in LMSSetValue(), that is around line 372.
Setting a breakpoint on the line:
if(myres = param.match(/cmi.interactions.(\d+).(id|time|type|correct_responses|weighting|student_response|result|latency)(.*)/))
will have the great benefit of showing us if a call to set an interaction goes through, and at the same time of giving us some information on what information the call bears (we get to analyse the param variable here).
Let’s have a look…
Now of course, you will need a SCORM content that sends interactions to try this out, and you’ll need to be sure it actually sends interactions (otherwise your test is pretty much useless).
Now trigger some interactions recording, and see what Firebug shows in its rightmost frame. You should see variables and their values appear there. Do they use the right parameters names? (there is a list of recognized parameters in the scorm_api.php script, line 372 – quoted above)
If you want to go to the next step, simply click the green “play” triangle.
In my case, the problem I found was that the setting of interactions actually started at interaction ID 1, whereas the setting of interactions should start at “0”. It could be argued that Dokeos, to avoid errors in this case, should prefill all the interactions between 0 (included) and the given interaction ID, and I think this is the way to go. I will check in the SCORM documentation first to make sure this is an option.