Permalink
Browse files

better filtering of null answers MDL-8475 merged from HEAD

  • Loading branch information...
1 parent 1e6da87 commit 605d0b0c49f2df48a5d4294d7248cab97d82092a pichetp committed Aug 15, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/type/numerical/questiontype.php
@@ -107,7 +107,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) == '*') {

0 comments on commit 605d0b0

Please sign in to comment.