diff --git a/question/type/essay/question.php b/question/type/essay/question.php index 5afc2622602..9d331f67b93 100644 --- a/question/type/essay/question.php +++ b/question/type/essay/question.php @@ -247,6 +247,8 @@ class qtype_essay_question extends question_with_responses { 'filetypeslist' => $this->filetypeslist, 'responsetemplate' => $this->responsetemplate, 'responsetemplateformat' => $this->responsetemplateformat, + 'minwordlimit' => $this->minwordlimit, + 'maxwordlimit' => $this->maxwordlimit, ]; return $settings; diff --git a/question/type/essay/tests/question_test.php b/question/type/essay/tests/question_test.php index 2dfc1c70838..bedc06a8a8d 100644 --- a/question/type/essay/tests/question_test.php +++ b/question/type/essay/tests/question_test.php @@ -307,6 +307,7 @@ class qtype_essay_question_test extends advanced_testcase { $this->resetAfterTest(); $essay = test_question_maker::make_an_essay_question(); + $essay->minwordlimit = 15; $essay->start_attempt(new question_attempt_step(), 1); $qa = test_question_maker::get_a_qa($essay); $displayoptions = new question_display_options(); @@ -322,6 +323,8 @@ class qtype_essay_question_test extends advanced_testcase { $this->assertNull($options['filetypeslist']); $this->assertEquals('', $options['responsetemplate']); $this->assertEquals(FORMAT_MOODLE, $options['responsetemplateformat']); + $this->assertEquals($essay->minwordlimit, $options['minwordlimit']); + $this->assertNull($options['maxwordlimit']); } /**