Permalink
Browse files

MDL-39342 stop users entering too long matching answers.

Since they lead to an ugly DB error.
  • Loading branch information...
1 parent cf5a329 commit cbe0a1f60a71fa513829de6f0108e97b1a29037d @timhunt timhunt committed Apr 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/type/match/edit_match_form.php
@@ -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';

0 comments on commit cbe0a1f

Please sign in to comment.