diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php
index 5777a01e9fc..a7b5abc6768 100755
--- a/mod/scorm/lib.php
+++ b/mod/scorm/lib.php
@@ -227,6 +227,7 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
unset($orgs);
$orgs[]->identifier = '';
}
+ $report .= '
'."\n";
foreach ($orgs as $org) {
$organizationsql = '';
$currentorg = '';
@@ -321,6 +322,7 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
}
$report .= "\t
\n";
}
+ $report .= "
\n";
}
if ($sometoreport) {
if ($firstmodify < $now) {
@@ -882,7 +884,7 @@ function scorm_parse_scorm($manifestfile,$scormid) {
$manifests = $objXML->parse($xmlstring);
$scoes = new stdClass();
- $scoes->version = 'SCORM';
+ $scoes->version = '';
$scoes = scorm_get_manifest($manifests,$scoes);
if (count($scoes->elements) > 0) {
@@ -1073,6 +1075,9 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
$incomplete = false;
$organizationsql = '';
if (!empty($currentorg)) {
+ if (($organizationtitle = get_field('scorm_scoes','title','scorm',$scorm->id,'identifier',$currentorg)) != '') {
+ echo "\t$organizationtitle\n";
+ }
$organizationsql = "AND organization='$currentorg'";
}
if ($scoes = get_records_select('scorm_scoes',"scorm='$scorm->id' $organizationsql order by id ASC")){
@@ -1080,6 +1085,7 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
$sublist=1;
$previd = 0;
$nextid = 0;
+ $findnext = false;
$parents[$level]='/';
foreach ($scoes as $sco) {
if ($parents[$level]!=$sco->parent) {
@@ -1152,21 +1158,24 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
if ($sco->id == $scoid) {
$startbold = '';
$endbold = '';
- if ($nextsco !== false) {
- $nextid = $nextsco->id;
- } else {
- $nextid = 0;
- }
+ $findnext = true;
$shownext = $sco->next;
$showprev = $sco->previous;
}
- if (($nextid == 0) && (scorm_count_launchable($scorm->id,$currentorg) > 1) && ( $nextsco!==false)) {
- $previd = $sco->id;
+ if (($nextid == 0) && (scorm_count_launchable($scorm->id,$currentorg) > 1) && ($nextsco!==false) && (!$findnext)) {
+ if (!empty($sco->launch)) {
+ $previd = $sco->id;
+ }
}
echo " $startbold$sco->title $score$endbold\n";
} else {
echo " $sco->title\n";
}
+ if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
+ if (!empty($nextsco->launch)) {
+ $nextid = $nextsco->id;
+ }
+ }
}
for ($i=0;$i<$level;$i++) {
echo "\t\t\n";