Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SCORM MDL-24217 correct handling of suspend icon and fix SCORM 2004 u…

…sage of cmi.core.exit - thanks to Valerian for report/fix
  • Loading branch information...
commit 67e13a8014d92e8a68277e21e680f250139534e9 1 parent ab34dd9
@danmarsden danmarsden authored
View
2  mod/scorm/datamodels/aicclib.php
@@ -448,7 +448,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$score = '('.get_string('score','scorm').': '.$usertrack->score_raw.')';
}
$strsuspended = get_string('suspended','scorm');
- if (isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
+ if ($incomplete && isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
$statusicon = '<img src="'.$scormpixdir.'/suspend.gif" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
}
} else {
View
6 mod/scorm/datamodels/scorm_12lib.php
@@ -247,10 +247,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$score = '('.get_string('score','scorm').':&nbsp;'.$usertrack->score_raw.')';
}
$strsuspended = get_string('suspended','scorm');
- if (isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
- if($usertrack->status !='completed') {
- $statusicon = '<img src="'.$scormpixdir.'/suspend.gif" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
- }
+ if ($incomplete && isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
+ $statusicon = '<img src="'.$scormpixdir.'/suspend.gif" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
}
} else {
if ($play && empty($scoid)) {
View
4 mod/scorm/datamodels/scorm_13lib.php
@@ -139,10 +139,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$score = '('.get_string('score','scorm').':&nbsp;'.$usertrack->score_raw.')';
}
$strsuspended = get_string('suspended','scorm');
- if (isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
- if($usertrack->status !='completed') {
+ if ($incomplete && isset($usertrack->{'cmi.exit'}) && ($usertrack->{'cmi.exit'} == 'suspend')) {
$statusicon = '<img src="'.$scormpixdir.'/suspend.gif" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
- }
}
} else {
if ($play && empty($scoid)) {
Please sign in to comment.
Something went wrong with that request. Please try again.