Hi Dan, Thanks as ever for your constructive feedback. You raise some interesting points in your Blog, I didn't realise how much of Moodles relationship with SCORM is down to yourself and your team.
I have made some inroads into creating a Patch and am happy to keep working on it myself but I just have a final question, if I may??
I've found the report that I want to edit is in mod/scorm/report/userreporttracks.php and this is pulling information from the mdl_scorm_scoes_track table in the moodle database. What I cant figure out though is how to edit/remove some of the fields displayed on the report to cut away the "rubbish" leaving just the core information I want in my report:
1) what was the question text (cmi.interactions.n.description)
2) what was the students response (cmi.interactions.n.learner_response)
3) what was the correct answer (cmi.interactions.n.correct_responses.n.pattern)
4) is the answer given correct (cmi.interactions.n.result)
Around Line100 seems to be where the action is, with some very promising script that looks like this:
foreach ($trackdata as $element => $value) {
if (substr($element, 0, 3) == 'cmi') {
$existelements = true;
$row = array();
$string = false;
if (stristr($element, '.id') !== false) {
$string = "trackid";
} else if (stristr($element, '.result') !== false) {
$string = "trackresult";
} else if (stristr($element, '.student_response') !== false or // SCORM 1.2 value.
stristr($element, '.learner_response') !== false) { // SCORM 2004 value.
$string = "trackresponse";
} else if (stristr($element, '.type') !== false) {
$string = "tracktype";
} else if (stristr($element, '.weighting') !== false) {
$string = "trackweight";
} else if (stristr($element, '.time') !== false) {
$string = "tracktime";
} else if (stristr($element, '.correct_responses._count') !== false) {
$string = "trackcorrectcount";
} else if (stristr($element, '.score.min') !== false) {
$string = "trackscoremin";
} else if (stristr($element, '.score.max') !== false) {
$string = "trackscoremax";
} else if (stristr($element, '.score.raw') !== false) {
$string = "trackscoreraw";
} else if (stristr($element, '.latency') !== false) {
$string = "tracklatency";
} else if (stristr($element, '.pattern') !== false) {
$string = "trackpattern";
} else if (stristr($element, '.suspend_data') !== false) {
$string = "tracksuspenddata";
}
However whenever I try to delete any of those entries it does not affect the report one jot (unless I delete this:
if (stristr($element, '.id') !== false) {
$string = "trackid";
}
which breaks the report entirely. Can you figure out where I am going wrong???
Thanks again for your help, hopefully I will have something very useful to contribute back to the community shortly.
John