Filtre avant cours

This commit is contained in:
Fred Tempez 2023-11-21 11:00:02 +01:00
parent 6c0a4cd884
commit 06f74c1be7

View File

@ -74,7 +74,12 @@ class course extends common
public function index()
{
if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) {
self::$courses = array();
if (
$this->getUser('id')
&& $this->getUser('group')
&& $this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))
) {
foreach ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group')) as $courseId => $courseValue) {
$categorieUrl = helper::baseUrl() . 'course/suscribe/' . $courseId;
$authorId = $this->getData(['course', $courseId, 'author']);