diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 79f8e83..b5f3d0d 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -494,16 +494,18 @@ class layout extends common /** * Commandes pour les membres simples * Affichage du sélecteur d'espaces - */ + */ + $courses = $this->getData([('course')]); + $courses = helper::arraycolumn($courses, 'title', 'SORT_ASC'); if ( //$this->getUser('group') === self::GROUP_MEMBER // && $this->getData(['theme', 'menu', 'selectSpace']) === true ) { - if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) { + if ($courses) { $itemsRight .= '
  • '; @@ -922,11 +924,13 @@ class layout extends common * Les admins voient tousles contenus * Les enseignants les contenus dont ils sont auteurs */ + $courses = $this->getData([('course')]); + $courses = helper::arraycolumn($courses, 'title', 'SORT_ASC'); if ($this->getUser('group') >= self::GROUP_EDITOR) { - if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) { + if ($courses) { $leftItems .= '
  • '; diff --git a/core/module/course/course.php b/core/module/course/course.php index 024d7e7..f78da74 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -1300,7 +1300,8 @@ class course extends common ]); break; case self::COURSE_ENROLMENT_SELF_KEY: - if ($this->getInput('courseSwapEnrolmentKey', helper::FILTER_PASSWORD, true) === $this->getData(['course', $courseId, 'enrolmentKey'])) { + if ($this->getInput('courseSwapEnrolmentKey', helper::FILTER_PASSWORD, true) === $this->getData(['course', $courseId, 'enrolmentKey'])) + { $this->courseEnrolUser($courseId, $userId); // Stocker la sélection $_SESSION['ZWII_SITE_CONTENT'] = $courseId;