-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.4
-
MOODLE_27_STABLE
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MDL-49034_master -
When adding an enrolment method of "self enrol" to a course, the "Custom instance name" form field allows more than 255 characters. When the form is submitted an error writing to database is thrown as the corresponding field "name" in the table mdl_enrol is set to varchar(255).
There are two ways of fixing this:
1. limit the max length of characters in the form field
2. increase the size or change the field type in the database
I would suggest the first option mainly for the reason that very long names look bad on most user interfaces and there is a description field available if more words are required.
This also raises the question of how many forms exhibit this behaviour?