Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.2.6, 3.3.3, 3.4
-
Component/s: Workshop
-
Testing Instructions:
-
Affected Branches:MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
Fixed Branches:MOODLE_33_STABLE, MOODLE_34_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-60789-master -
Pull Master Diff URL:
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');