Skip to content

Commit

Permalink
Modified to allow selection of "No answer" as a condition, but not fo…
Browse files Browse the repository at this point in the history
…r Multiple Choice, or multiple choice with comment type questions.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@906 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Feb 18, 2004
1 parent f53094f commit 135a263
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions admin/conditions.php
Expand Up @@ -60,7 +60,7 @@
//ADD NEW ENTRY IF THIS IS AN ADD
if (isset($_POST['action']) && $_POST['action'] == "insertcondition")
{
if (!$_POST['canswers'] || !$_POST['cquestions'])
if (!isset($_POST['canswers']) || !isset($_POST['cquestions']))
{
echo "<script type=\"text/javascript\">\n<!--\n alert(\"Your condition could not be added! It did not include the question and/or answer upon which the condition was based. Please ensure you have selected a question and an answer.\")\n //-->\n</script>\n";
}
Expand Down Expand Up @@ -239,7 +239,10 @@
$theanswer = addcslashes($arows['answer'], "'");
$canswers[]=array($rows['sid'].$X.$rows['gid'].$X.$rows['qid'], $arows['code'], $theanswer);
}
$canswers[]=array($rows['sid'].$X.$rows['gid'].$X.$rows['qid'], "", "No Answer");
if ($rows['type'] != "M" && $rows['type'] != "P")
{
$canswers[]=array($rows['sid'].$X.$rows['gid'].$X.$rows['qid'], "", "No Answer");
}
break;
}
}
Expand Down

0 comments on commit 135a263

Please sign in to comment.