-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certificates: Investigate updating MITx Online data based on webhooks from OpenedX #690
Comments
Posting initial update: While looking at a lot of documentation in various different places there are a things that i can mention regarding the ticket tasks: The hooks from Open edX are provided and can be used in two ways,
As seen in the above lists, Both filters and events don't provide the specific hooks that we need but there are some regarding certificates that we might dig around more for our use case.
Per my initial research, we will need to create a plugin for whatever we use (Events or Filters). An implementation reference for An implementation detail for The above is kind of initial details but I just wanted to share anyway. It's possible that these might change with some more research. FYI, @rhysyngsun @pdpinch |
Can use the filter CertificateCreationRequested <https://github.com/openedx/openedx-filters/blob/main/openedx_filters/learning/filters.py#L142> to send a webhook to mitxonline which can take care of actually creating the certificate?
… The provided list of filters is here <https://github.com/openedx/edx-platform/blob/master/docs/guides/hooks/filters.rst#index-of-filters>
|
We might be able to use that but we will have to check at which point that filter will run. e.g. We want automatic creation of certificates in MITxOnline upon course creation and in edX it is possible that this filter will run when the user manually clicks the I think there is a functionality for automatic certificate generation in edX and in that case we should be able to use this filter. I'll need to look more into how we can enable that and if enabling that will run this filter automatically too. |
Adding more to my above comment: While looking around I also explored the event bus confluence doc and this readthedoc and tried to check if it has any usage as of now on the platform but looking at the confluence documentation it looks like that is still in progress. Basically, from what I understand the event bus once complete will provide the functionality of posting event streams on some data feed systems e.g. Since as per my understanding the event bus is still in progress and it looks like currently our best shot at doing what we want would be to create a simple edx plugin that will register to the CertificateCreation filter or event (Depending upon the question I'm mentioning below). Q: Currently, for someone who completes a course do we generate two certificates (one in edX and the other one in MicroMasters)? The above information might be required about whether we would like to use the Currently, Looks like we can enable automatic certificates in edX FYI, @pdpinch @rhysyngsun |
In mitxonline, we only need to generate a certificate in mitxonline. This is similar to xPRO.
Yes. Can you open an issue for that? |
The associated has been created #700 |
Ideally we'd try to upstream an openedx_events event for course passing, but for now using the filters is ok although we should make a note in the implementation that this is not optimal since it's misusing the filters feature. |
So I discovered that openedx has another event dispatch mechanism: https://github.com/openedx/event-tracking It's mean to route events to external systems so this actually seems like pretty much exactly what we'd want. We'd be able to implement a backend for this that does what we want. We'd want to filter to I'd also suggest that instead on making a certificates-specific API that we actually create a webhook endpoint and send well-structured events. There may be other things besides generating certificates that we want to do when a learner passes a course in the future so it would be good to keep this generalized. I'm thinking of a payload like this:
And we'd have the eventtracker backend send these to a webhook endpoint like What do we think of this? |
My first question is what level of reliability we need to guarantee around event delivery. If we want to tolerate occasional delivery failures and have a reconciliation process that runs in batch mode then this seems ok. If we need guaranteed delivery then we'll want to think about what delivery mechanism we want (e.g. Pulsar, Kinesis, etc.). As to the use of the event-tracking backend, there is also https://github.com/openedx/openedx-events which is part of their Hooks extension approach defined here https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0050-hooks-extension-framework.html I'll have to spend some time remembering which of those libraries is intended for what purposes... |
Closing this since we've evaluated the options enough but picked a different direction anyway. |
Summary
For certificates we need to be able to generate certificates automatically within a short time of a learner completing a course and exam. Current we use a polling mechanism and a blocking call when the learner loads the dashboard. The former causes a delay and the latter isn't great for performance and requires a learner to actually visit the dashboard.
To accomplish this, we need to investigate utilizing OpenedX's hooks infrastructure to send webhooks based on certain events to be able to reflect updates on the MITx Online side.
References
OEP-50: Hooks extension framework
openedx-events
Githubopenedx-events
DocsTasks
Investigates the OpenedX infrastructure above and determine if it is the kind of mechanism we're looking for here:
The text was updated successfully, but these errors were encountered: