Skip to content

Commit

Permalink
Fixed bug/oversight where summary result wasn't showing which answer …
Browse files Browse the repository at this point in the history
…the summary was for with Array Type questions.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@273 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Apr 25, 2003
1 parent f131ea8 commit 186cac8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions admin/statistics.php
Expand Up @@ -476,8 +476,7 @@
$mfield=substr($_POST['summary'], 1, strlen($_POST['summary']))."$row[0]";
$alist[]=array("$row[0]", "$row[1]", $mfield);
}
//foreach ($mfields as $mf) {echo "$mf";} //debug line
//2.

}
elseif (substr($_POST['summary'], 0, 1) == "R") //RANKING OPTION THEREFORE CONFUSING
{
Expand Down Expand Up @@ -642,7 +641,10 @@
$nquery = "SELECT title, type, question, qid FROM questions WHERE qid='$qqid'";
//echo $nquery; //debugging line
$nresult = mysql_query($nquery) or die ("Couldn't get question<br />$nquery<br />".mysql_error());
while ($nrow=mysql_fetch_row($nresult)) {$qtitle=$nrow[0]; $qtype=$nrow[1]; $qquestion=strip_tags($nrow[2]); $qiqid=$nrow[3];}
while ($nrow=mysql_fetch_row($nresult))
{
$qtitle=$nrow[0]; $qtype=$nrow[1]; $qquestion=strip_tags($nrow[2]); $qiqid=$nrow[3];
}
$alist[]=array("", "No Answer");
switch($qtype)
{
Expand All @@ -657,7 +659,10 @@
{
$alist[]=array("$i", "$i");
}
$atext=$qrow[1];
}
$qquestion .= "<br />\n[".$atext."]";
$qtitle .= "($qanswer)";
break;
case "B": //Array of 10 point choices
$qanswer=substr($qqid, strlen($qiqid), strlen($qqid));
Expand All @@ -670,7 +675,10 @@
{
$alist[]=array("$i", "$i");
}
$atext=$qrow[1];
}
$qquestion .= "<br />\n[".$atext."]";
$qtitle .= "($qanswer)";
break;
case "C": //Array of Yes/No/Uncertain
$qanswer=substr($qqid, strlen($qiqid), strlen($qqid));
Expand All @@ -682,7 +690,10 @@
$alist[]=array("Y", "Yes");
$alist[]=array("N", "No");
$alist[]=array("U", "Uncertain");
$atext=$qrow[1];
}
$qquestion .= "<br />\n[".$atext."]";
$qtitle .= "($qanswer)";
break;
case "G": //Gender
$alist[]=array("F", "Female");
Expand Down

0 comments on commit 186cac8

Please sign in to comment.