http://atutor.ca/atutor/mantis/view.php?id=4553
authorharris wong <hwong@ocad.ca>
Wed, 6 Oct 2010 21:05:53 +0000 (21:05 -0000)
committerharris wong <hwong@ocad.ca>
Wed, 6 Oct 2010 21:05:53 +0000 (21:05 -0000)
docs/mods/_core/imsafa/classes/A4aExport.class.php

index 1f599ce..60079fc 100644 (file)
@@ -35,6 +35,11 @@ class A4aExport extends A4a {
                $resources = parent::getPrimaryResources();
                foreach($resources as $rid => $prop){
                        $resources_types = parent::getPrimaryResourcesTypes($rid);
+            if (empty($resources_types)){
+                //if there are no resource types, then don't use it.
+                continue;
+            }
+
                        $temp = array();
                        $secondary_array = array();
                        foreach($resources_types as $rtid){
@@ -65,7 +70,6 @@ class A4aExport extends A4a {
                        } 
                        if(!empty($temp)){
                                $this->original_files[$temp['resource']] = $temp;
-       //                      debug($this->original_files['7dolomiti_1a_como1e_como_road1b.jpg'], $rid);
                        }
                }
                return $this->original_files;