fixing bogus $scoid

This commit is contained in:
toyomoyo
2007-11-06 05:40:01 +00:00
parent e967dcc1a7
commit c9ff03bdf4
+4 -1
View File
@@ -353,7 +353,10 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
}
if ($play) {
$sco = scorm_get_sco($scoid);
// it is possible that scoid is still not set, in this case we dont want an empty object
if ($scoid) {
$sco = scorm_get_sco($scoid);
}
$sco->previd = $previd;
$sco->nextid = $nextid;
$result->sco = $sco;