diff --git a/src/CoreBundle/Entity/AbstractResource.php b/src/CoreBundle/Entity/AbstractResource.php index de6c011e38..1ed3a7c064 100644 --- a/src/CoreBundle/Entity/AbstractResource.php +++ b/src/CoreBundle/Entity/AbstractResource.php @@ -410,6 +410,12 @@ abstract class AbstractResource public function isVisible(Course $course, Session $session = null): bool { $link = $this->getFirstResourceLinkFromCourseSession($course, $session); + if (null === $link) { + if ((new ReflectionClass($this))->hasProperty('loadCourseResourcesInSession')) { + $link = $this->getFirstResourceLinkFromCourseSession($course); + } + } + if (null === $link) { return false; }