From: Vincent Vanwaelscappel Date: Mon, 13 Jun 2022 08:41:34 +0000 (+0200) Subject: wip #5315 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=be9197078c3caea0c4f5c9893e32cb68b5adb9e1;p=fluidbook-toolbox.git wip #5315 @0.25 --- diff --git a/app/Models/ELearningPackage.php b/app/Models/ELearningPackage.php index 97ac54993..c2d72c9bd 100644 --- a/app/Models/ELearningPackage.php +++ b/app/Models/ELearningPackage.php @@ -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) {