From cbe0a1f60a71fa513829de6f0108e97b1a29037d Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 25 Apr 2013 11:18:12 +0100 Subject: [PATCH] MDL-39342 stop users entering too long matching answers. Since they lead to an ugly DB error. --- question/type/match/edit_match_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/match/edit_match_form.php b/question/type/match/edit_match_form.php index dc9ea7032f7..5ee734a8804 100644 --- a/question/type/match/edit_match_form.php +++ b/question/type/match/edit_match_form.php @@ -44,7 +44,7 @@ class qtype_match_edit_form extends question_edit_form { $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';