]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6186 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 26 Sep 2023 15:03:47 +0000 (17:03 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 26 Sep 2023 15:03:47 +0000 (17:03 +0200)
app/Services/ScormCloud.php

index 8e748ed2a6e735789c9fe210c6d0fd6a26941b04..71ee084dc1e52a6e2c2d2afd3b5a84d40583576b 100644 (file)
@@ -41,6 +41,15 @@ class ScormCloud
     {
         $courseAPI = static::_getApi();
 
+        if ($delete) {
+            try {
+                $courseAPI->deleteCourse($courseId);
+                sleep(15);
+            } catch (\Exception $e) {
+
+            }
+        }
+
         $request = new V2\Model\ImportFetchRequestSchema(['url' => $url, 'content_type' => 'application/zip']);
         $promise = $courseAPI->createFetchAndImportCourseJobAsync($courseId, $request, true);
         $jobId = $promise->wait();