Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2.6, 3.3.3, 3.4
-
MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-60789-master -
Description
When creating a new submission, the user is able to enter titles more than 255 characters long.
When he does this, he gets only a simple "Database error occurred".
See [https://github.com/moodle/moodle/blob/master/mod/workshop/submission_form.php|submission form code].
Fix: Add a simple rule, like this:
$mform->addRule('title', null, 'maxlength', 255, 'client');