Merge branch 'wip-mdl-30560' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Aparup Banerjee 2011-12-08 15:51:27 +08:00
commit 5ac06899c7

View File

@ -1014,7 +1014,12 @@ abstract class moodleform {
$params = array_merge(array($realelementname), $params);
call_user_func_array(array(&$mform, 'addRule'), $params);
break;
case 'type' :
//Type should be set only once
if (!isset($mform->_types[$elementname])) {
$mform->setType($elementname, $params);
}
break;
}
}
}