Skip to content

Commit

Permalink
better filtering of null answers MDL-8475
Browse files Browse the repository at this point in the history
  • Loading branch information
pichetp committed Aug 15, 2008
1 parent f9a2cf8 commit 47c03ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions question/type/numerical/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function save_question_options($question) {

// Insert all the new answers
foreach ($question->answer as $key => $dataanswer) {
if (!isset( $question->deleteanswer[$key] ) && !( trim($dataanswer) == 0 && $question->fraction[$key]== 0 &&trim($question->feedback[$key])=='')) {
if ( !( trim($dataanswer)=='' && $question->fraction[$key]== 0 && trim($question->feedback[$key])=='')) {
$answer = new stdClass;
$answer->question = $question->id;
if (trim($dataanswer) == '*') {
Expand Down Expand Up @@ -182,7 +182,6 @@ function save_question_options($question) {
if (!empty($result->notice)) {
return $result;
}

return true;
}

Expand Down

0 comments on commit 47c03ec

Please sign in to comment.