You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error occurs when trying to delete a cohort from Moodle Exception : Undefined constant "metadatacontext_cohort\CONTEXT_COHORT"
Following the trace, it appears indeed that this constant is not defined but used in /local/metadata/context/cohort/classes/observer.php
This constant is defined in /local/metadata/context/cohort/classes/context_handler.php. Defining it in the observer file fixes the issue. Is this the best way though ? Would there be consequences ?
The text was updated successfully, but these errors were encountered:
This issue impacts group context as well. I had the same error when deleting a group; but of course the missing constant is not the same (CONTEXT_GROUP) in /local/metadata/context/group/classes/observer.php.
Other contexts should be fine as there is an existing context constant for each of them in Moodle core.
Hello,
An error occurs when trying to delete a cohort from Moodle
Exception : Undefined constant "metadatacontext_cohort\CONTEXT_COHORT"
Following the trace, it appears indeed that this constant is not defined but used in
/local/metadata/context/cohort/classes/observer.php
This constant is defined in
/local/metadata/context/cohort/classes/context_handler.php
. Defining it in the observer file fixes the issue. Is this the best way though ? Would there be consequences ?The text was updated successfully, but these errors were encountered: