diff --git a/question/type/essay/renderer.php b/question/type/essay/renderer.php index 5f649f2a9f5..06116ea5801 100644 --- a/question/type/essay/renderer.php +++ b/question/type/essay/renderer.php @@ -225,7 +225,10 @@ class qtype_essay_format_editor_renderer extends plugin_renderer_base { public function response_area_read_only($name, $qa, $step, $lines, $context) { return html_writer::tag('div', $this->prepare_response($name, $qa, $step, $context), - array('class' => $this->class_name() . ' qtype_essay_response readonly')); + ['class' => $this->class_name() . ' qtype_essay_response readonly', + 'style' => 'min-height: ' . ($lines * 1.5) . 'em;']); + // Height $lines * 1.5 because that is a typical line-height on web pages. + // That seems to give results that look OK. } public function response_area_input($name, $qa, $step, $lines, $context) {