MDL-39422 mod_forms: prevent long coruse module names

To prevent ugly DB errors.
This commit is contained in:
Dan Poltawski
2013-04-30 17:42:10 +01:00
parent 6b8f82e412
commit 10abf35eac
18 changed files with 18 additions and 0 deletions
+1
View File
@@ -45,6 +45,7 @@ class mod_assignment_mod_form extends moodleform_mod {
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$this->add_intro_editor(true, get_string('description', 'assignment'));