]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5315 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Jun 2022 08:41:34 +0000 (10:41 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Jun 2022 08:41:34 +0000 (10:41 +0200)
app/Models/ELearningPackage.php

index 97ac5499302a717e4d0e526f0bf48d6bbea97872..c2d72c9bd0495629a70d108cdfee8d0b4f8eee7e 100644 (file)
@@ -143,7 +143,9 @@ class ELearningPackage extends ToolboxModel
 
         $workshop = new WorkshopV2($user);
         $workshop->installBook($id, $tmp, [], 'scorm');
-
+        if(file_exists($tmp.'/imsmanifest.xml')) {
+            unlink($tmp . '/imsmanifest.xml');
+        }
         $vdir->copyDirectory($tmp, $basePath);
         $meta = $workshop->getMetadata($id);
         return $meta->title;
@@ -167,7 +169,9 @@ class ELearningPackage extends ToolboxModel
             return null;
         }
         $quiz->compile($tmp, true);
-
+        if(file_exists($tmp.'/imsmanifest.xml')) {
+            unlink($tmp . '/imsmanifest.xml');
+        }
         $vdir->copyDirectory($tmp, $basePath);
         return $quiz->title;
     }
@@ -189,6 +193,9 @@ class ELearningPackage extends ToolboxModel
         }
         $file = $f->getPath();
         $title = ELearningMedia::compileFromFile($file, $tmp, '', $organization, 'MEDIA_' . $media_file);
+        if(file_exists($tmp.'/imsmanifest.xml')) {
+            unlink($tmp . '/imsmanifest.xml');
+        }
         $vdir->copyDirectory($tmp, $basePath);
         return $title;
     }
@@ -204,6 +211,10 @@ class ELearningPackage extends ToolboxModel
         }
         $media->compile($tmp);
 
+        if(file_exists($tmp.'/imsmanifest.xml')) {
+            unlink($tmp . '/imsmanifest.xml');
+        }
+
         $vdir->copyDirectory($tmp, $basePath);
         return $media->title;
     }
@@ -241,6 +252,9 @@ class ELearningPackage extends ToolboxModel
             }
         }
 
+        if(file_exists($tmp.'/imsmanifest.xml')) {
+            unlink($tmp . '/imsmanifest.xml');
+        }
         $vdir->copyDirectory($tmp, $basePath);
 
         if (isset($title) && $title) {