When Open edX hooks events and filters replace a fork
A team needs enrollment, certificate or another platform behavior to change in Open edX, and the first instinct is often to patch edx-platform directly. Open edX hooks, the openedx-events and openedx-filters libraries, exist so that most of those changes can live in a Django app plugin instead. Events let your code react after something has happened, such as an enrollment or a certificate being issued. Filters let your code inspect or alter an operation while it is in progress, so the platform can continue with a modified result. Either way, the change sits in a package you deploy alongside the platform rather than in edx-platform source.
The decision to use hooks rather than a fork depends on what the change must do. If your logic only needs to observe a platform action, such as writing a record to an internal system when a learner enrolls, an event receiver is usually the right tool. If the change must modify or veto an action, such as blocking enrollment for a learner who fails a local eligibility check, you need a filter. If the behavior you need does not correspond to any event or filter that the platform emits, a hook will not solve it, and the team must either accept a narrower outcome or plan a fork with its maintenance cost in view. Confirm the current event and filter catalog against the release you are running before you commit to a design, because the set of available hooks changes between releases.
Before building, ask your Open edX partner or internal platform team to list each behavior change, classify it as observe or modify, and check the matching hook in the catalog for your target release. Record which changes have no hook. Those items decide whether a fork is ever justified, and they are where the cost of carrying patches through six-monthly releases concentrates. A short proof of concept against a non-production Tutor environment will show whether the plugin loads, receives the signal and behaves as expected under your identity and data setup.
Which hook mechanism fits which requirement
This table compares four ways to extend Open edX behavior: consuming events, applying filters, using Tutor plugin settings hooks, and forking edx-platform. Read each row as a question you ask first, then check the change type and upgrade risk before choosing. The main takeaway is that events and filters should carry most behavior changes, and a fork should be the last resort.
| Mechanism | What it changes | Risk to upgrades | When it fits |
|---|---|---|---|
| Consume an event (openedx-events) | Runs your code after something happens, such as an enrollment or certificate issue, for side effects like syncing rosters or writing to an external system | Low to moderate: depends on the event's stability and version in your release; confirm the event's status for your named release | Downstream sync, notifications or reporting that must not change the learner's action |
| Apply a filter (openedx-filters) | Lets your code modify data or block an action at a defined point, such as rejecting an enrollment with a reason | Moderate: filters sit on the request path, so a changed signature or behavior needs regression testing on each upgrade | Policy checks such as eligibility rules, or changing a value before the platform uses it |
| Tutor plugin settings and patches | Changes configuration, settings and service wiring at image build and deploy time without editing core source | Low: plugins are packaged per release, but patches to templates or files can break when upstream files move | Environment configuration, secrets wiring and service settings that should survive upgrades |
| Forked edx-platform | Changes any code path, including behavior no event or filter exposes | High: every patch must be carried and rebased through each named release | Only when no event, filter or plugin hook covers the requirement after a documented search |
How to build a hook-based Django app plugin
This sequence takes a team from confirming which Open edX events and filters their release supports to a Django app plugin that reacts to or changes platform behavior, packaged for a Tutor build and verified on a staging LMS without editing edx-platform.
Confirm the target release and its hooks
Before writing code, confirm the Open edX release your platform runs and check which openedx-events and openedx-filters exist for that release, including each event's signature, the point in the flow where it fires and whether it is a signal or a filter. Record the exact package versions your release expects. Do this against the release notes and the library documentation for that release, not against the main branch, because hook names and payloads change between releases. The output is a short hook specification listing each event or filter, its arguments and the behavior you need. Check: every hook you plan to use is listed for the named release, and any gap is written down as a decision to change scope or to plan a different approach.
Scaffold the Django app plugin
Create a separate Python package with its own repository, containing a Django app with an AppConfig and a plugin app configuration that declares the Open edX plugin settings, so the platform loads it without any change to edx-platform source. Keep the package name, version and dependency pins explicit and matched to the release from the previous step. Add a minimal test module that imports the package inside a Django test settings context. The output is an installable package that builds cleanly. Check: the package installs into a clean virtual environment with the pinned release dependencies, and the test module imports without error.
Write the receiver or pipeline step
For an event, write a receiver function that subscribes to the event signal, reads only the arguments the specification lists, and performs its side effect, such as writing a log entry, calling an internal service or queuing a task. Keep the receiver idempotent and fast, and do not let it make blocking calls to external systems on the learner request path. For a filter, write a pipeline step that receives the data, returns the altered data or a result object, and raises the documented exception to stop the action when a rule requires it. Wrap any external call in error handling so a failing dependency does not break the learner action unless the business rule demands it. The output is a tested function. Check: unit tests cover the normal path and each documented exception path with the expected return values.
Package the plugin for the Tutor image build
Add the package as a dependency of a Tutor plugin, or as a pinned requirement that the Tutor image build installs, and make the Django app registration part of the plugin's settings patch so it is enabled in the LMS and CMS images as needed. Rebuild the Tutor image with the pinned version rather than installing into a running container, so the change is reproducible and survives redeployments. Store the plugin and its version in version control with the image build definition. The output is a rebuilt image that contains the plugin. Check: the image's installed package list shows the exact version, and the Django app loads at LMS startup without import errors in the logs.
Confirm the hook fires on a staging LMS
Deploy the rebuilt image to a staging LMS that mirrors production settings, then perform the learner action that triggers the hook, such as enrolling a test learner in a test course or completing a test course certificate. Watch the LMS logs and your plugin's own log output to confirm the receiver ran once and received the expected payload. For filters, trigger both the allowed and blocked cases and confirm that the blocked case returns the documented exception and the learner sees the expected message. The output is a short test record with the action, the observed log lines and the result. Check: the event appears exactly once per action, and no unexpected duplicate or missing invocation appears in the logs.
Verify the exception path and learner completion
Test the failure modes that matter for learners. Simulate the external dependency being unavailable and confirm the receiver logs the failure and the learner can still complete enrollment or certificate issuance where the business rule allows it. For filters, confirm that when your step raises its exception, the learner receives a clear message and can still finish any unrelated action, such as viewing courseware or their dashboard. Also confirm that a filter step does not silently drop data. The output is a documented result for each failure mode with the decision the team made. Check: no failure path leaves a learner unable to finish an action that the business rule does not block, and each blocked path shows a message a learner can act on.
Document the hook contract and operating notes
Write a short operating note in the plugin repository covering the Open edX release it targets, each hook used with its arguments and the reason for it, the exception behavior for each filter, the configuration keys the plugin reads and the test commands. Include the steps to repeat the verification after an Open edX upgrade, since hook signatures can change between releases and the plugin must be retested against the next release before it is deployed. The output is a maintained document checked in with the code. Check: a second engineer can follow the note to rebuild the image, run the tests and reproduce the staging check without asking the author.
How an enrollment action passes through hooks
The flow starts with a learner's enrollment request reaching the LMS, where a filter runs before the enrollment is saved and can alter or halt it. Once the action completes, the LMS emits an event that a Django app plugin receiver picks up to perform side effects. The trust boundary sits between the LMS and the external system the receiver calls, so check which credentials, timeouts and failure handling apply on that outbound call, and confirm the receiver cannot block or roll back the enrollment.
Filter, enrollment save and event receiver across the LMS trust boundary.
Security risks when hooks touch enrollment and certificates
Hooks run inside the learner path, so a change in an event receiver or filter can affect enrollment, certificates and personal data without any edx-platform code change. The cards below cover the risks that matter most when a Django app plugin reacts to or changes these actions, and the checks to make before a hook goes live.
Filters can block learner actions
A filter runs before the platform completes an action, so an exception or timeout inside it can stop an enrollment or certificate step for the learner. Treat every filter as part of the critical path. Ask the build team which failure mode each filter has (fail closed or fail open), test what a learner sees when the filter errors, and confirm that a broken third-party service cannot silently block enrollment for a whole course.
Receivers handle personal data
Event receivers often receive learner identifiers, email addresses or enrollment details and pass them to other systems. Each receiver is a new processing step that your data handling rules must cover. Map which fields each receiver reads, where it sends them, how long copies are kept, and whether the destination is inside the infrastructure you control.
Credentials for external systems
A receiver that calls a CRM, badge service or grading API needs a credential, and that credential must not appear in the plugin source or in a settings file committed to Git. Store it in your secrets mechanism, scope it to the single action the hook performs, and plan rotation. Confirm who can read the secret in the Tutor configuration and in the running container.
Review third-party plugin code
Community hook plugins run with the same privileges as the platform itself, so installing one is equivalent to running its code in your LMS. Before installation, read the code that registers receivers and filters, check the dependencies it pulls in, and pin the version or commit you reviewed. Repeat the review on every upgrade, since a new release can add network calls or new data reads.
Certificate actions need an audit trail
A hook that changes certificate issuance or revokes a credential alters a record that learners and employers rely on. Log each change with the event, the decision and the actor, and keep those logs separate from the platform's general logs. Ask the team how an incorrect decision would be detected and reversed, and who approves changes to that logic.
Keeping hook plugins working across upgrades
Every hook receiver you write depends on an event or filter name, a signature and a behavior that belong to one Open edX release. Open edX states that the latest named release is the only supported release and that it cannot support more than one release at a time, so a receiver that works on the current release may break silently on the next one. Treat the hook names, argument shapes and the point in the request or enrollment flow where each event fires as things to recheck at every upgrade, not as fixed APIs. Confirm the exact openedx-events and openedx-filters versions your target release installs before you start the upgrade, and record them next to your plugin's pinned dependencies.
Pin the plugin version in your Tutor plugin's requirements and in the image build, so a rebuild never pulls in a newer openedx-events or openedx-filters than the one you tested. Then run each receiver against the new release on a staging environment built from the same Tutor configuration as production. Exercise the flows your receivers touch, such as enrollment, unenrollment and certificate issuance, and check that the expected side effects happen once and only once. For filters, confirm that the filter still returns the data shape your pipeline expects. Keep the test data and the steps in a short runbook so the next upgrade repeats the same checks.
Receivers that raise exceptions can fail without stopping the learner's action, so the failure often shows up only in logs and downstream data. Decide in advance where receiver errors go, how they are counted and who is alerted when a rate rises after a deployment. Ask your operations team which log collection and error monitoring tools already cover the LMS and Celery workers. Read the upgrade-specific page for each named release before you schedule the change, since it covers breaking changes and deprecations for that release and is the natural checklist for the staging run.
Limits to confirm before you build a hook
A hook built on openedx-events or openedx-filters depends on details that differ between releases and deployments. The four items below are the limits to settle in writing before any code is written, because each one changes the design of the receiver and how it fails in production.
Which events and filters exist
Confirm the exact event and filter names your target release emits, along with their arguments and types. The names used in older examples may have been renamed, split or removed. Check the list in the release documentation, then check the installed packages in your Tutor image, since the platform code is the final authority on what is actually sent. Record the signature you rely on so a later upgrade shows you exactly what changed.
Release notesObserve or block
Decide whether your receiver only needs to observe an action or must change or stop it. Events are notifications that run after the fact, so they cannot change the outcome. Filters are designed to alter or halt a step, so a receiver can affect enrollment or certificate flow. Confirm for each hook whether it is a notification or a filter, and whether the specific step you need can be halted at all, because blocking a step you assumed was stoppable is the most common reason a design fails late.
Ordering across receivers
Confirm how multiple receivers attached to the same event or filter are called, and in what order. If your plugin depends on running before or after another app, you need that order to be defined and stable in your release, not assumed. Also confirm whether a filter's output from one receiver is passed to the next, because that chaining changes what your receiver sees. Test with the other plugins you run in production, not only your own.
Failure behavior when a receiver raises
Confirm what the platform does when your receiver raises an exception. Some signal paths let the error propagate into the request that triggered the action, which can break enrollment or certificate issuance for learners. Others log and continue. Find out whether a failure rolls back the surrounding database transaction, and whether retries happen. Design your receiver so slow or failing calls such as external APIs are isolated, and test a forced error in staging.
Support in your Tutor setup
Confirm that the hook works in the exact combination you run: the Open edX release, the Tutor version, the image you build, and the deployment method such as Docker Compose or Kubernetes. Ask whether the app that installs the receiver is loaded by your image build through the Tutor plugin system, and whether the feature is supported by the community, your service provider or your own team. A hook that works in local development may not be loaded the same way in a multi-node production deployment.
Tutor docsQuestions teams ask before building Open edX hooks
How much effort does an Open edX hook plugin take to build?
Effort depends mostly on how many events or filters the plugin reacts to, how much business logic sits behind each one, and how many external systems it calls. A plugin that listens to one enrollment event and writes a record to a single system is a small job. A plugin that changes enrollment outcomes through filters, calls a CRM or licensing service, and handles retries and reconciliation is a larger one. Ask any quote to break effort down by event or filter, by external integration, and by test coverage, since those three items drive most of the work.
Can an internal team build an Open edX hook plugin without outside help?
Yes, if the team has Python and Django experience and can work with the Open edX event and filter APIs in their chosen release. The harder parts are usually not the hook code itself but knowing which events fire in which process, testing against a running LMS, and packaging the plugin so it installs cleanly through Tutor. A common pattern is an internal team owning the business logic while an outside partner reviews the design, sets up the test environment and checks the upgrade path. Decide early which of these tasks your team can carry through each Open edX release.
What does the work need from our team before it starts?
Most of the input comes from four areas. First, the target Open edX release, because the only supported release is the latest named release and event definitions can change between releases. Second, a written list of the events and filters you need, with the business outcome each one serves. Third, test accounts and a non-production learning environment with representative courses and enrollment paths. Fourth, access to the external systems the plugin calls, such as a CRM, billing or credential service, including sandbox credentials and contact details for their owners. Missing any of these usually adds time at the start.
How long does a hook plugin take to deliver?
Duration follows scope: the number of events or filters, the complexity of each reaction, the number of external integrations, and how much testing and documentation the change requires. Narrow plugins with one or two hooks and one integration can move quickly once the environment and access are ready. Larger plugins with several integrations and a formal review process take longer, and most of that time goes to access approvals and integration testing rather than coding. Ask for a timeline tied to the written scope, with milestones for design review, staging tests and release.
Which parts of the hook work carry the most risk?
The main risks are side effects that run during learner actions, such as enrollment, where a slow or failing external call can affect the learner experience. Filters are more sensitive still, because they can change the outcome of a platform action. Also check how the plugin behaves when an external system is down, whether events are processed more than once, and how failed actions are retried or logged. Ask the team that builds the plugin to show how each of these cases is tested and what the operations runbook says about them.
When is a fork of edx-platform still needed for this work?
A fork is only justified when the behavior you need cannot be reached through events, filters, or other documented extension points in your Open edX release. Before deciding, list each required change and check whether a hook, a Django app plugin, an XBlock or a micro-frontend can deliver it. Any change that does require a fork adds ongoing cost, because patches must be carried through each named release and reapplied during upgrades. Ask any partner to document why each fork-level change cannot use a supported extension point.
What should we ask for in a quote for hook work?
Ask for the written scope listing each event and filter, the reaction logic, the external systems and their access requirements, the test approach including staging and regression coverage, the release target, and the deliverables such as code, documentation and handover. Also ask which tasks are one-time, such as design and build, and which recur, such as updates for each new Open edX release and maintenance of external integrations. A quote that cannot explain these items is hard to compare with an internal estimate.
Where the official documentation fits in this work
Before you commit to a hook design, confirm that the specific events and filters you need exist in the Open edX release your platform runs. The openedx-events and openedx-filters names, signatures and payloads are not stable across every release, so treat the release notes as the authority on availability. The Open edX release notes list the named releases and their changes, and Open edX states that the latest named release is the only supported release. If your platform is on an older named release, plan the hook work against that version's notes and budget for a later upgrade that may change the signature you depend on.
The Tutor documentation is where you confirm how a Django app plugin is registered and loaded in a Tutor-built image, which is the path your hook code will take into production. Check the plugin and hooks section against the Tutor version your team pins, and record that version next to the hook code so an upgrade reviewer can see which packaging assumptions apply. Because Tutor's plugin and hooks system is licensed separately from the platform, confirm the license terms with your legal team if you plan to distribute the plugin beyond your organization.
For the implementation itself, read the code in the edx-platform repository at the tag that matches your deployed release, not the default branch. Search the emitting code for each event or filter you plan to use, confirm where it is triggered and what data it carries, and note any condition that can skip it. Documentation describes intent, while the repository shows what the running code does, so the two should agree before you write handlers that depend on them.
How DeployOpen works on this
DeployOpen scopes Open edX hooks: events and filters as a written, fixed-scope piece of work before any code is written. The Django app plugin, its event and filter handlers, and the tests and documentation that go with it are built and handed over inside your own infrastructure, without modifying edx-platform.
How we scope
- Inventory the platform behavior you want to react to or change, such as enrollment or certificate events, and confirm the Open edX release you run.
- Decide which openedx-events signals and openedx-filters pipeline steps are used, and which custom events, if any, the work will need.
- Agree in writing what the Django app plugin will do, what it will not do, and how each hook will be tested before go-live.
How we build
- Package the Django app plugin so it loads through the platform's plugin mechanism instead of hand-edited core files.
- Write each event receiver and filter step with defined inputs, outputs, error handling and idempotent behavior for repeated events.
- Test handlers against staging data in a non-production environment, including failure paths where a filter must stop or alter a flow.
How we hand over
- Deliver the plugin source, a pinned dependency list and the Tutor configuration needed to rebuild the image with it.
- Document each hook: the event or filter it uses, the trigger, the data it reads and writes, and the owner who maintains it.
- Walk your platform and operations team through the rebuild, the upgrade checks and the rollback steps before handover is signed off.
How we support
- Review hook behavior at each Open edX release change, since the hooks you rely on may change between named releases. Confirm the current release notes with the project before each upgrade.
- Offer ongoing support, upgrades and continuous testing as a retainer, so the plugin stays aligned with the platform you run.
- Ask for a quote built from the written scope, and confirm with us which hooks, environments and release targets the quote covers.

