Course Completion API Callback
There are a number of situations where you might want to be notified programmatically that a student has completed a course.
Setup this feature:
- Go to the 'Advanced' page under 'Course Setup' in your course
- Then scroll down to the option that says 'Course Completion API Callback'
- Enter the URL of your API endpoint that will be notified when a student completes the course.
It might look like:
- 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 parameter and it will be sent back to your endpoint on each request from OpenLeaning.
- 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 activity to the course and they complete that activity (API called again).
The POST request from OpenLearning will include the following variables:
|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|
|firstname.lastname@example.org||the student's email address|
|-||Any parameters you have specified in the endpoint URL|