From 7ab9ce3a3c17a2cad03de063242f0fe02c06a42e Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 2 Oct 2013 17:15:27 +0100 Subject: [PATCH] MDL-32188 question CBM: fix hard-coded numbers -> constants. --- question/behaviour/deferredcbm/tests/walkthrough_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/question/behaviour/deferredcbm/tests/walkthrough_test.php b/question/behaviour/deferredcbm/tests/walkthrough_test.php index e5fe92f1d61..19d7124916d 100644 --- a/question/behaviour/deferredcbm/tests/walkthrough_test.php +++ b/question/behaviour/deferredcbm/tests/walkthrough_test.php @@ -151,7 +151,7 @@ class qbehaviour_deferredcbm_walkthrough_test extends qbehaviour_walkthrough_tes $this->check_current_output($this->get_contains_correct_expectation(), $this->get_contains_cbm_radio_expectation(1, false, true)); $this->assertEquals(get_string('true', 'qtype_truefalse') . ' [' . - question_cbm::get_string(1) . ']', + question_cbm::get_string(question_cbm::LOW) . ']', $this->quba->get_response_summary($this->slot)); } @@ -211,7 +211,7 @@ class qbehaviour_deferredcbm_walkthrough_test extends qbehaviour_walkthrough_tes $this->quba->get_right_answer_summary($this->slot)); $this->assertRegExp('/' . preg_quote($mc->questiontext, '/') . '/', $this->quba->get_question_summary($this->slot)); - $this->assertRegExp('/(B|C) \[' . preg_quote(question_cbm::get_string(2), '/') . '\]/', + $this->assertRegExp('/(B|C) \[' . preg_quote(question_cbm::get_string(question_cbm::MED), '/') . '\]/', $this->quba->get_response_summary($this->slot)); // Save the old attempt. @@ -247,9 +247,9 @@ class qbehaviour_deferredcbm_walkthrough_test extends qbehaviour_walkthrough_tes $this->check_current_mark(3); $this->check_current_output( $this->get_contains_mc_radio_expectation($rightindex, false, true), - $this->get_contains_cbm_radio_expectation(3, false, true), + $this->get_contains_cbm_radio_expectation(question_cbm::HIGH, false, true), $this->get_contains_correct_expectation()); - $this->assertRegExp('/(A) \[' . preg_quote(question_cbm::get_string(3), '/') . '\]/', + $this->assertRegExp('/(A) \[' . preg_quote(question_cbm::get_string(question_cbm::HIGH), '/') . '\]/', $this->quba->get_response_summary($this->slot)); }