fix delete course error
This commit is contained in:
parent
b30f67dfdf
commit
e07080b682
@ -247,17 +247,13 @@ class course extends common
|
|||||||
]);
|
]);
|
||||||
// Suppression
|
// Suppression
|
||||||
} else {
|
} else {
|
||||||
|
self::$siteContent = 'home';
|
||||||
if (is_dir(self::DATA_DIR . $courseId)) {
|
if (is_dir(self::DATA_DIR . $courseId)) {
|
||||||
$success = $this->deleteDir(self::DATA_DIR . $courseId);
|
$success = $this->deleteDir(self::DATA_DIR . $courseId);
|
||||||
$this->deleteData(['course', $courseId]);
|
$this->deleteData(['course', $courseId]);
|
||||||
$this->deleteData(['enrolment', $courseId]);
|
$this->deleteData(['enrolment', $courseId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activer le site d'accueil
|
|
||||||
if ($success) {
|
|
||||||
self::$siteContent = 'home';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'redirect' => helper::baseUrl() . 'course',
|
'redirect' => helper::baseUrl() . 'course',
|
||||||
|
Loading…
Reference in New Issue
Block a user