User registration directly to a course

User registration directly to a course

by Pushpendra Chauhan -
Number of replies: 5

Hi. I am using moodle 3.8. Is it possible that i can create new user accounts for a specific course by a form not by a .csv file. 

In a course, there is an option Enroll User but that is for existing users only. All I want to add new users here.

Is there a way to achieve this. If custom code is required what would be the steps to do this? 

Average of ratings: -
In reply to Pushpendra Chauhan

Re: User registration directly to a course

by Gemma Lesterhuis -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
hi,

Do you want to create the accounts as an Admin and then enrolled them straight away?
Or do you want users to create their own account, and when they create their account they are enrolled in a specific course?

In the 1ste case, if CSV is not handy for you, I sometimes use https://moodle.org/plugins/enrol_attributes and there are probably even more ways.

In the 2th case, please check these plugins:
- https://moodle.org/plugins/block_coupon
- https://moodle.org/plugins/auth_enrolkey
-https://moodle.org/plugins/enrol_autoenrol
- https://moodle.org/plugins/enrol_auto

Gemma
Average of ratings: Useful (2)
In reply to Gemma Lesterhuis

Re: User registration directly to a course

by Pushpendra Chauhan -
Thanks Gemma,
I want to create the user accounts as an Admin and then enrolled them straight away to specific courses. I want to provide the easiest way for the client. It would be a great help if you suggest some other ways for the purpose.
Also the plugin you suggested enrol_attributes is available for ver 3.7 and I am on 3.8
In reply to Pushpendra Chauhan

Re: User registration directly to a course

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Pushpendra,

If a plugin is available for Moodle 3.7 but not for 3.8, it does not necessarily mean that it is incompatible. Very often, it just means that the author just did not have time to check it for compatibility yet.

Before you install it though, read the comments on the plugin page and in the plugin's bug tracker. If there is a link to the a discussion, check there too. Very often you will find comments from people saying that they tried it and it works in recent versions of Moodle - or they will mention what did not work. You may be willing to live with an issue that doesn't affect you (e.g. feature you don't use).

The other thing to check is the Versions tab on the plugin page. I noticed that many authors may not configure the settings for their plugin page correctly. As a result, the version compatibility listed at the top of the plugin page is outdated. Checking the Versions tab, you may discover that the latest version of the plugin is actually compatible with your installation of Moodle.

Another thing you could do is to drop the author a message indicating that you would like to use it on Moodle 3.8. Sometimes, when I do this, a new compatible version pops up shortly afterwards. Plugin authors love to know that people are using their plugin and find it useful. Your request might just be what is needed to motivate the author into releasing an updated version.

I did a quick check for you. The bad news is that there is no indication anywhere that the moodle-enrol_attributes plugin is compatible with Moodle 3
8. The good news is that nobody has indicated that they've experienced any issues with the plugin in 3.8 either.

If I were you, I would give it a try. Unless you have the ability to fix a problem if things stop working, I recommend that you try it first on a different Moodle site, perhaps a local copy of Moodle on your computer. If it works on your computer, great! It will very likely work on your live Moodle site too. Post a message on the plugin page to let others know if it is compatible or not.

Almost forgot. One more place you can check is the source code repository on Github. If you see some recent updates, it is a good sign that the author is updating the plugin and that a new version is forthcoming.

At this point, I suspect that many plugin authors are busy preparing and testing their plugins for compatibility with Moodle 3.9 due next month. I know I am with my plugins.

Hope you find something useful in all of this.

Best regards,

Michael Milette
Average of ratings: Useful (3)
In reply to Pushpendra Chauhan

Re: User registration directly to a course

by Gemma Lesterhuis -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
hi Pushpendra,

The plugins I mentioned (enrol_attributes, enrol_autoenrol and enrol_auto) do the thing you ask. Michael already responded accordenly on your 3.7 vs 3.8 concern.

Another way is to use the Cohort (Sitegroups). Though you will still need a plugin to assign the user to a cohort (sitegroup), (https://moodle.org/plugins/?q=cohort%20moodle-version:3.8). You can connect a cohort to a course (or multiple courses). Which is a Moodle standard Enrolment type.

These are the suggestions I can offer you, maybe someone else knows another methode I have not mentioned.
You can always create (or ask someone) a plugin that does exactly what you want.

Gemma
In reply to Gemma Lesterhuis

Re: User registration directly to a course

by Mihir J -
Hi Pushpendra

Apart from suggestions given above,
You can also build a simple functionality and write code , soemthing like, in course context, add a button to create new user and pass the course id which in form. That you on user creation event you can find the course id and enrol the person using a observer

But this will require quite a bit of coding
thanks!
Mihir