diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index 9fc1a5bcef8..34756d2e030 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -85,7 +85,7 @@ class embedded_cloze_qtype extends default_questiontype { } $sequence = array(); foreach($question->options->questions as $wrapped) { - if ($wrapped != ''){ + if (!is_null($wrapped)){ // if we still have some old wrapped question ids, reuse the next of them if (is_array($oldwrappedquestions) && $oldwrappedquestion = array_shift($oldwrappedquestions)) { @@ -222,7 +222,7 @@ class embedded_cloze_qtype extends default_questiontype { global $QTYPES; $responses = array(); foreach($question->options->questions as $key => $wrapped) { - if ($wrapped != ''){ + if (!is_null($wrapped)){ if ($correct = $QTYPES[$wrapped->qtype]->get_correct_responses($wrapped, $state)) { $responses[$key] = $correct['']; } else { @@ -293,7 +293,6 @@ class embedded_cloze_qtype extends default_questiontype { $feedback = '' ; $correctanswer = ''; $strfeedbackwrapped = $strfeedback; - // if($wrapped->qtype == 'numerical' ||$wrapped->qtype == 'shortanswer'){ $testedstate = clone($state); if ($correctanswers = $QTYPES[$wrapped->qtype]->get_correct_responses($wrapped, $testedstate)) { if ($options->readonly && $options->correct_responses) { @@ -319,7 +318,6 @@ class embedded_cloze_qtype extends default_questiontype { $feedback = '