Skip to content

lib: events are visible when the module is visible to the user - #717

Merged
smbader merged 1 commit into
mainfrom
fix/is-event-visible
May 28, 2026
Merged

lib: events are visible when the module is visible to the user#717
smbader merged 1 commit into
mainfrom
fix/is-event-visible

Conversation

@jrchamp

@jrchamp jrchamp commented May 18, 2026

Copy link
Copy Markdown
Owner

I saw the suggestion in #716 that we should be implementing course_calendar_is_event_visible. The part that I don't understand is why Moodle doesn't run a generic version of this code itself. Maybe some events are intended to be visible to everyone? Please double check that this actually does the right thing. It seems correct, perhaps a bit overly safe, but I'd rather start with safe. Feel free to suggest changes of course.

Fixes #716

@jrchamp
jrchamp requested a review from a team May 18, 2026 15:26
@jrchamp jrchamp self-assigned this May 18, 2026
@jrchamp jrchamp added the bug Fixes problems or reduces technical debt label May 18, 2026

@smbader smbader left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned, this really feels like the work Moodle core should do. This function seems like a place to alter or extend the check in unusual ways if the plugin needed to.

Smart code, thank you!

@smbader
smbader merged commit 0c91cab into jrchamp:main May 28, 2026
6 checks passed
@jrchamp
jrchamp deleted the fix/is-event-visible branch May 31, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes problems or reduces technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar and Timeline events are not respecting group restrictions in mod_zoom v5.5.0 on Moodle 4.5.7

2 participants