-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
2.4.1
-
MOODLE_24_STABLE
All the mod forms have this piece of code:
if (!empty($CFG->formatstringstriptags)) {
|
$mform->setType('name', PARAM_TEXT);
|
} else {
|
$mform->setType('name', PARAM_CLEANHTML);
|
}
|
This is about to validate it's correct (see MDL-37908) and then move it to a common function somewhere (properly covered by tests, of course).
At the same time, perhaps it would be a good idea to find other repeated pieces of code in those forms and unify more and more (surely another issue).
Ciao