From: pichetp Date: Tue, 13 Oct 2009 23:21:03 +0000 (+0000) Subject: MDL-20296 removing & in print_question_grading_details() as reported in php analysis X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f0b6151c68d57ff9c50fe87b369683e75c24e791;p=moodle.git MDL-20296 removing & in print_question_grading_details() as reported in php analysis --- diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index fa7fd31745..e2d85dc260 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -406,8 +406,8 @@ class question_numerical_qtype extends question_shortanswer_qtype { if (isset($teststate->responses['unit'])){ $testresponses .= $teststate->responses['unit']; } - if ( isset($responses) && isset($testresponses )) { // echo "

compare response $responses || $testresponses

";print_r($state);echo "

"; + if ( isset($responses) && isset($testresponses )) { return $responses == $testresponses ; } @@ -424,7 +424,7 @@ class question_numerical_qtype extends question_shortanswer_qtype { if ($answer->answer === '*') { return true; } - // echo "

test response numerical state

";print_r($state);echo "

"; + // echo "

test response numerical state

";print_r($state);echo "

"; // echo "

test response numerical question

";print_r($question);echo "

"; if( isset($state->responses['unit']) && isset($question->options->units[$state->responses['unit']])){ @@ -697,7 +697,7 @@ class question_numerical_qtype extends question_shortanswer_qtype { function print_question_grading_details(&$question, &$state, $cmoptions, $options) { // echo "

state uestion_grading_details $question->id $question->qtype

";print_r($state);echo "

"; - parent::print_question_grading_details(&$question, &$state, $cmoptions, $options); + parent::print_question_grading_details($question, $state, $cmoptions, $options); }