From 0e21548c52fd15d867b448ce20e73872d928f01b Mon Sep 17 00:00:00 2001 From: Jason Cleeland Date: Fri, 30 Apr 2004 09:10:49 +0000 Subject: [PATCH] BUGFIX: Fixed export timeout issue with Multiple choice with comments type question. git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1005 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/export.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/export.php b/admin/export.php index 2503a62ef8e..527a0c33d0d 100644 --- a/admin/export.php +++ b/admin/export.php @@ -478,6 +478,7 @@ foreach ($legitqs as $lq) { echo "DEBUG UNUSED LEGIT QUESTIONS: $lq\n";} echo "QUESTION TYPE: ".$qrow['type']."\n"; echo "Other Debug Info: $debug\n"; + foreach ($origlegitqs as $olq) {echo "DEBUG ORIGINAL LEGIT QUESTIONS: $olq\n";} die("An Export Error Occurred With Field [$fieldinfo]"); } } @@ -505,11 +506,14 @@ } elseif ($ftype == "O") //List with Comment { + $debug .= "DOING A COMMENT TYPE ONE\n"; $thisacount=2; if (!isset($usedanswers)) {$usedanswers=0;} $usedanswers++; + $debug .= "USEDANSWERS = $usedanswers AND THISACOUNT = $thisacount\n"; if (isset($usedanswers) && isset($thisacount) && $usedanswers == $thisacount) { + $debug .= "Iterating through legit questions..\n"; foreach ($legitqs as $lgqs) { if ($lgqs != $fqid) {$nlegitqs[]=$lgqs;} @@ -559,6 +563,7 @@ $ar = mysql_query($aq) or die ("Couldnt' count answers to question
".$aq."
".mysql_error()); $debug .= "LAST SELECT TO GET ACOUNT: $aq |"; $thisacount = mysql_num_rows($ar); + if ($ftype == "P") {$thisacount=$thisacount*2;} if ($fother == "Y") {$thisacount++;} } if(!isset($usedanswers)) {$usedanswers=0;} @@ -860,6 +865,7 @@ $aq = "SELECT code FROM {$dbprefix}answers WHERE qid=$fqid"; //We just want to count how many answers so we can delete the legitq entry when they're all used up $ar = mysql_query($aq) or die ("Couldnt' count answers to question
".$aq."
".mysql_error()); $thisacount = mysql_num_rows($ar); + if ($ftype == "P") {$thisacount=$thisacount*2;} if ($fother == "Y") {$thisacount++;} } if(!isset($usedanswers)) {$usedanswers=0;}