Merge branch 'MDL-42138-master' of git://github.com/xow/moodle

This commit is contained in:
David Monllao 2015-02-09 17:18:33 +08:00
commit 1a4764b2f0

View file

@ -210,7 +210,7 @@ class profile_field_base {
*/ */
public function edit_field_set_required($mform) { public function edit_field_set_required($mform) {
global $USER; global $USER;
if ($this->is_required() && ($this->userid == $USER->id)) { if ($this->is_required() && ($this->userid == $USER->id || isguestuser())) {
$mform->addRule($this->inputname, get_string('required'), 'required', null, 'client'); $mform->addRule($this->inputname, get_string('required'), 'required', null, 'client');
} }
} }