Skip to content

Commit

Permalink
Merge branch 'm20_MDL-26894_SCORM13_PHP_notice_undefined_prop_id' of …
Browse files Browse the repository at this point in the history
…git://github.com/scara/moodle
  • Loading branch information
stronk7 committed Mar 21, 2011
2 parents 1595b81 + 36c0108 commit 63187a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod/scorm/datamodels/scorm_12lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 4 additions & 1 deletion mod/scorm/datamodels/scorm_13lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 63187a6

Please sign in to comment.