openedx / openedx/openedx-events
How is `event_data` supposed to work?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13
- Forks
- 33
- Avg merge
- 14h 37m
- Merged PRs (30d)
- 4
Description
Let's say we have the CONTENT_OBJECT_ASSOCIATIONS_CHANGED event:
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with openedx_events/content_authoring/signals.py at the CONTENT_OBJECT_ASSOCIATIONS_CHANGED definition, then read the linked inline-code-annotations documentation. Review the comment thread for the intended event_data and data-key behavior, and update the documentation so the mapping and allowed context field are explicit; done means the original questions can be answered from the docs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100