diff options
| author | Kreshnik Hasanaj <kreshnik.hasanaj@gmail.com> | 2022-11-24 13:20:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-24 13:20:44 +0100 |
| commit | 812ddb30d182886ab6dc10dc5bb6deee221d2a02 (patch) | |
| tree | 91a490ecc63b640e230b7db518092e628e1c0063 | |
| parent | 15b98be732093dd7226205c8a7c08fe785f53165 (diff) | |
Fix: Move the deleteScormFolder() method call to the deleteScorm() method.
When calling the method
```
public function uploadScormArchive(UploadedFile $file, $uuid = null)
```
It calls within it the method:
```
private function saveScorm($file, $filename, $uuid = null)
```
Which calls the method:
```
private function generateScorm($file)
```
Which calls the `unzipper` method on the `scormDisk` object. The scorm path is cleared within the method body before the new content is made available.
As `deleteScormData` is called further down in the `uploadScormArchive` method, all content is removed after a successful upload.
| -rw-r--r-- | src/Manager/ScormManager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Manager/ScormManager.php b/src/Manager/ScormManager.php index d403d1e..c3b0e5f 100644 --- a/src/Manager/ScormManager.php +++ b/src/Manager/ScormManager.php @@ -267,6 +267,8 @@ class ScormManager // Delete after the previous item is stored if ($model) { $this->deleteScormData($model); + // Delete folder from server + $this->deleteScormFolder($model->uuid); $model->delete(); // delete scorm } } @@ -281,8 +283,6 @@ class ScormManager $oldSco->scoTrackings()->delete(); } $model->scos()->delete(); // delete scos - // Delete folder from server - $this->deleteScormFolder($model->uuid); } /** |
