MDL-47494 gapselect: Fix ddwtos and gapselect unit tests #67
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 8 Jun 2011 18:03:27 +0000 (19:03 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 5 Jul 2011 15:36:39 +0000 (16:36 +0100)
question/type/gapselect/simpletest/testquestion.php
question/type/gapselect/simpletest/testquestiontype.php

index d7bafbc..80d197f 100755 (executable)
@@ -236,13 +236,13 @@ class qtype_gapselect_question_test extends UnitTestCase {
         $gapselect->start_attempt(new question_attempt_step(), 1);
 
         $this->assertEqual(array(
-                    1 => new question_classified_response(1, 'quick', 1),
+                    1 => new question_classified_response(1, 'quick', 1/3),
                     2 => new question_classified_response(2, 'dog', 0),
-                    3 => new question_classified_response(1, 'lazy', 1),
+                    3 => new question_classified_response(1, 'lazy', 1/3),
                 ), $gapselect->classify_response(array('p1' => '1', 'p2' => '2', 'p3' => '1')));
         $this->assertEqual(array(
                     1 => question_classified_response::no_response(),
-                    2 => new question_classified_response(1, 'fox', 1),
+                    2 => new question_classified_response(1, 'fox', 1/3),
                     3 => new question_classified_response(2, 'assiduous', 0),
                 ), $gapselect->classify_response(array('p1' => '0', 'p2' => '1', 'p3' => '2')));
     }
index e8e1656..4b81229 100755 (executable)
@@ -129,15 +129,15 @@ class qtype_gapselect_test extends UnitTestCase {
 
         $this->assertEqual(array(
             1 => array(
-                1 => new question_possible_response('quick', 1),
+                1 => new question_possible_response('quick', 1/3),
                 2 => new question_possible_response('slow', 0),
                 null => question_possible_response::no_response()),
             2 => array(
-                1 => new question_possible_response('fox', 1),
+                1 => new question_possible_response('fox', 1/3),
                 2 => new question_possible_response('dog', 0),
                 null => question_possible_response::no_response()),
             3 => array(
-                1 => new question_possible_response('lazy', 1),
+                1 => new question_possible_response('lazy', 1/3),
                 2 => new question_possible_response('assiduous', 0),
                 null => question_possible_response::no_response()),
         ), $this->qtype->get_possible_responses($q));