Skip to content

Commit

Permalink
docs: add note about django plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Dec 25, 2024
1 parent e540e29 commit 84c4639
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/how-tos/consume-an-event.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ An :term:`Event Receiver` is simply a function that listens for a specific event
- This event has a single field called ``enrollment`` which is an instance of the ``CourseEnrollmentData`` class. You can review the ``CourseEnrollmentData`` class to understand the data that is available to you and how you can use it to implement the custom logic.
- The ``metadata`` parameter contains the Open edX-specific metadata for the event, such as the event version and timestamp when the event was sent. You can use this metadata to understand more about the event and its context.

These event receivers are implemented in `Open edX Django plugins`_ and are registered in the ``signals.py`` file of the plugin. You can review the ``signals.py`` file of the openedx-events-2-zapier_ plugin to understand how the event receivers are implemented and connected to the events.

Step 4: Test the Event Receiver
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -117,3 +119,4 @@ This way you can ensure that the event receiver is working as expected and that
.. _Tutor: https://docs.tutor.edly.io/
.. _Django Signals Documentation: https://docs.djangoproject.com/en/4.2/topics/signals/
.. _openedx-events-2-zapier: https://github.com/eduNEXT/openedx-events-2-zapier
.. _Open edX Django plugins: https://docs.openedx.org/en/latest/developers/concepts/platform_overview.html#new-plugin

0 comments on commit 84c4639

Please sign in to comment.