[root@moodle html]# diff -urNwbBE moodle/user/editlib.php moodle23/user/editlib.php
--- moodle/user/editlib.php 2012-06-26 01:15:38.000000000 +0800
+++ moodle23/user/editlib.php 2013-11-19 21:17:40.000000000 +0800
@@ -225,18 +225,18 @@
$mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');
$mform->setType('city', PARAM_MULTILANG);
- $mform->addRule('city', $strrequired, 'required', null, 'client');
- if (!empty($CFG->defaultcity)) {
- $mform->setDefault('city', $CFG->defaultcity);
- }
$choices = get_string_manager()->get_list_of_countries();
$choices= array(”=>get_string('selectacountry').'...') + $choices;
$mform->addElement('select', 'country', get_string('selectacountry'), $choices);
- $mform->addRule('country', $strrequired, 'required', null, 'client');
- if (!empty($CFG->country)) {
- $mform->setDefault('country', $CFG->country);
- }
$choices = get_list_of_timezones();
$choices['99'] = get_string('serverlocaltime');
@@ -321,6 +321,10 @@
$mform->addElement('text', 'department', get_string('department'), 'maxlength="30" size="25"');
$mform->setType('department', PARAM_MULTILANG);
+ $mform->addRule('department', $strrequired, 'required', null, 'client'); //dywang
+ if (!empty($CFG->department)) {
+ $mform->setDefault('department', $CFG->defaultdepartment);
+ }
$mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"');
$mform->setType('phone1', PARAM_NOTAGS);