From cc04020492f2d7f9eb14d9481807bdf65c4ff73a Mon Sep 17 00:00:00 2001 From: Jason Cleeland Date: Sun, 17 Oct 2004 11:50:22 +0000 Subject: [PATCH] BUGFIX: Fix a table nesting problem with multiple-column multiplechoice questions. provided by C Scott Ananian / Verified Voting git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1247 b72ed6b6-b9f8-46b5-92b4-906544132732 --- qanda.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qanda.php b/qanda.php index 093e110fe2f..241cc861d77 100644 --- a/qanda.php +++ b/qanda.php @@ -1213,12 +1213,14 @@ function do_multiplechoice($ia) $answer .= "\t\t\t\t\t\n"; $divider=""; $maxrows=0; + $closetable=false; if ($dcols >0 && $anscount > $dcols) //Break into columns { $width=sprintf("%0d", 100/$dcols); $maxrows=ceil(100*($anscount/$dcols)/100); //Always rounds up to nearest whole number $answer .= "\n \n
"; $divider=" "; + $closetable=true; } $fn = 1; if (!isset($multifields)) {$multifields="";} @@ -1251,6 +1253,7 @@ function do_multiplechoice($ia) $anscount++; if ($rowcounter==$maxrows) {$answer .= $divider; $rowcounter=0;} } + if ($closetable) $answer.="
\n"; $answer .= "\t\t\t\t\t\n"; if ($dcols <1) { //This just makes a single column look a bit nicer