Permalink
Browse files

better filtering of null answers MDL-8475 merged from HEAD

  • Loading branch information...
1 parent 4e4955b commit a478b383cd67cef1fe8925b83dbd9124bc92862b pichetp committed Aug 15, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/type/numerical/questiontype.php
@@ -114,7 +114,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 a478b38

Please sign in to comment.