Skip to content

Commit

Permalink
SCORM 2004 MDL-18756 - only return previous datamodel elements on re-…
Browse files Browse the repository at this point in the history
…launch if cmi.exit is set to "suspend"
  • Loading branch information
danmarsden committed Nov 10, 2010
1 parent 5649386 commit c557816
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod/scorm/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
require_login($course->id, false, $cm);

if ($usertrack = scorm_get_tracks($scoid,$USER->id,$attempt)) {
if ((isset($usertrack->{'cmi.exit'}) && ($usertrack->{'cmi.exit'} != 'time-out')) || ($scorm->version != "SCORM_1.3")) {
//according to SCORM 2004 spec(RTE V1, 4.2.8), only cmi.exit==suspend should allow previous datamodel elements on re-launch
if ($scorm->version != "SCORM_1.3" || (isset($usertrack->{'cmi.exit'}) && ($usertrack->{'cmi.exit'} == 'suspend'))) {
foreach ($usertrack as $key => $value) {
$userdata->$key = addslashes_js($value);
}
Expand Down

0 comments on commit c557816

Please sign in to comment.