From ef7f7453c94e63886d45712fbee7ae5dc9c06d46 Mon Sep 17 00:00:00 2001 From: danmarsden Date: Thu, 21 Aug 2008 02:12:01 +0000 Subject: [PATCH] MDL-14620 - fix link to repository and tidy up using $CFG vars - missed a bit --- mod/scorm/datamodels/scormlib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/scorm/datamodels/scormlib.php b/mod/scorm/datamodels/scormlib.php index 3caba42acb..68e49d7b4e 100644 --- a/mod/scorm/datamodels/scormlib.php +++ b/mod/scorm/datamodels/scormlib.php @@ -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 -- 2.39.5