diff --git a/core/class/layout.class.php b/core/class/layout.class.php index e44d5eb..848e6c8 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -913,7 +913,7 @@ class layout extends common if (is_dir(self::DATA_DIR . $key)) { $c++; $location = helper::baseUrl() . 'language/content/' . $key; - $leftItem .= ''; + $leftItem .= ''; } } if ($c > 1) { diff --git a/core/class/router.class.php b/core/class/router.class.php index d248759..61fb36e 100644 --- a/core/class/router.class.php +++ b/core/class/router.class.php @@ -611,10 +611,10 @@ class core extends common $inlineScript[] = $this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']); // Importe le contenu, le CSS et le script des barres - $contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$classesContent) : ''; + $contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$courseContent) : ''; $inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']); $inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']); - $contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$classesContent) : ''; + $contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$courseContent) : ''; $inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']); $inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']); @@ -632,7 +632,7 @@ class core extends common $this->addOutput([ 'title' => $title, - 'content' => $this->getPage($this->getUrl(0), self::$classesContent), + 'content' => $this->getPage($this->getUrl(0), self::$courseContent), 'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), @@ -658,7 +658,7 @@ class core extends common : $this->getData(['page', $this->getUrl(0), 'metaDescription']); // Importe le CSS de la page principale - $pageContent = $this->getPage($this->getUrl(0), self::$classesContent); + $pageContent = $this->getPage($this->getUrl(0), self::$courseContent); $this->addOutput([ 'title' => $title, diff --git a/core/core.php b/core/core.php index d8239ca..1d13614 100644 --- a/core/core.php +++ b/core/core.php @@ -26,10 +26,9 @@ class common const DISPLAY_LAYOUT_LIGHT = 5; const GROUP_BANNED = -1; const GROUP_VISITOR = 0; - const GROUP_MEMBER = 1; - const GROUP_EDITOR = 2; + const GROUP_STUDENT = 1; + const GROUP_TEACHER = 2; // Groupe MODERATOR, compatibilité avec les anciens modules : - const GROUP_MODERATOR = 2; const GROUP_ADMIN = 3; const SIGNATURE_ID = 1; const SIGNATURE_PSEUDO = 2; @@ -170,7 +169,7 @@ class common // Langue de l'interface sélectionnée public static $i18nUI = 'fr_FR'; // Langues de contenu - public static $classesContent = ''; + public static $courseContent = 'home'; public static $languages = [ 'de' => 'Deutsch', 'en_EN' => 'English', @@ -302,23 +301,23 @@ class common // Extraction de la sesion // $this->input['_SESSION'] = $_SESSION; - // Déterminer la langue du contenu du site + // Déterminer le contenu du site if (isset($_SESSION['ZWII_COURSE'])) { // Déterminé par la session présente - self::$classesContent = $_SESSION['ZWII_COURSE']; + self::$courseContent = $_SESSION['ZWII_COURSE']; } // Instanciation de la classe des entrées / sorties - $this->jsonDB(self::$classesContent); + $this->jsonDB(self::$courseContent); // Installation fraîche, initialisation des modules if ($this->user === []) { foreach ($this->dataFiles as $stageId => $item) { - $folder = $this->dataPath($stageId, self::$classesContent); + $folder = $this->dataPath($stageId, self::$courseContent); if ( file_exists($folder . $stageId . '.json') === false ) { - $this->initData($stageId, self::$classesContent); + $this->initData($stageId, self::$courseContent); common::$coreNotices[] = $stageId; } } diff --git a/core/module/maintenance/maintenance.php b/core/module/maintenance/maintenance.php index a51ce6f..8b99f71 100644 --- a/core/module/maintenance/maintenance.php +++ b/core/module/maintenance/maintenance.php @@ -41,7 +41,7 @@ class maintenance extends common ? '' : $this->getData(['page', $this->getData(['config', 'page302']), 'title']), //'content' => $this->getdata(['page',$this->getData(['config','page302']),'content']), - 'content' => $this->getPage($this->getData(['config', 'page302']), self::$classesContent), + 'content' => $this->getPage($this->getData(['config', 'page302']), self::$courseContent), 'view' => 'index' ]); } else { diff --git a/core/module/page/page.php b/core/module/page/page.php index 5968659..c35b034 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -174,11 +174,11 @@ class page extends common ] ]); // Creation du contenu de la page - if (!is_dir(self::DATA_DIR . self::$classesContent . '/content')) { - mkdir(self::DATA_DIR . self::$classesContent . '/content', 0755); + if (!is_dir(self::DATA_DIR . self::$courseContent . '/content')) { + mkdir(self::DATA_DIR . self::$courseContent . '/content', 0755); } - //file_put_contents(self::DATA_DIR . self::$classesContent . '/content/' . $pageId . '.html', '

Contenu de votre nouvelle page.

'); - $this->setPage($pageId, '

Contenu de votre nouvelle page.

', self::$classesContent); + //file_put_contents(self::DATA_DIR . self::$courseContent . '/content/' . $pageId . '.html', '

Contenu de votre nouvelle page.

'); + $this->setPage($pageId, '

Contenu de votre nouvelle page.

', self::$courseContent); // Met à jour le sitemap $this->updateSitemap(); @@ -279,8 +279,8 @@ class page extends common } // Effacer la page $this->deleteData(['page', $page]); - if (file_exists(self::DATA_DIR . self::$classesContent . '/content/' . $page . '.html')) { - unlink(self::DATA_DIR . self::$classesContent . '/content/' . $page . '.html'); + if (file_exists(self::DATA_DIR . self::$courseContent . '/content/' . $page . '.html')) { + unlink(self::DATA_DIR . self::$courseContent . '/content/' . $page . '.html'); } $this->deleteData(['module', $page]); @@ -369,8 +369,8 @@ class page extends common // Supprime l'ancienne page si l'id a changée if ($pageId !== $this->getUrl(2)) { $this->deleteData(['page', $this->getUrl(2)]); - if (file_exists(self::DATA_DIR . self::$classesContent . '/content/' . $this->getUrl(2) . '.html')) { - unlink(self::DATA_DIR . self::$classesContent . '/content/' . $this->getUrl(2) . '.html'); + if (file_exists(self::DATA_DIR . self::$courseContent . '/content/' . $this->getUrl(2) . '.html')) { + unlink(self::DATA_DIR . self::$courseContent . '/content/' . $this->getUrl(2) . '.html'); } } // Traitement des pages spéciales affectées dans la config : @@ -508,11 +508,11 @@ class page extends common ]); // Creation du contenu de la page - if (!is_dir(self::DATA_DIR . self::$classesContent . '/content')) { - mkdir(self::DATA_DIR . self::$classesContent . '/content', 0755); + if (!is_dir(self::DATA_DIR . self::$courseContent . '/content')) { + mkdir(self::DATA_DIR . self::$courseContent . '/content', 0755); } $content = empty($this->getInput('pageEditContent', null)) ? '

' : str_replace('

', '

 

', $this->getInput('pageEditContent', null)); - $this->setPage($pageId, $content, self::$classesContent); + $this->setPage($pageId, $content, self::$courseContent); // Met à jour le sitemap $this->updateSitemap(); diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index d422947..6186800 100644 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -108,7 +108,7 @@
'editorWysiwyg', - 'value' => $this->getPage($this->getUrl(2), self::$classesContent) + 'value' => $this->getPage($this->getUrl(2), self::$courseContent) ]); ?>
diff --git a/core/module/plugin/plugin.php b/core/module/plugin/plugin.php index c9b9814..9ff897c 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -537,19 +537,19 @@ class plugin extends common $infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'], template::flag($keyi18n, '20px') . ' ' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')', template::button('dataExport' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$courseContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('download-cloud'), 'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers' ]), template::button('dataExport' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$courseContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('download'), 'help' => 'Sauvegarder et télécharger les données du module' ]), template::button('dataDelete' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$courseContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('trash'), 'class' => 'buttonRed dataDelete', diff --git a/module/search/search.php b/module/search/search.php index 8e82d37..b5e5f53 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -213,8 +213,8 @@ class search extends common ) { $url = $parentId; $titre = $this->getData(['page', $parentId, 'title']); - //$content = file_get_contents(self::DATA_DIR . self::$classesContent . '/content/' . $this->getData(['page', $parentId, 'content'])); - $content = $this->getPage($parentId, self::$classesContent); + //$content = file_get_contents(self::DATA_DIR . self::$courseContent . '/content/' . $this->getData(['page', $parentId, 'content'])); + $content = $this->getPage($parentId, self::$courseContent); $content = $titre . ' ' . $content; // Pages sauf pages filles et articles de blog $tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier); @@ -232,8 +232,8 @@ class search extends common ) { $url = $childId; $titre = $this->getData(['page', $childId, 'title']); - //$content = file_get_contents(self::DATA_DIR . self::$classesContent . '/content/' . $this->getData(['page', $childId, 'content'])); - $content = $this->getPage($childId, self::$classesContent); + //$content = file_get_contents(self::DATA_DIR . self::$courseContent . '/content/' . $this->getData(['page', $childId, 'content'])); + $content = $this->getPage($childId, self::$courseContent); $content = $titre . ' ' . $content; //Pages filles $tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);