moodle-format_onetopic icon indicating copy to clipboard operation
moodle-format_onetopic copied to clipboard

fixed endless redirects

Open t-schroeder opened this issue 1 year ago • 1 comments

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

t-schroeder avatar Aug 04 '23 16:08 t-schroeder

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.

t-schroeder avatar Aug 04 '23 16:08 t-schroeder