Skip to content

Commit

Permalink
MDL-46408 mod_scorm: check param is set before using.
Browse files Browse the repository at this point in the history
The default org is only set if it exists in the imsmanifest.xml
  • Loading branch information
danmarsden committed Feb 20, 2015
1 parent 95751e8 commit a544661
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/scorm/datamodels/scormlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a544661

Please sign in to comment.