diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php
index 9a096cac275..ba6c67359a2 100755
--- a/mod/scorm/lib.php
+++ b/mod/scorm/lib.php
@@ -543,7 +543,7 @@ function scorm_parse($basedir,$file,$scorm_id) {
}
} else {
foreach ($resources as $label => $resource) {
- if ((isset($resource['type'])) && ($resource['type'] == 'sco')) {
+ if (!empty($resource['href'])) {
$sco->identifier = $label;
$sco->title = $label;
$sco->parent = '/';
diff --git a/mod/scorm/pix/asset.gif b/mod/scorm/pix/asset.gif
new file mode 100644
index 00000000000..c39106788e2
Binary files /dev/null and b/mod/scorm/pix/asset.gif differ
diff --git a/mod/scorm/playscorm.php b/mod/scorm/playscorm.php
index 43fc87dc0eb..d16c81ab873 100755
--- a/mod/scorm/playscorm.php
+++ b/mod/scorm/playscorm.php
@@ -73,7 +73,7 @@
//
$bodyscripts = "";
if ($scorm->popup != "") {
- $bodyscripts = "onLoad='SCOInitialize();' onUnload='API.SaveTotalTime(); closeMain();' onbeforeUnload='API.SaveTotalTime();'";
+ $bodyscripts = "onLoad='SCOInitialize();' onUnload='SCOFinish(); closeMain();' onbeforeUnload='SCOFinish();'";
}
print_header($pagetitle, "$course->fullname",
"$navigation framename}\" href=\"view.php?id=$cm->id\" title=\"$scorm->summary\">$scorm->name",
@@ -173,8 +173,9 @@
}
$score = "";
if ($sco_user=get_record("scorm_sco_users","scoid",$sco->id,"userid",$USER->id)) {
- if ( $sco_user->cmi_core_lesson_status == "")
+ if ( $sco_user->cmi_core_lesson_status == "") {
$sco_user->cmi_core_lesson_status = "not attempted";
+ }
echo " cmi_core_lesson_status).".gif\" alt=\"".get_string(scorm_remove_spaces($sco_user->cmi_core_lesson_status),"scorm")."\" title=\"".get_string(scorm_remove_spaces($sco_user->cmi_core_lesson_status),"scorm")."\" />\n";
if (($sco_user->cmi_core_lesson_status == "not attempted") || ($sco_user->cmi_core_lesson_status == "incomplete")) {
if ($currentSCO == "") {
@@ -188,8 +189,12 @@
$score = "(".get_string("score","scorm").": ".$sco_user->cmi_core_score_raw.")";
}
} else {
- echo "
";
- $incomplete = true;
+ if ($sco->type == 'sco') {
+ echo "
";
+ $incomplete = true;
+ } else {
+ echo "
";
+ }
}
echo " $startboldid.");\">$sco->title $score$endbold\n \n";
} else {
@@ -267,7 +272,7 @@
echo "\n";
echo "