From 16ce52bb7dfc12efdf8775d3fceef9d54e08bfc6 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 4 Jul 2012 17:16:21 +0200 Subject: [PATCH] MDL-32062 question engine: fix simpletests broken by the change. --- question/engine/simpletest/testunitofwork.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/question/engine/simpletest/testunitofwork.php b/question/engine/simpletest/testunitofwork.php index e76085c1b64c3..6c51d3ff52614 100644 --- a/question/engine/simpletest/testunitofwork.php +++ b/question/engine/simpletest/testunitofwork.php @@ -125,7 +125,7 @@ protected function get_test_data() { array(1, 1, 'unit_test', 'interactive', 1, 123, 1, 1, 'interactive', -1, 1, 1.0000000, 0.0000000, 0, '', '', '', 1256233790, 2, 1, 'todo', null, 1256233720, 1, '-_triesleft', 1), array(1, 1, 'unit_test', 'interactive', 1, 123, 1, 1, 'interactive', -1, 1, 1.0000000, 0.0000000, 0, '', '', '', 1256233790, 3, 2, 'todo', null, 1256233740, 1, '-tryagain', 1), array(1, 1, 'unit_test', 'interactive', 1, 123, 1, 1, 'interactive', -1, 1, 1.0000000, 0.0000000, 0, '', '', '', 1256233790, 5, 3, 'gradedright', null, 1256233790, 1, 'answer', 'frog'), - array(1, 1, 'unit_test', 'interactive', 1, 123, 1, 1, 'interactive', -1, 1, 1.0000000, 0.0000000, 0, '', '', '', 1256233790, 5, 3, 'gradedright', 1.0000000, 1256233790, 1, '-finish', 1), + array(1, 1, 'unit_test', 'interactive', 1, 123, 1, 1, 'interactive', -1, 1, 1.0000000, 0.0000000, 0, '', '', '', 1256233790, 5, 3, 'gradedright', 1.0000000, 1256233790, 1, '-submit', 1), ); } @@ -196,7 +196,7 @@ public function test_process_action() { public function test_regrade_same_steps() { // Change the question in a minor way and regrade. - $this->quba->get_question($this->slot)->answer[14]->fraction = 0.5; + $this->quba->get_question($this->slot)->answers[14]->fraction = 0.5; $this->quba->regrade_all_questions(); // Here, the qa, and all the steps, should be marked as updated. @@ -252,7 +252,7 @@ public function test_regrade_losing_steps() { $this->assertEqual(array('-tryagain' => 1), $firstdeletedstep->get_all_data()); $seconddeletedstep = end($deletedsteps); - $this->assertEqual(array('answer' => 'frog', '-finish' => 1), + $this->assertEqual(array('answer' => 'frog', '-submit' => 1), $seconddeletedstep->get_all_data()); }