- Alter your user table (i.e. mdl_user) to include a province field of type text.
- Add the following 2 lines of PHP in your lang/en_utf8/moodle.php:
$string['missingprovince'] = 'Missing state/province';
$string['province'] = 'State/Province'; - Add the following 3 lines of PHP in your login/signup_form.php:
$mform->addElement('text', 'province', get_string('province'), 'maxlength="20" size="20"');
$mform->setType('province', PARAM_TEXT);
$mform->addRule('province', get_string('missingprovince'), 'required', null, 'server'); - Add the following 3 lines of PHP in your user/editlib.php (line 200):
$mform->addElement('text', 'province', get_string('province'), 'maxlength="20" size="21"');
$mform->setType('province', PARAM_MULTILANG);
$mform->addRule('province', $strrequired, 'required', null, 'client');
Additionally, if you like the bulk download feature for user information, add the following line to your $fields array in admin/user/user_bulk_download.php (line 32):
'province' => 'province'Enjoy! :)
No comments:
Post a Comment