Send email upon course completion

I would like my openedX installation to send an email when the learner successfully completes a course and gets a certificate.

From the openedX documentation, I can see that there is a list of events that are used in the platform.

Is there a way of integrating a piece of code into the platform that is triggered when an even is published and does some actions? (For example, send an email when the course is completed).

In open edX when certificate is generated it creates new entry in Certificate model, post_save of this Certificate model you can write your code using Django signal.

@jramnai thank you for your answer.
I have several unknown words in your answer, though…

How can I access this Certificate model? Is there a way to perform queries in the database and perform actions based on these queries?
If yes, could you please point me to the corresponding documentation area?

You can take reference from here. This will not directly help you in open edX but you will get some understanding of the post save signal call in Django. After learning this you can implement this in your open edX codebase according to your requirement.

@jramnai do I have to change files inside the openedX code base? Or can I create a plugin in order to extend the functionality? I am using so the openedX code base in in a docker container.

Yes, you have to change the files inside the open edX codebase.
You can take reference of this for plugin.

I don’t have idea with tutor.

1 Like