Skip to content

Commit

Permalink
MDL-39342 stop users entering too long matching answers.
Browse files Browse the repository at this point in the history
Since they lead to an ugly DB error.
  • Loading branch information
timhunt committed Apr 26, 2013
1 parent cf5a329 commit cbe0a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion question/type/match/edit_match_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function get_per_answer_fields($mform, $label, $gradeoptions,
$repeated[] = $mform->createElement('editor', 'subquestions',
$label, array('rows'=>3), $this->editoroptions);
$repeated[] = $mform->createElement('text', 'subanswers',
get_string('answer', 'question'), array('size'=>50));
get_string('answer', 'question'), array('size' => 50, 'maxlength' => 255));
$repeatedoptions['subquestions']['type'] = PARAM_RAW;
$repeatedoptions['subanswers']['type'] = PARAM_TEXT;
$answersoption = 'subquestions';
Expand Down

0 comments on commit cbe0a1f

Please sign in to comment.