Skip to content

issue#240 user with 'viewhiddensections' permission#241

Open
tuanngocnguyen wants to merge 1 commit intogjbarnard:mainfrom
catalyst:issue240
Open

issue#240 user with 'viewhiddensections' permission#241
tuanngocnguyen wants to merge 1 commit intogjbarnard:mainfrom
catalyst:issue240

Conversation

@tuanngocnguyen
Copy link

Regards issue#240: #240

https://github.com/moodle/moodle/blob/MOODLE_405_STABLE/lib/modinfolib.php#L3164-L3166

 * @property-read bool $uservisible True if this section is available to the given user (for example, if current user
 *    has viewhiddensections capability, they can access the section even if it is not
 *    visible or not available, so this would be true in that case) - obtained dynamically

@gjb2048
Copy link
Collaborator

gjb2048 commented Jul 25, 2025

@tuanngocnguyen More complex than that with a logic conflict between:

Screenshot 2025-07-25 135514

and:

Screenshot 2025-07-25 135725

Plus 'hiddenfromstudents' isn't accurate. Applies to 'any' user without 'moodle/course:viewhiddensections' capability in the given context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants