]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed download for virtual scale questions with type = -1 (eg ATTLS)
authormartin <martin>
Mon, 15 Apr 2002 05:22:43 +0000 (05:22 +0000)
committermartin <martin>
Mon, 15 Apr 2002 05:22:43 +0000 (05:22 +0000)
mod/survey/download.php

index 83fc25635b05ebaec81f56587a89236cd70a705a..adbf6dd793fd68164b498c5ebc7786d6de0f2539 100644 (file)
         }
         foreach ($order as $key => $qid) {
             $question = $questions["$qid"];
-            if ($question->type == "0" || $question->type == "1" || $question->type == "3")  {
+            if ($question->type == "0" || $question->type == "1" || $question->type == "3" || $question->type == "-1")  {
                 $myxls->InsertText("$question->text");
             }
             if ($question->type == "2" || $question->type == "3")  {
     
             foreach ($order as $key => $qid) {
                 $question = $questions["$qid"];
-                if ($question->type == "0" || $question->type == "1" || $question->type == "3")  {
+                if ($question->type == "0" || $question->type == "1" || $question->type == "3" || $question->type == "-1")  {
                     $myxls->InsertText( $results["$user"]["$qid"]["answer1"] );
                 }
                 if ($question->type == "2" || $question->type == "3")  {
     echo "surveyid    surveyname    userid    firstname    lastname    email    idnumber    time    ";
     foreach ($order as $key => $qid) {
         $question = $questions["$qid"];
-        if ($question->type == "0" || $question->type == "1" || $question->type == "3")  {
+        if ($question->type == "0" || $question->type == "1" || $question->type == "3" || $question->type == "-1")  {
             echo "$question->text    ";
         }
         if ($question->type == "2" || $question->type == "3")  {
 
         foreach ($order as $key => $qid) {
             $question = $questions["$qid"];
-            if ($question->type == "0" || $question->type == "1" || $question->type == "3")  {
+            if ($question->type == "0" || $question->type == "1" || $question->type == "3" || $question->type == "-1")  {
                 echo $results["$user"]["$qid"]["answer1"]."    ";
             }
             if ($question->type == "2" || $question->type == "3")  {