1.6.02 exclure les dossiers des espaces des cours dans le profil

This commit is contained in:
Fred Tempez 2024-02-28 08:54:56 +01:00
parent fd5aabd910
commit 372db6dc3a

View File

@ -758,9 +758,17 @@ class user extends common
// Chemin vers les dossiers du gestionnaire de fichier
self::$sharePath = $this->getSubdirectories('./site/file/source');
// Exclure les espaces des cours
foreach (array_keys($this->getData(['course'])) as $courseId) {
self::$sharePath = array_filter(self::$sharePath, function ($key) use ($courseId) {
return strpos($key, $courseId) === false;
});
}
self::$sharePath = array_flip(self::$sharePath);
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
//self::$sharePath = array_merge(['' => 'Aucun dossier'], self::$sharePath);
// self::$sharePath = array_merge(['' => 'Aucun dossier'], self::$sharePath);
self::$sharePath = array_merge(['' => 'Dossier de l\'espace actif'], self::$sharePath);
// Liste des modules installés
@ -950,6 +958,14 @@ class user extends common
// Chemin vers les dossiers du gestionnaire de fichier
self::$sharePath = $this->getSubdirectories('./site/file/source');
// Exclure les espaces des cours
foreach (array_keys($this->getData(['course'])) as $courseId) {
self::$sharePath = array_filter(self::$sharePath, function ($key) use ($courseId) {
return strpos($key, $courseId) === false;
});
}
self::$sharePath = array_flip(self::$sharePath);
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
//self::$sharePath = array_merge(['' => 'Aucun dossier'], self::$sharePath);