MDL-39601 user: Missing setType in user filters

This commit is contained in:
Frederic Massart 2013-05-10 12:42:02 +08:00
parent f000edba16
commit a8655ae728
4 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,7 @@ class user_filter_cohort extends user_filter_type {
$objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->getOperators());
$objs[] =& $mform->createElement('text', $this->_name, null);
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
$mform->setType($this->_name, PARAM_RAW);
$mform->disabledIf($this->_name, $this->_name.'_op', 'eq', 5);
if ($this->_advanced) {
$mform->setAdvanced($this->_name.'_grp');

View File

@ -46,6 +46,7 @@ class user_filter_courserole extends user_filter_type {
$objs[] =& $mform->createElement('select', $this->_name .'_ct', null, $this->get_course_categories());
$objs[] =& $mform->createElement('text', $this->_name, null);
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
$mform->setType($this->_name, PARAM_ALPHANUMEXT);
if ($this->_advanced) {
$mform->setAdvanced($this->_name.'_grp');
}

View File

@ -62,6 +62,7 @@ class user_filter_profilefield extends user_filter_type {
$objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->get_operators());
$objs[] =& $mform->createElement('text', $this->_name, null);
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
$mform->setType($this->_name, PARAM_RAW);
if ($this->_advanced) {
$mform->setAdvanced($this->_name.'_grp');
}

View File

@ -42,6 +42,7 @@ class user_filter_text extends user_filter_type {
$objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->getOperators());
$objs[] =& $mform->createElement('text', $this->_name, null);
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
$mform->setType($this->_name, PARAM_RAW);
$mform->disabledIf($this->_name, $this->_name.'_op', 'eq', 5);
if ($this->_advanced) {
$mform->setAdvanced($this->_name.'_grp');