Let's say we have the CONTENT_OBJECT_ASSOCIATIONS_CHANGED event:
|
# .. event_type: org.openedx.content_authoring.content.object.associations.changed.v1 |
|
# .. event_name: CONTENT_OBJECT_ASSOCIATIONS_CHANGED |
|
# .. event_description: Emitted when an object's associations are changed, e.g tags, collections |
|
# .. event_data: ContentObjectChangedData |
|
# .. event_trigger_repository: openedx/edx-platform |
|
CONTENT_OBJECT_ASSOCIATIONS_CHANGED = OpenEdxPublicSignal( |
|
event_type="org.openedx.content_authoring.content.object.associations.changed.v1", |
|
data={ |
|
"content_object": ContentObjectChangedData, |
|
} |
|
) |
And I want to add the context (course/library ID) to this event, like this:
CONTENT_OBJECT_ASSOCIATIONS_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content.object.associations.changed.v1",
data={
"content_object": ContentObjectChangedData,
+ "context": ContextIdData,
}
)
Is that sort of change allowed? If so, how would I update event_data in the comment/documentation of the event? If not, why is data a dictionary? How do we know from the in-line code annotation what key (e.g. content_object) the event data is under?
This is not explained in the docs as far as I can see.
Let's say we have the
CONTENT_OBJECT_ASSOCIATIONS_CHANGEDevent:openedx-events/openedx_events/content_authoring/signals.py
Lines 239 to 249 in 34d3fce
And I want to add the
context(course/library ID) to this event, like this:CONTENT_OBJECT_ASSOCIATIONS_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content.object.associations.changed.v1", data={ "content_object": ContentObjectChangedData, + "context": ContextIdData, } )Is that sort of change allowed? If so, how would I update
event_datain the comment/documentation of the event? If not, why isdataa dictionary? How do we know from the in-line code annotation what key (e.g.content_object) the event data is under?This is not explained in the docs as far as I can see.