diff --git a/question/behaviour/rendererbase.php b/question/behaviour/rendererbase.php index 76cc1a7f636..db5ff9ebbc6 100644 --- a/question/behaviour/rendererbase.php +++ b/question/behaviour/rendererbase.php @@ -101,7 +101,7 @@ abstract class qbehaviour_renderer extends plugin_renderer_base { question_utils::get_filepicker_options($options->context, $draftitemid)); $commenteditor = html_writer::tag('div', html_writer::tag('textarea', s($commenttext), - array('id' => $id, 'name' => $inputname, 'rows' => 10, 'cols' => 60))); + array('id' => $id, 'name' => $inputname, 'rows' => 3, 'cols' => 60))); $attributes = ['type' => 'hidden', 'name' => $draftitemareainputname, 'value' => $draftitemid]; $commenteditor .= html_writer::empty_tag('input', $attributes); diff --git a/question/type/essay/edit_essay_form.php b/question/type/essay/edit_essay_form.php index 975d9d17030..2109827cb33 100644 --- a/question/type/essay/edit_essay_form.php +++ b/question/type/essay/edit_essay_form.php @@ -52,7 +52,7 @@ class qtype_essay_edit_form extends question_edit_form { $mform->addElement('select', 'responsefieldlines', get_string('responsefieldlines', 'qtype_essay'), $qtype->response_sizes()); - $mform->setDefault('responsefieldlines', 15); + $mform->setDefault('responsefieldlines', 10); $mform->hideIf('responsefieldlines', 'responseformat', 'eq', 'noinline'); // Create a text box that can be enabled/disabled for max/min word limits options. diff --git a/question/type/essay/questiontype.php b/question/type/essay/questiontype.php index 4851b29fe0c..b39fc3e41e0 100644 --- a/question/type/essay/questiontype.php +++ b/question/type/essay/questiontype.php @@ -136,7 +136,10 @@ class qtype_essay extends question_type { * @return array the choices that should be offered for the input box size. */ public function response_sizes() { - $choices = array(); + $choices = [ + 2 => get_string('nlines', 'qtype_essay', 2), + 3 => get_string('nlines', 'qtype_essay', 3), + ]; for ($lines = 5; $lines <= 40; $lines += 5) { $choices[$lines] = get_string('nlines', 'qtype_essay', $lines); }