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
The elementary tools for these tests are Firefox (I recommend version 3 for its better handling of JavaScript debugging) and its excellent Javascript debugging extension by Joe Hewitt: Firebug. 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
Now that you have the right tools all setup, you need to go inside a SCORM learning path inside Dokeos, then select the script you actually want to check. This is done through the "Script" tab in the Firebug window, and picking the right script. You need to pick "scorm_api.php" here, because although it ends with a ".php" extension, it is actually a dynamically created JavaScript script. Furthermore, it is the SCORM API, so this is where all messages from the SCORM content are passed to Dokeos. What you want to do now is to set breakpoints, where the JavaScript will halt, report on the current status of a few variables, and ask you to confirm that you want to go on before doing anything else. In this case, we want to test SCORM interactions, so what we're interested in here is how the SCORM content sets and gets interactions-related variables through the JavaScript code. There are only one getter and one setter in the SCORM API. Namely, LMSGetValue() (around line 127) and LMSSetValue() (around line 323). Because interactions are things that are only written (and never queried), what we're most interested in is the LMSSetValue() part. That is, if you want to put a breakpoint on interactions in LMSGetValue(), you will find there are only two related calls: one for cmi.interactions._count and one for cmi.interactions._children. You can put a breakpoint on these two cases but it is likely that will not help you much. 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...
Comments
[...] 1.2 and the interaction index in Dokeos Extending a little bit on my latest post about howto test SCORM interactions in Dokeos, I’d like to add an important piece of information about our implementation of the SCORM 1.2 [...]