Skip to content

Commit

Permalink
BUGFIX: Fixed export timeout issue with Multiple choice with comments…
Browse files Browse the repository at this point in the history
… type question.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1005 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Apr 30, 2004
1 parent 09c2b4d commit 0e21548
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions admin/export.php
Expand Up @@ -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]");
}
}
Expand Down Expand Up @@ -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;}
Expand Down Expand Up @@ -559,6 +563,7 @@
$ar = mysql_query($aq) or die ("Couldnt' count answers to question<br />".$aq."<br />".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;}
Expand Down Expand Up @@ -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<br />".$aq."<br />".mysql_error());
$thisacount = mysql_num_rows($ar);
if ($ftype == "P") {$thisacount=$thisacount*2;}
if ($fother == "Y") {$thisacount++;}
}
if(!isset($usedanswers)) {$usedanswers=0;}
Expand Down

0 comments on commit 0e21548

Please sign in to comment.