From 16c5b16aede93e1ef04c52d341f4a294dae6b4ff Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 26 Sep 2023 17:03:47 +0200 Subject: [PATCH] wait #6186 @0.5 --- app/Services/ScormCloud.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Services/ScormCloud.php b/app/Services/ScormCloud.php index 8e748ed2a..71ee084dc 100644 --- a/app/Services/ScormCloud.php +++ b/app/Services/ScormCloud.php @@ -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(); -- 2.39.5