Profile field enrolment
Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Profile field enrolment.
This contributive enrolment method allows binding enrolment to a course to some value held by user profile attributes, or standard user attributes
Unzip the contribution into the '/enrol' directory of Moodle. Browse to Site Administration -> Notifications to get the plugininstalled in Moodle.
You'll first need to enable this enrolment method in the central administration of enrolmenet plugins before it is usable in courses.
1. Go to the Site Administration -> Plugins -> Enrolments -> Manage Enrolment plugins screen.
2. Click on the "enable" switch to get the plugin enabled. Note that there are no site level parameters for this plugin.
If you want the profile method superseed other methods for enrol in a course, raise the position of the plugin upper in the stack.
Then it will be possible to choose this method by clicking on the Course Administration -> Users -> Enrolment Methods link. You'll be in a screen where all enrolment instances of the course are defined.
1. Add an enrolment instance choosing "Profile Field Enrolment" in the drop down list.
2. Setup the parameters for the instance and record it. (see "Configuration screen above for details).
Now any users which profile or standard user field matching the settings present the adequate value will be proposed to enter the course. Other users are declined with a polite message.
Subscribing to an existing group at enrol time
This will be possible if :
- There are some group defined in the course
- The groups have a password to enrol in.
Groups without password will not be handled by this extra feature.
Users can choose to apply for a group when entering the course the first time and answering the enrol form. An extra password field is presented to be filled with the group password. Note that only one group can be applied at enrol time.
Using Several Instances In A Course
The new Moodle 2.x possibility of stacking instances of enrolment methods in a course will allow using several instances of this plugin, f.e :
- To provide a "profile field value => role" mapping, using one instance per role
- To provide a multivalue selector.
When defining several instances in the course, the course enrolment form will stack each instance with his local form fragment. Non matching forms will display a "decline" message, while matching forms will propose a complementary data input.
Tip : In that case, use custom instance name to clearly tell the user which access condition is agreed by each instance.
This plugin was designed by Valery Fremaux (firstname.lastname@example.org) for the Rectorat de Strasbourg Moodle network.