From e07080b6821db748f223598252694140920c25be Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 4 Oct 2023 18:00:25 +0200 Subject: [PATCH] fix delete course error --- core/module/course/course.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/module/course/course.php b/core/module/course/course.php index 78e4ced..e0a953f 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -247,17 +247,13 @@ class course extends common ]); // Suppression } else { + self::$siteContent = 'home'; if (is_dir(self::DATA_DIR . $courseId)) { $success = $this->deleteDir(self::DATA_DIR . $courseId); $this->deleteData(['course', $courseId]); $this->deleteData(['enrolment', $courseId]); } - // Activer le site d'accueil - if ($success) { - self::$siteContent = 'home'; - } - // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'course',