Closed t-schroeder closed 3 months ago
Checking $section->uservisible
is enough because as you can see in lib/modinfolib.php#L3236-L3253 it already checks $section->visible
, $section->available
and both capabilities 'moodle/course:viewhiddensections'
and 'moodle/course:ignoreavailabilityrestrictions'
since Moodle version 3.3.
in case the section is unavailable (i.e. has availability restrictions that are not met) but the user can view hidden sections (i.e. has 'moodle/course:viewhiddensections'
Fixes #155