|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|