Moodle 1.8: do not require city, country, and description profile fields

Here are notes for those who want to make the city, country, and description profile fields not required in Moodle 1.8. The procedure has changed somewhat from version 1.6, which was my previous Moodle. This is helpful when running Moodle on a school intranet, where people usually know each other and these profile fields are not so important. In addition, once there are no longer any required Moodle fields, new users go straight to the Moodle home page instead of to the login screen, which makes the site more usable. We authenticate against Active Directory, so the first name, last name, and email fields are prefilled via LDAP and not editable.

Comment out lines 160 and 166 of user/editlib.php:

160: //$mform->addRule('city', $strrequired, 'required', null, 'client');
166: //$mform->addRule('country', $strrequired, 'required', null, 'client');

Comment out line 26 of user/edit_form.php:

26: //$mform->addRule('description', $strrequired, 'required', null, 'client');

That should do it! Please comment below if you find issues with these steps.

One comment

  1. Miguel Guhlin says:

    Thanks for sharing this!

    Miguel Guhlin
    Around the Corner-MGuhlin.net
    http://www.mguhlin.net