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