-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.5.2
-
MOODLE_25_STABLE
If you something like:
$mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'),
|
array('rows' => 15), $this->editoroptions);
|
$mform->setType('questiontext', PARAM_RAW);
|
$mform->addRule('questiontext', null, 'required', null, 'client');
|
$mform->addRule('questiontext', null, 'required', null, 'client');
|
You get a fatal (and non-sensical) error. While the above example is kinda ridiculous, it was found because a plugin wants to mark standard field as required, and we were changing the standard field to be required.
This should do one of these:
- Be silent. (Probably just ignore the second rule)
- Throw a dev warning.
- Throw a sensical fatal message.
I probably vote for number 2.
- Testing discovered
-
MDL-9873 Should question text be a required field?
-
- Closed
-