With changes to (version 1.9.2+), this is a dirty hack for showing suspend_data. I would be glad to have a "cleaner" one. Working: it adds a $u variabele passing the user to the SCORM module. Giving a user ID shows the SCORM module as the user left it last. This is added to a results link on the report page.
loadSCO.php
api.php
player.php
report.php
locallib.php
/datamodels/scorm_12.js.php
1. loadSCO.php
$u parameter added
8: $u = optional_param('u', $USER->id, PARAM_INT); // user ID
59, 62 not $USER->id but only $u
2. api.php
$u parameter added
11: $u = optional_param('u', $USER->id, PARAM_INT); // user ID
39 not $USER->id but only $u
3. player.php
$u parameter added
(around 17): $u = optional_param('u', $USER->id, PARAM_INT); // user ID
(around 108): $userstr = '&u='.$u;
(after $orgstr = '¤torg='.$currentorg
(around 130): <script language="JavaScript" type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstr.$modestr.$attemptstr.$userstr ?>"></script>
should become
<script language="JavaScript" type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstr.$modestr.$attemptstr.$userstr ?>"></script>
And also all calls to api.php and loadSCO.php could get an extra .$userstr
To see whose data you are looking at:
148:
<?php
$userdata = scorm_get_user_data($u);
echo 'You are looking at the data of '.$userdata->firstname.' '.$userdata->lastname;
?>
4. report.php
Below $row[]=$detailslink
$row[] = '<a href="player.php?a='.$scorm->id.'&u='.$user.'&scoid='.$sco->id.'">Results</a>';
so a link to the data is added.
5. /datamodels/scorm_12.js.php
In SCORM 1.2 the math applets are problematic because of the 4096 bytes limit for the suspendstate. This could be enlarged by
adding 21: CMIString8192 = '^.{0,8192}$';
72: 'cmi.suspend_data':{'defaultvalue':'<?php echo isset($userdata->{'cmi.suspend_data'})?$userdata->{'cmi.suspend_data'}:'' ?>', 'format':CMIString8192, 'mod':'rw', 'writeerror':'405'},
Version 6.1.9.1 of Hot Potatoes adds SCORM 1.2 support. According to Martin Holmes (in discussion http://moodle.org/mod/forum/discuss.php?d=62388#281850) "The exercises now report detailed information on each item (where there are multiple items, ... along with details of what responses the student made, both incorrect and correct." Getting this functionality to work under Moodle will require changes to the SCORM module of the kind described above.