From fd670f534aef1021973b91f6dcb47891c9ff99c1 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Tue, 5 Jul 2011 18:01:01 +0100 Subject: [PATCH] MDL-47494 ddwtos: Also, fix the ou-qtype unit test failures. #940 --- .../ddwtos/simpletest/testquestiontype.php | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/question/type/ddwtos/simpletest/testquestiontype.php b/question/type/ddwtos/simpletest/testquestiontype.php index 6a6bb735713..f5678e7897e 100755 --- a/question/type/ddwtos/simpletest/testquestiontype.php +++ b/question/type/ddwtos/simpletest/testquestiontype.php @@ -396,26 +396,26 @@ class qtype_ddwtos_test extends UnitTestCase { 'format' => FORMAT_MOODLE, 'files' => array()); $expectedq->choices = array( - array('answer' => array('text' => 'hydrogen', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 1, 'infinite' => false), - array('answer' => array('text' => 'positive', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 1, 'infinite' => false), - array('answer' => array('text' => 'hydroxide', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 1, 'infinite' => false), - array('answer' => array('text' => 'negative', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 1, 'infinite' => false), - array('answer' => array('text' => '107', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 2, 'infinite' => false), - array('answer' => array('text' => '7', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 2, 'infinite' => false), - array('answer' => array('text' => '1', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 2, 'infinite' => false), - array('answer' => array('text' => '10-7', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 2, 'infinite' => false), - array('answer' => array('text' => 'greater', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 3, 'infinite' => false), - array('answer' => array('text' => 'less', 'format' => FORMAT_MOODLE, - 'files' => array()), 'choicegroup' => 3, 'infinite' => false), + array('answer' => array('text' => 'hydrogen', 'format' => FORMAT_MOODLE), + 'choicegroup' => 1, 'infinite' => false), + array('answer' => array('text' => 'positive', 'format' => FORMAT_MOODLE), + 'choicegroup' => 1, 'infinite' => false), + array('answer' => array('text' => 'hydroxide', 'format' => FORMAT_MOODLE), + 'choicegroup' => 1, 'infinite' => false), + array('answer' => array('text' => 'negative', 'format' => FORMAT_MOODLE), + 'choicegroup' => 1, 'infinite' => false), + array('answer' => array('text' => '107', 'format' => FORMAT_MOODLE), + 'choicegroup' => 2, 'infinite' => false), + array('answer' => array('text' => '7', 'format' => FORMAT_MOODLE), + 'choicegroup' => 2, 'infinite' => false), + array('answer' => array('text' => '1', 'format' => FORMAT_MOODLE), + 'choicegroup' => 2, 'infinite' => false), + array('answer' => array('text' => '10-7', 'format' => FORMAT_MOODLE), + 'choicegroup' => 2, 'infinite' => false), + array('answer' => array('text' => 'greater', 'format' => FORMAT_MOODLE), + 'choicegroup' => 3, 'infinite' => false), + array('answer' => array('text' => 'less', 'format' => FORMAT_MOODLE), + 'choicegroup' => 3, 'infinite' => false), ); $expectedq->hint = array(array('text' => 'You may wish to read Section 9 of ' . @@ -428,6 +428,7 @@ class qtype_ddwtos_test extends UnitTestCase { $expectedq->hintclearwrong = array(false, true); $this->assert(new CheckSpecifiedFieldsExpectation($expectedq), $q); + $this->assertEqual($expectedq->choices, $q->choices); $this->assertEqual($expectedq->hint, $q->hint); }