From 261aae298bcd34fe17952d614f3a4bcede98f799 Mon Sep 17 00:00:00 2001 From: Jason Platts Date: Tue, 26 Mar 2013 15:11:20 +0000 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 241c7eff9a2..d0ad73c44ae 100644 --- a/question/type/match/edit_match_form.php +++ b/question/type/match/edit_match_form.php @@ -42,7 +42,7 @@ class qtype_match_edit_form extends question_edit_form { $repeated[] = $mform->createElement('editor', 'subquestions', get_string('question'), 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';