MDL-14620 - fix link to repository and tidy up using $CFG vars - missed a bit

This commit is contained in:
danmarsden 2008-08-21 02:12:01 +00:00
parent 0e8ae38e98
commit ef7f7453c9

View File

@ -63,7 +63,7 @@ function scorm_get_manifest($blocks,$scoes) {
}
break;
case 'ORGANIZATIONS':
if (!isset($scoes->defaultorg)) {
if (!isset($scoes->defaultorg) && isset($block['attrs']['DEFAULT'])) {
$scoes->defaultorg = $block['attrs']['DEFAULT'];
}
$scoes = scorm_get_manifest($block['children'],$scoes);
@ -489,7 +489,9 @@ function scorm_parse_scorm($pkgdir,$scormid) {
$newitem->organization = $organization;
$standarddatas = array('parent', 'identifier', 'launch', 'scormtype', 'title');
foreach ($standarddatas as $standarddata) {
$newitem->$standarddata = $item->$standarddata;
if (isset($item->$standarddata)) {
$newitem->$standarddata = $item->$standarddata;
}
}
// Insert the new SCO, and retain the link between the old and new for later adjustment