Auto-enrollment into specific groups upon course completion.

Auto-enrollment into specific groups upon course completion.

by Christine Dawson -
Number of replies: 6

Is it possible to enroll a user into a new course based on specific user profile criteria and completion of a previous course? 

I have a couple of plugins that I believe can do each part of this, but not sure how to make them work together.

I am using the Programs plugin (https://moodle.org/plugins/enrol_programs) and I manually enroll new users into the correct program group. Works great! however, I need them to be in a specific group within each course. The Enrol by user profile fields plugin (https://moodle.org/plugins/enrol_attributes) can certainly accomplish the group part, but it seems to only allow you to automatically enroll the user into specific courses, and does not work with the course completion component of the Programs plugin. 

One other plugin I could try, but seems to have the same issue with not working in sink with the Enrol by profile fields is the Course completed enrolment plugin (https://moodle.org/plugins/enrol_coursecompleted) I don't like that as much as the programs, but could make it work if it can solve my need.

Any advice on how to make this work? 

Thanks!

Christine 


Average of ratings: -
In reply to Christine Dawson

Re: Auto-enrollment into specific groups upon course completion.

by Renaat Debleu -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Combining 2 enrolment methods does not work as there is a fundamental OR condition with enrolments. Or you paid using PayPal, or you paid using Molly, or you completed the course, or you have the required profile field...., if one of the conditions is true, then you have access to the course.

So you need a plugin enrol_programs_and_coursecompleted or enrol_coursecompleted_and_profilefield or enrol_attributes_and_coursecompleted plugin to make this happen.
In reply to Renaat Debleu

Re: Auto-enrollment into specific groups upon course completion.

by Christine Dawson -
Thank you for your reply! I assumed this was the case. Do you happen to know of a plugin like that?
In reply to Christine Dawson

Re: Auto-enrollment into specific groups upon course completion.

by Renaat Debleu -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
The enrol_coursecompleted plugin enrols a user into a course upon course completion and (eventually) adds the user to a group with the same name as in the original course. This plugin ignores profile fields.

Perhaps you could rewrite this plugin so users get enrolled into a course only when the group exist. Changing 3 or 4 lines of code should do the job. Then you get an enrol_courscompleted_and_groups plugin.

Implementing profile fields will be a lot more difficult, there are custom user fields and potential privacy issues.
In reply to Renaat Debleu

Re: Auto-enrollment into specific groups upon course completion.

by Christine Dawson -

I like that idea! I do believe that would be a really great solution. Now my only problem is writing code. Wouldn't have the first clue where to start with that. Any resources or suggestions on assistants with rewriting the plugin haha?? 

In reply to Christine Dawson

Ri: Re: Auto-enrollment into specific groups upon course completion.

by Roberto Pinna -
Picture of Core developers Picture of Plugin developers
I think you can try AutoEnrol (https://moodle.org/plugins/enrol_autoenrol).
You can define rules to enrol users based on availability plugin so you can use Restriction by course completion (https://moodle.org/plugins/availability_coursecompleted) as rule and add user to groups by a profile field.

HTH,
Roberto
In reply to Renaat Debleu

Re: Auto-enrollment into specific groups upon course completion.

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
You could use autogroups plugin for the group assignment part.