Moodle plugins directory: IDList2 | Moodle.org
IDList2
This software is a completely new implementation of "idlist", an enrollment plugin developed for Moodle 1.9 by Juan Pedro Bolivar Puente (https://savannah.nongnu.org/projects/cvg-moodle)
This plugin is designed to automatize the enrollment of users, using a list of authorized students. The users are enrolled automatically if they are included in the list.
Most of the methods to enroll many users in moodle are based in the "userid" field. This plugin facilitates the enrollment of many users without knowing the "userid" field because the list is based on any of the users' fields.
In the plugin configuration, the teacher have to define (among other things):
1.- The field to be used for the validation, that is, one from the standard fields or even from the user profile (user defined fields).
2.- List of users allowed to enrol the course. This list includes, for each user, the value of the previous field (among other information).
If this plugin is active, the first time a student enters into the course, the value of the student' selected field is compared with those in the list of users. If the corresponding value is found in the list, then the user is automatically enrolled. Otherwise, the student is not allowed to enroll into the course.
For example, suppose you have a list of students who are allowed to enter our course (name, surname, email and age) like this:
Name Surname Email Age
Javier Martinez Baena jbaena@decsai.ugr.es 20
Jose Garcia Garcia josegarcia@domain.com 21
Antonio Perez Perez antonioperez@domain.com 24
If you configure the plugin to use the email as the field for validation, only the students with one of the emails in the list can access the course.
Note that when the list of authorized users is entered in the plugin configuration form, you can write a list as the one above, which also may include other information as the name, surname, age or even other fields that are not used. Obviously, we have to filter this values to compare only the selected field. In the plugin configuration you have to define a regular expression, used to select the values to be compared. In our example, the algorithm to find matches works as follows:
- We extract values from the list of valid users that match the regular expression.
- We compare the "email" field of the user with each of the values obtained in previous step.
Note that the regular expression must be compatible with the type of field you want to validate. For example, if we are going to validate emails, then the regular expression should be something like \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b (obtained from http://www.regular-expressions.info/regexbuddy/email.html)
Another option of the plugin configuration form is the checkbox "Filter user field". If actived, the value of the user field is also filtered (before matching) with the regular expression. Thus, we could even use just a part of the field.
Note that we have to configure the plugin carefully, because this algorithm does not guarantee the validated user to be the one you included in the list. Depending on the field of validation and the regular expression, an user could be enrolled by mistake.
After configuring the plugin (saving changes), if you enter to the settings form again, you can see two lists:
1.- The list of unauthorized users, that is, the enrolled users who are not in the authorized users according to current configuration. This could happen when users are enrolled using other methods.
2.- The list of authorized values. These are all the values extracted from the list of authorized users, logically, using the regular expression. This list is usefull to test if the regular expression is working as desired.
Languages: Available in english and spanish
Best wishes
campo de perfil para filtrar = DNI
columna de la lista p buscar el valor = 1 o "lista_DNI"
Saludos