From 965b431e6983107f4aa2d361e7592ce1a4f88e8f Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sat, 16 Sep 2023 17:27:22 +0200 Subject: [PATCH] Fonction de listage des cours et bdd enrolment dans la config --- core/class/layout.class.php | 12 +- core/core.php | 6 +- core/module/course/course.php | 110 +++++++++++++----- core/module/install/ressource/defaultdata.php | 3 +- 4 files changed, 96 insertions(+), 35 deletions(-) diff --git a/core/class/layout.class.php b/core/class/layout.class.php index b43683f..16a8cd9 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -898,15 +898,17 @@ class layout extends common $leftItems .= '
  • '; } // Bouton Gérer les cours - $leftItems .= '
  • ' . template::ico('cubes', [ - 'href' => helper::baseUrl() . 'course', - 'help' => 'Cours' - ]) . '
  • '; + if ($this->getUser('group') >= self::GROUP_ADMIN) { + $leftItems .= '
  • ' . template::ico('cubes', [ + 'href' => helper::baseUrl() . 'course', + 'help' => 'Cours' + ]) . '
  • '; + } // Liste des pages if ($this->getUser('group') >= self::GROUP_TEACHER) { $leftItems .= '