MDL-46408 mod_scorm: check param is set before using.

The default org is only set if it exists in the imsmanifest.xml
This commit is contained in:
Dan Marsden 2015-02-20 13:39:19 +13:00
parent 95751e81ac
commit a544661398

View File

@ -589,7 +589,9 @@ function scorm_parse_scorm(&$scorm, $manifest) {
}
}
if (!empty($defaultorgid) && empty($firstinorg) && $newitem->parent == $scoes->defaultorg) {
if (!empty($defaultorgid) && !empty($scoes->defaultorg) && empty($firstinorg) &&
$newitem->parent == $scoes->defaultorg) {
$firstinorg = $sortorder;
}