Subscription control using Moodle

Subscription control using Moodle

by Fabien SMEETS -
Number of replies: 1
Hi,

I would like to use Moodle as e-learning platform but I have specials needs.
I wan to control the auto-singup of users based the domain name of a registered teacher and a reference number.

Let's say for example that I have a teacher with a mail in "@toto.com" and a reference number of 50.
I wan to allow the autosignup of 50 students for the "@toto.com" domain.

My idea was to develop my own subscription page that perform the control and complete the registration using the API.

Before begin I would like to have the feedback of the communauty, is this a good way to achieve my goal?
Average of ratings: -
In reply to Fabien SMEETS

Re: Subscription control using Moodle

by Colin Fraser -
Picture of Documentation writers Picture of Testers

No, I suggest not a good idea. Moodle is about individuation within the community. Each User has an individual email and is easily identifiable. Each User also has a Role in whatever context that the User is in. In one course, the User could be a Student, in another, a Teacher, in another Category, a Manager. If you are bulk, or generic, enrolling Users, that becomes seriously problematic, and you are going to have to be hacking a lot of core code, from enrollments to security, permissions, capabilities and even just simple activities to get it to work. 

There are two possibilities, break Moodle code down and use it as the basis for creating an entirely new LMS, which is a massive undertaking and likely not going to be a very rapid solution. Or, allow new Users to add themselves to the Moodle after meeting whatever criteria you require to be met, e.g. the email address. It would be a lot simpler to add an email check, and counter, to keep track of User enrollments than rebuilding core code. You could create a plugin for this, fairly easily, if you have the right coding skills.    

At a quick glance I would think that this ew module would do something like:

1. Admin adds email domain for new enrollments

2. Users then add their enrollment details, and onSave:

Email domain is checked against acceptable domains

If OK then 

      Enroll student

      counter +1

else

      Error Message "Sorry, but your email address does not match known email addresses. Enrollment is cancelled" 

     Step through form fieldname = " "; 

     Return to http://your.domain/Error/invalid enrollment page. 

Clearly it won't be that simple, but in the end, I suspect it is going to end up looking something like that. A plugin you write rather than a revamp of the entire code is more practicable, I suggest. BTW, IANAD, and haven't done any serious coding for a long time now, so I would expect it has passed me by so don't take my word for any of this.