MDL-26894: merged from SCORM 1.2 (scorm_12lib.php) after an XDebug audit session

This commit is contained in:
Matteo Scaramuccia 2011-03-19 11:15:10 +01:00
parent 56babbcb76
commit 36c0108a2f
2 changed files with 5 additions and 2 deletions

View File

@ -313,7 +313,7 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
}
if ($play) {
// it is possible that scoid is still not set, in this case we dont want an empty object
// it is possible that $scoid is still not set, in this case we don't want an empty object
if ($scoid) {
$sco = scorm_get_sco($scoid);
}

View File

@ -207,7 +207,10 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
}
if ($play) {
$sco = $DB->get_record('scorm_scoes', array('id'=>$scoid));
// it is possible that $scoid is still not set, in this case we don't want an empty object
if ($scoid) {
$sco = scorm_get_sco($scoid);
}
$sco->previd = $previd;
$sco->nextid = $nextid;
$result->sco = $sco;