]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14620 - fix link to repository and tidy up using $CFG vars - missed a bit
authordanmarsden <danmarsden>
Thu, 21 Aug 2008 02:12:01 +0000 (02:12 +0000)
committerdanmarsden <danmarsden>
Thu, 21 Aug 2008 02:12:01 +0000 (02:12 +0000)
mod/scorm/datamodels/scormlib.php

index 3caba42acb15f67cbd12c8ea825601e81701cf30..68e49d7b4ed581cbddd7d3af19f92084a2a33e31 100644 (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