Skip to content

Commit

Permalink
New "hide_tip" question attribute - hides the tip (ie: "Please check …
Browse files Browse the repository at this point in the history
…all that apply") on a question by question basis. If the attribute exists for a question, then the tip doesn't display.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1222 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Oct 1, 2004
1 parent 7a2570f commit b939b67
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions qanda.php
Expand Up @@ -215,7 +215,8 @@ function retrieveAnswers($ia, $notanswered=null, $notvalidated=null)
//A bit of housekeeping to stop PHP Notices
$answer = "";
if (!isset($_SESSION[$ia[1]])) {$_SESSION[$ia[1]] = "";}

$qidattributes=getQuestionAttributes($ia[0]);
//echo "<pre>";print_r($qidattributes);echo "</pre>";
//Create the question/answer html
switch ($ia[4])
{
Expand All @@ -231,23 +232,23 @@ function retrieveAnswers($ia, $notanswered=null, $notvalidated=null)
break;
case "L": //LIST drop-down/radio-button list
$values=do_list_radio($ia);
if (count($values[1]) > 1)
if (!$displaycols=arraySearchByKey("hide_tip", $qidattributes, "attribute", 1))
{
$qtitle .= "<br />\n</b><i><font size='1'>"
. _INSTRUCTION_LIST."</font></i><b>";
}
break;
case "!": //List - dropdown
$values=do_list_dropdown($ia);
if (count($values[1]) > 1)
if (!$displaycols=arraySearchByKey("hide_tip", $qidattributes, "attribute", 1))
{
$qtitle .= "<br />\n</b><i><font size='1'>"
. _INSTRUCTION_LIST."</font></i><b>";
}
break;
case "O": //LIST WITH COMMENT drop-down/radio-button list + textarea
$values=do_listwithcomment($ia);
if (count($values[1]) > 1)
if (count($values[1]) > 1 && !$displaycols=arraySearchByKey("hide_tip", $qidattributes, "attribute", 1))
{
$qtitle .= "<br />\n</b><i><font size='1'>"
. _INSTRUCTION_LIST."</font></i><b>";
Expand All @@ -258,15 +259,15 @@ function retrieveAnswers($ia, $notanswered=null, $notvalidated=null)
break;
case "M": //MULTIPLE OPTIONS checkbox
$values=do_multiplechoice($ia);
if (count($values[1]) > 1)
if (count($values[1]) > 1 && !$displaycols=arraySearchByKey("hide_tip", $qidattributes, "attribute", 1))
{
$qtitle .= "<br />\n</b><i><font size='1'>"
$qtitle .= "<br />\n</b><i><font size='1'>"
. _INSTRUCTION_MULTI."</font></i><b>";
}
break;
case "P": //MULTIPLE OPTIONS WITH COMMENTS checkbox + text
$values=do_multiplechoice_withcomments($ia);
if (count($values[1]) > 1)
if (count($values[1]) > 1 && !$displaycols=arraySearchByKey("hide_tip", $qidattributes, "attribute", 1))
{
$qtitle .= "<br />\n</b><i><font size='1'>"
. _INSTRUCTION_MULTI."</font></i><b>";
Expand Down

0 comments on commit b939b67

Please sign in to comment.