There are a number if situations where you might want to be notified programmatically that a student has completed a course.

Setup this feature:

  1. Go to the 'Advanced' page under 'Course Setup' in your course.
  2. Then scroll down to the option that says 'Course Completion API Callback'.
  3. Enter the URL of your API endpoint that will be notified when a student completes the course. 

It might look like:

Notes:

  • You may want to include a token or some other identifier to help verify that the request is legitimate. For example, you can include a token in the URL as a get paramter and it will be sent back to your endpoint on each request from OpenLearning. 
  • OpenLearning may make multiple requests for the same student. This could occur when a student has already completed the course (API called) and you add another activitiy to the course and they complete that activity (API called again). 

Payload:

The POST request from OpenLearning will include the following variables:

Variable Example Description
profileName sampleuser the profile name of the student who completed the course
coursePath courses/GlobalEntrepreneurship the path of the course
classPath courses/GlobalEntrepreneurship/Cohorts/ClassOf2014 the path of the class the student is enrolled in
email noreply@openlearning.com the student's email address
- Any parameters your have specified in the endpoint URL
We consider the student's email address to be private and use of the email address must comply with our privacy policy. For this reason, the API must only be used in certain circumstances (e.g. sending the student their certificate of completion) and it is not available on all OpenLearning courses. If use of this API does not comply with our Privacy Policy and Terms of Use then access to the API will also be removed. 

Comments