Creating an auto-enroll link for Open edX courses
If you want to have learners automatically enrolled in a course with a single click, regardless of where they are on the World Wide Web, here's how.
Creating the link
Follow this formula to build your auto-enroll link:
/register?course_id=course-v1%3A [Org Name]
%2B [Course Number]
%2B [Course Run]
The org name, course number, and course run are all part of your Course ID, and can be easily found in the Course URL. So if you go to your course and copy the course URL like this:
All you need to do is replace the parts of that URL with the various components in the formula above, so you get a link that looks like this:
How it works
Now, if a learner clicks on your auto-enroll link, regardless of where they are when they click the link, they will immediately be enrolled in the course and redirected to their dashboard, with the course available for them to access.
If a learner is not logged in or doesn't have an account created yet, they will be redirected to your registration page. After the learner either signs in or creates an account, they will be immediately enrolled in the course with it available to them on their dashboard.