Your Moodle version

Enrolment: IDList2

enrol_idlist2
Maintained by Picture of Javier Martinez Baena Javier Martinez Baena
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.

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

Screenshots

Screenshot

Contributors

Picture of Javier Martinez Baena
Javier Martinez Baena (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Capt. Moodle
    Thu, Feb 28, 2013, 2:08 PM
    Javier - Please add source control, documentation, and tracker URLs to the entry when you have a chance and also have a look at the validation results to add the maturity variable to version.php. Peace - Anthony
  • Picture of Javier Martinez Baena
    Sat, Mar 9, 2013, 12:30 AM
    Anthony, I reviewed your comments ... I added the CVS and tracker. I have improved the description of the plugin (readme.txt and this web page). I hope it is a little clearer how the plugin works.
    Best wishes
  • Picture of Carina Martinez
    Wed, Mar 13, 2013, 2:24 AM
    Cómo estás Javier, quería preguntarte si tu plugin funciona sin definir expresiones regulares. Algo así como:
    campo de perfil para filtrar = DNI
    columna de la lista p buscar el valor = 1 o "lista_DNI"
  • Picture of Javier Martinez Baena
    Wed, Mar 13, 2013, 5:37 AM
    Hola Carina. El plugin funciona con expresiones regulares tal y como se explica. No se presupone ningún formato concreto en la lista de usuarios autorizados. La separación entre campos no es ninguna concreta por lo que no existe el concepto de "columna". Por tanto, el plugin no puede hacer lo que comentas.
    Saludos
Please login to post comments