From: ikawhero Date: Fri, 5 Jan 2007 06:54:26 +0000 (+0000) Subject: Locked fields do not need to be required. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=901d26dbf4e45c74b415e76450f08b3f000efed2;p=moodle.git Locked fields do not need to be required. --- diff --git a/user/profile/lib.php b/user/profile/lib.php index e76f32e8c0..449be9dacb 100644 --- a/user/profile/lib.php +++ b/user/profile/lib.php @@ -156,7 +156,7 @@ class profile_field_base { * @param object instance of the moodleform class */ function display_field_required(&$form) { - if ($this->_is_required()) { + if ( $this->_is_required() and !$this->_is_locked() ) { $form->addRule($this->fieldname, get_string('required'), 'required', null, 'client'); } }