Subscription control using Moodle

Re: Subscription control using Moodle

by Colin Fraser -
Number of replies: 0
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.