Merge branch 'MDL-71251-master' of git://github.com/jleyva/moodle

This commit is contained in:
Jake Dallimore 2021-04-12 14:48:28 +08:00
commit 0bbdf3b910
2 changed files with 5 additions and 0 deletions

View File

@ -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;

View File

@ -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']);
}
/**