moodle-mod_scheduler
moodle-mod_scheduler copied to clipboard
Prevent export crash due to missing user context
After user data removal by tool_dataprivacy
tool_dataprivacy\task\expired_retention_period
is used to remove user contexts
When exporting appointments with custom profile field selected this lead to a crash.
This is due to profile field visibility check using profile_field_base::is_visible()
which is calling context_user::instance()
with default strictness (MUST_EXIST
)...leading to an exception when the context is removed.