Index: group.php
===================================================================
--- group.php (revision 8796)
+++ group.php (working copy)
@@ -326,9 +326,13 @@
$qtypesarray = array();
+$qnumber = 0;
+
foreach ($_SESSION['fieldarray'] as $ia)
{
$qtypesarray[$ia[1]] = $ia[4];
+ ++$qnumber;
+ $ia[9] = $qnumber; // incremental question count;
if ($ia[5] == $gid)
{
Index: question.php
===================================================================
--- question.php (revision 8796)
+++ question.php (working copy)
@@ -109,7 +109,7 @@
else {$currentquestion=$_SESSION['step']-1;}
$ia=$_SESSION['fieldarray'][$currentquestion];
-
+$ia[]=$_SESSION['step'];
list($newgroup, $gid, $groupname, $groupdescription, $gl)=checkIfNewGroup($ia);
// MANAGE CONDITIONAL QUESTIONS AND HIDDEN QUESTIONS
Index: config-defaults.php
===================================================================
--- config-defaults.php (revision 8796)
+++ config-defaults.php (working copy)
@@ -76,7 +76,7 @@
// has not been answered. 1=Allow, 0=Deny
$deletenonvalues = 1; // By default, LimeSurvey does not save responses to conditional questions that haven't been answered/shown. To have LimeSurvey save these responses change this value to 0.
$printanswershonorsconditions = 1; // Set to 1 if you want the participant printanswers feature to show only the questions that were displayed survey branching-logic
-$shownoanswer = 1; // Show 'no answer' for non mandatory questions
+$shownoanswer = 1; // Show 'no answer' for non mandatory questions ( 0 = no , 1 = yes , 2 = survey admin can choose )
$admintheme = 'default'; // This setting specifys the directory where the admin finds it theme/css style files, e.g. setting 'default' points to /admin/styles/default
$defaulttemplate = 'default'; // This setting specifys the default theme used for the 'public list' of surveys
@@ -425,6 +425,41 @@
$updatecheckperiod=7;
+/**
+ * @var $showXquestions string allows you to control whether or not
+ * {THEREAREXQUESTIONS} is displayed (if it is included in a template)
+ * hide = always hide {THEREAREXQUESTIONS}
+ * show = always show {THEREAREXQUESTIONS}
+ * choose = allow survey admins to choose
+ */
+$showXquestions = 'choose';
+
+
+/**
+ * @var $showgroupinfo string allows you to control whether or not
+ * {GROUPNAME} and/or {GROUPDESCRIPTION} are displayed (if they are
+ * included in a template)
+ * none = always hide both title and description
+ * name = always {GROUPNAME} only
+ * description = always show {GROUPDESCRIPTION} only
+ * both = always show both {GROUPNAME} and {GROUPDESCRIPTION}
+ * choose = allow survey admins to choose
+ */
+$showgroupinfo = 'choose';
+
+
+/**
+ * @var $showqnumcode string allows you to control whether or not
+ * {QUESTION_NUMBER} and/or {QUESTION_CODE} are displayed (if they
+ * are included in a template)
+ * none = always hide both {QUESTION_NUMBER} and {QUESTION_CODE}
+ * code = always show {QUESTION_CODE} only
+ * number = always show {QUESTION_NUMBER} only
+ * both = always show both {QUESTION_NUMBER} and {QUESTION_CODE}
+ * choose = allow survey admins to choose
+ */
+$showqnumcode = 'choose';
+
//DO NOT EVER CHANGE THE FOLLOWING LINE ---------------
require_once(dirname(__FILE__).'/config.php');
//-----------------------------------------------------
Index: qanda.php
===================================================================
--- qanda.php (revision 8796)
+++ qanda.php (working copy)
@@ -34,6 +34,7 @@
* $ia[6] => mandatory Y || N
* $ia[7] => conditions exist for this question
* $ia[8] => other questions have conditions which rely on this question (including array_filter and array_filter_exclude attributes)
+ * $ia[9] => incremental question count (used by {QUESTION_NUMBER})
*
* $conditions element structure
* $condition[n][0] => qid = question id
@@ -46,6 +47,15 @@
* $condition[n][7] => scenario *NEW BY R.L.J. van den Burg*
*/
+if($shownoanswer > 0 && $thissurvey['shownoanswer'] != 'N')
+{
+ define('SHOW_NO_ANSWER',1);
+}
+else
+{
+ define('SHOW_NO_ANSWER',0);
+};
+
function retrieveConditionInfo($ia)
{
//This function returns an array containing all related conditions
@@ -474,7 +484,7 @@
function retrieveAnswers($ia, $notanswered=null, $notvalidated=null)
{
//globalise required config variables
- global $dbprefix, $shownoanswer, $clang; //These are from the config-defaults.php file
+ global $dbprefix, $clang; //These are from the config-defaults.php file
global $thissurvey, $gl; //These are set by index.php
global $connect;
@@ -513,6 +523,8 @@
$question_text = array(
'all' => '' // All has been added for backwards compatibility with templates that use question_start.pstpl (now redundant)
,'text' => $qtitle
+ ,'code' => $ia[2]
+ ,'number' => $ia[9]
,'help' => ''
,'mandatory' => ''
,'man_message' => ''
@@ -1414,7 +1426,7 @@
// ---------------------------------------------------------------
function do_5pointchoice($ia)
{
- global $shownoanswer, $clang;
+ global $clang;
if ($ia[8] == 'Y')
{
@@ -1436,7 +1448,7 @@
$answer .= " onclick=\"$checkconditionFunction(this.value, this.name, this.type)\" />\n$fp \n\t\n";
}
- if ($ia[6] != "Y" && $shownoanswer == 1) // Add "No Answer" option if question is not mandatory
+ if ($ia[6] != "Y" && SHOW_NO_ANSWER == 1) // Add "No Answer" option if question is not mandatory
{
$answer .= "\t
\n '.$othertext."\n";
}
- if ((isset($_SESSION[$ia[1]]) || $_SESSION[$ia[1]] != '') && (!isset($defexists) || !$defexists) && $ia[6] != 'Y' && $shownoanswer == 1)
+ if ((isset($_SESSION[$ia[1]]) || $_SESSION[$ia[1]] != '') && (!isset($defexists) || !$defexists) && $ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer .= ''.$clang->gT('No answer')." \n";
}
@@ -1953,7 +1965,7 @@
function do_list_radio($ia)
{
global $dbprefix, $dropdownthreshold, $lwcdropdowns, $connect, $clang;
- global $shownoanswer, $thissurvey;
+ global $thissurvey;
if ($ia[8] == 'Y')
@@ -2015,7 +2027,7 @@
}
if (isset($other) && $other=='Y') {$anscount++;} //Count up for the Other answer
- if ($ia[6] != 'Y' && $shownoanswer == 1) {$anscount++;} //Count up if "No answer" is showing
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {$anscount++;} //Count up if "No answer" is showing
$wrapper = setup_columns($dcols , $anscount);
$answer = $wrapper['whole-start'];
@@ -2139,7 +2151,7 @@
}
}
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
if (((!isset($_SESSION[$ia[1]]) || $_SESSION[$ia[1]] == '') && (!isset($defexists) || !$defexists)) || ($_SESSION[$ia[1]] == ' ' && (!isset($defexists) || !$defexists)))
{
@@ -2212,7 +2224,7 @@
function do_listwithcomment($ia)
{
global $maxoptionsize, $dbprefix, $dropdownthreshold, $lwcdropdowns;
- global $shownoanswer, $clang;
+ global $clang;
if ($ia[8] == 'Y')
{
@@ -2274,7 +2286,7 @@
';
}
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
if (((!isset($_SESSION[$ia[1]]) || $_SESSION[$ia[1]] == '') && (!isset($defexists) || !$defexists)) ||($_SESSION[$ia[1]] == ' ' && (!isset($defexists) || !$defexists)))
{
@@ -2344,7 +2356,7 @@
$maxoptionsize = strlen($ansrow['answer']);
}
}
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
if (((!isset($_SESSION[$ia[1]]) || $_SESSION[$ia[1]] == '') && (!isset($defexists) || !$defexists)) ||($_SESSION[$ia[1]] == ' ' && (!isset($defexists) || !$defexists)))
{
@@ -4519,7 +4531,7 @@
// ---------------------------------------------------------------
function do_yesno($ia)
{
- global $shownoanswer, $clang;
+ global $clang;
if ($ia[8] == 'Y')
{
@@ -4550,7 +4562,7 @@
$answer .= " onclick=\"$checkconditionFunction(this.value, this.name, this.type)\" />\n\n\t".$clang->gT('No')."\n \n\t \n";
// --> END NEW FEATURE - SAVE
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer .= "\t\n \n".$clang->gT('Male')." \n\t \n";
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
/* columns now done by CSS
if ($dcols > 2)
@@ -4648,7 +4660,7 @@
*/
function do_array_5point($ia)
{
- global $dbprefix, $shownoanswer, $notanswered, $thissurvey, $clang;
+ global $dbprefix, $notanswered, $thissurvey, $clang;
if ($ia[8] == 'Y')
{
@@ -4672,7 +4684,7 @@
}
$cellwidth = 5; // number of columns
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
++$cellwidth; // add another column
}
@@ -4707,7 +4719,7 @@
$odd_even = alternation($odd_even);
$answer .= " \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$odd_even = alternation($odd_even);
$answer .= " \n";
@@ -4720,7 +4732,7 @@
$answer .= "\t$xc \n";
}
if ($right_exists) {$answer .= "\t \n";}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$answer .= "\t".$clang->gT('No answer')." \n";
}
@@ -4783,7 +4795,7 @@
}
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$answer_t_content .= "\t\n"
."\n\t gT('No answer').'"';
@@ -4815,7 +4827,7 @@
*/
function do_array_10point($ia)
{
- global $dbprefix, $shownoanswer, $notanswered, $thissurvey, $clang;
+ global $dbprefix, $notanswered, $thissurvey, $clang;
if ($ia[8] == 'Y')
{
@@ -4840,7 +4852,7 @@
$answerwidth = 20;
}
$cellwidth = 10; // number of columns
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
++$cellwidth; // add another column
}
@@ -4867,7 +4879,7 @@
$odd_even = alternation($odd_even);
$answer .= " \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$odd_even = alternation($odd_even);
$answer .= " \n";
@@ -4879,7 +4891,7 @@
{
$answer .= "\t$xc \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$answer .= "\t".$clang->gT('No answer')." \n";
}
@@ -4926,7 +4938,7 @@
// --> END NEW FEATURE - SAVE
}
- if ($ia[6] != "Y" && $shownoanswer == 1)
+ if ($ia[6] != "Y" && SHOW_NO_ANSWER == 1)
{
$answer_t_content .= "\t\n\n"
."\t gT('No answer')."\"";
@@ -4951,7 +4963,7 @@
// ---------------------------------------------------------------
function do_array_yesnouncertain($ia)
{
- global $dbprefix, $shownoanswer, $notanswered, $thissurvey, $clang;
+ global $dbprefix, $notanswered, $thissurvey, $clang;
if ($ia[8] == 'Y')
{
@@ -4975,7 +4987,7 @@
$answerwidth = 20;
}
$cellwidth = 3; // number of columns
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
++$cellwidth; // add another column
}
@@ -5000,7 +5012,7 @@
$odd_even = alternation($odd_even);
$answer .= " \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$odd_even = alternation($odd_even);
$answer .= " \n";
@@ -5011,7 +5023,7 @@
. "\t".$clang->gT('Yes')." \n"
. "\t".$clang->gT('Uncertain')." \n"
. "\t".$clang->gT('No')." \n";
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$answer .= "\t".$clang->gT('No answer')." \n";
}
@@ -5082,7 +5094,7 @@
}
$answer_t_content .= "\" />\n\t \n";
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer_t_content .= "\t\n\t\n"
. "\t gT('No answer')."\"";
@@ -5106,7 +5118,6 @@
function do_array_increasesamedecrease($ia)
{
global $dbprefix, $thissurvey, $clang;
- global $shownoanswer;
global $notanswered;
if ($ia[8] == 'Y')
@@ -5130,7 +5141,7 @@
$answerwidth = 20;
}
$cellwidth = 3; // number of columns
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
++$cellwidth; // add another column
}
@@ -5162,7 +5173,7 @@
$odd_even = alternation($odd_even);
$answer .= " \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$odd_even = alternation($odd_even);
$answer .= " \n";
@@ -5174,7 +5185,7 @@
. "\t".$clang->gT('Increase')." \n"
. "\t".$clang->gT('Same')." \n"
. "\t".$clang->gT('Decrease')." \n";
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$answer .= "\t".$clang->gT('No answer')." \n";
}
@@ -5251,7 +5262,7 @@
if (isset($_SESSION[$myfname])) {$answer_body .= $_SESSION[$myfname];}
$answer_body .= "\" />\n\t \n";
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer_body .= "\t\n"
. "\n"
@@ -5276,7 +5287,6 @@
function do_array_flexible($ia)
{
global $dbprefix, $connect, $thissurvey, $clang;
- global $shownoanswer;
global $repeatheadings;
global $notanswered;
global $minrepeatheadings;
@@ -5342,7 +5352,7 @@
$fn=1;
$numrows = count($labelans);
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
++$numrows;
}
@@ -5361,7 +5371,7 @@
$answer_head .= "\t".$ld." \n";
}
if ($right_exists) {$answer_head .= "\t \n";}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory and we can show "no answer"
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory and we can show "no answer"
{
$answer_head .= "\t".$clang->gT('No answer')." \n";
}
@@ -5383,7 +5393,7 @@
{
$answer .= "\t".$ld." \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory and we can show "no answer"
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory and we can show "no answer"
{
$answer .= "\t".$clang->gT('No answer')." \n";
}
@@ -5450,7 +5460,7 @@
$answer .= "\t \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer .= "\t\n\n"
."\t gT('No answer').'"';
@@ -5483,7 +5493,7 @@
$odd_even = alternation($odd_even);
$answer_cols .= " \n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory
{
$odd_even = alternation($odd_even);
$answer_cols .= " \n";
@@ -5624,7 +5634,6 @@
function do_array_multitext($ia)
{
global $dbprefix, $connect, $thissurvey, $clang;
- global $shownoanswer;
global $repeatheadings;
global $notanswered;
global $minrepeatheadings;
@@ -5684,7 +5693,7 @@
$labelcode[]=$lrow['title'];
}
$numrows=count($labelans);
- if ($ia[6] != 'Y' && $shownoanswer == 1) {$numrows++;}
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {$numrows++;}
$cellwidth=$columnswidth/$numrows;
$cellwidth=sprintf('%02d', $cellwidth);
@@ -5841,7 +5850,6 @@
function do_array_multiflexi($ia)
{
global $dbprefix, $connect, $thissurvey, $clang;
- global $shownoanswer;
global $repeatheadings;
global $notanswered;
global $minrepeatheadings;
@@ -5924,7 +5932,7 @@
$labelcode[]=$lrow['title'];
}
$numrows=count($labelans);
- if ($ia[6] != 'Y' && $shownoanswer == 1) {$numrows++;}
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {$numrows++;}
$cellwidth=$columnswidth/$numrows;
$cellwidth=sprintf('%02d', $cellwidth);
@@ -6145,7 +6153,6 @@
function do_array_flexiblecolumns($ia)
{
global $dbprefix;
- global $shownoanswer;
global $notanswered, $clang;
if ($ia[8] == 'Y')
@@ -6171,7 +6178,7 @@
$labelcode[]=$lrow['code'];
$labels[]=array("answer"=>$lrow['answer'], "code"=>$lrow['code']);
}
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$labelcode[]='';
$labelans[]=$clang->gT('No answer');
@@ -6298,7 +6305,6 @@
function do_array_flexible_dual($ia)
{
global $dbprefix, $connect, $thissurvey, $clang;
- global $shownoanswer;
global $repeatheadings;
global $notanswered;
global $minrepeatheadings;
@@ -6374,7 +6380,7 @@
}
}
$numrows=count($labelans) + count($labelans1);
- if ($ia[6] != "Y" && $shownoanswer == 1) {$numrows++;}
+ if ($ia[6] != "Y" && SHOW_NO_ANSWER == 1) {$numrows++;}
$cellwidth=$columnswidth/$numrows;
$cellwidth=sprintf("%02d", $cellwidth);
@@ -6465,7 +6471,7 @@
{
$mycolumns .= "\n\t \n\n";
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory and we can show "no answer"
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory and we can show "no answer"
{
$myheader2 .= "\t".$clang->gT('No answer')." \n";
$odd_even = alternation($odd_even);
@@ -6492,7 +6498,7 @@
$myheader1 .= "\t \n";
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$myheader1 .= "\t \n";
}
@@ -6532,7 +6538,7 @@
$answer .= "\t".$ld." \n";
}
}
- if ($ia[6] != 'Y' && $shownoanswer == 1) //Question is not mandatory and we can show "no answer"
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) //Question is not mandatory and we can show "no answer"
{
$answer .= "\t \n"; // separator
$answer .= "\t".$clang->gT('No answer')." \n";
@@ -6639,7 +6645,7 @@
$answer .= "\t \n"; // separator
}
- if ($ia[6] != "Y" && $shownoanswer == 1)
+ if ($ia[6] != "Y" && SHOW_NO_ANSWER == 1)
{
$answer .= "\t\n"
. "\n"
@@ -6850,7 +6856,7 @@
$answer .= '>'.$lrow['title']."\n";
}
// If not mandatory and showanswer, show no ans
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer .= "\t\n";
}
// If not mandatory and showanswer, show no ans
- if ($ia[6] != 'Y' && $shownoanswer == 1)
+ if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1)
{
$answer .= "\t
\ No newline at end of file
+?>
Index: common.php
===================================================================
--- common.php (revision 8796)
+++ common.php (working copy)
@@ -2805,7 +2805,8 @@
global $percentcomplete, $move;
global $groupname, $groupdescription;
global $question;
- global $questioncode, $answer, $navigator;
+ global $showXquestions, $showgroupinfo, $showqnumcode;
+ global $answer, $navigator;
global $help, $totalquestions, $surveyformat;
global $completed, $register_errormsg;
global $notanswered, $privacy, $surveyid;
@@ -2867,9 +2868,36 @@
if (strpos($line, "{WELCOME}") !== false) $line=str_replace("{WELCOME}", $thissurvey['welcome'], $line);
if (strpos($line, "{LANGUAGECHANGER}") !== false) $line=str_replace("{LANGUAGECHANGER}", $languagechanger, $line);
if (strpos($line, "{PERCENTCOMPLETE}") !== false) $line=str_replace("{PERCENTCOMPLETE}", $percentcomplete, $line);
- if (strpos($line, "{GROUPNAME}") !== false) $line=str_replace("{GROUPNAME}", $groupname, $line);
- if (strpos($line, "{GROUPDESCRIPTION}") !== false) $line=str_replace("{GROUPDESCRIPTION}", $groupdescription, $line);
+ if(
+ $showgroupinfo == 'both' ||
+ $showgroupinfo == 'name' ||
+ ($showgroupinfo == 'choose' && !isset($thissurvey['showgroupinfo'])) ||
+ ($showgroupinfo == 'choose' && $thissurvey['showgroupinfo'] == 'B') ||
+ ($showgroupinfo == 'choose' && $thissurvey['showgroupinfo'] == 'N')
+ )
+ {
+ if (strpos($line, "{GROUPNAME}") !== false) $line=str_replace("{GROUPNAME}", $groupname, $line);
+ }
+ else
+ {
+ if (strpos($line, "{GROUPNAME}") !== false) $line=str_replace("{GROUPNAME}", '' , $line);
+ };
+ if(
+ $showgroupinfo == 'both' ||
+ $showgroupinfo == 'description' ||
+ ($showgroupinfo == 'choose' && !isset($thissurvey['showgroupinfo'])) ||
+ ($showgroupinfo == 'choose' && $thissurvey['showgroupinfo'] == 'B') ||
+ ($showgroupinfo == 'choose' && $thissurvey['showgroupinfo'] == 'D')
+ )
+ {
+ if (strpos($line, "{GROUPDESCRIPTION}") !== false) $line=str_replace("{GROUPDESCRIPTION}", $groupdescription, $line);
+ }
+ else
+ {
+ if (strpos($line, "{GROUPDESCRIPTION}") !== false) $line=str_replace("{GROUPDESCRIPTION}", '' , $line);
+ };
+
if (is_array($question))
{
if (strpos($line, "{QUESTION}") !== false)
@@ -2894,10 +2922,39 @@
if (strpos($line, '{QUESTION_MAN_CLASS}') !== false) $line=str_replace('{QUESTION_MAN_CLASS}', $question['man_class'], $line);
if (strpos($line, "{QUESTION_INPUT_ERROR_CLASS}") !== false) $line=str_replace("{QUESTION_INPUT_ERROR_CLASS}", $question['input_error_class'], $line);
+ if(
+ $showqnumcode == 'both' ||
+ $showqnumcode == 'number' ||
+ ($showqnumcode == 'choose' && !isset($thissurvey['showqnumcode'])) ||
+ ($showqnumcode == 'choose' && $thissurvey['showqnumcode'] == 'B') ||
+ ($showqnumcode == 'choose' && $thissurvey['showqnumcode'] == 'N')
+ )
+ {
+ if (strpos($line, "{QUESTION_NUMBER}") !== false) $line=str_replace("{QUESTION_NUMBER}", $question['number'], $line);
+ }
+ else
+ {
+ if (strpos($line, "{QUESTION_NUMBER}") !== false) $line=str_replace("{QUESTION_NUMBER}", '' , $line);
+ };
+ if(
+ $showqnumcode == 'both' ||
+ $showqnumcode == 'code' ||
+ ($showqnumcode == 'choose' && !isset($thissurvey['showqnumcode'])) ||
+ ($showqnumcode == 'choose' && $thissurvey['showqnumcode'] == 'B') ||
+ ($showqnumcode == 'choose' && $thissurvey['showqnumcode'] == 'C')
+ )
+ {
+ if (strpos($line, "{QUESTION_CODE}") !== false) $line=str_replace("{QUESTION_CODE}", $question['code'], $line);
+ }
+ else
+ {
+ if (strpos($line, "{QUESTION_CODE}") !== false) $line=str_replace("{QUESTION_CODE}", '' , $line);
+ };
+
if (strpos($line, "{QUESTION_CODE}") !== false) $line=str_replace("{QUESTION_CODE}", $question['code'], $line);
if (strpos($line, "{ANSWER}") !== false) $line=str_replace("{ANSWER}", $answer, $line);
$totalquestionsAsked = $totalquestions - $totalBoilerplatequestions;
- if ($totalquestionsAsked < 1)
+/* if ($totalquestionsAsked < 1)
{
if (strpos($line, "{THEREAREXQUESTIONS}") !== false) $line=str_replace("{THEREAREXQUESTIONS}", $clang->gT("There are no questions in this survey"), $line); //Singular
}
@@ -2909,6 +2966,30 @@
{
if (strpos($line, "{THEREAREXQUESTIONS}") !== false) $line=str_replace("{THEREAREXQUESTIONS}", $clang->gT("There are {NUMBEROFQUESTIONS} questions in this survey."), $line); //Note this line MUST be before {NUMBEROFQUESTIONS}
}
+*/
+ if(
+ $showXquestions == 'show' ||
+ ($showXquestions == 'choose' && !isset($thissurvey['showXquestions'])) ||
+ ($showXquestions == 'choose' && $thissurvey['showXquestions'] == 'Y')
+ )
+ {
+ if ($totalquestionsAsked < 1)
+ {
+ if (strpos($line, "{THEREAREXQUESTIONS}") !== false) $line=str_replace("{THEREAREXQUESTIONS}", $clang->gT("There are no questions in this survey"), $line); //Singular
+ }
+ if ($totalquestionsAsked == 1)
+ {
+ if (strpos($line, "{THEREAREXQUESTIONS}") !== false) $line=str_replace("{THEREAREXQUESTIONS}", $clang->gT("There is 1 question in this survey"), $line); //Singular
+ }
+ else
+ {
+ if (strpos($line, "{THEREAREXQUESTIONS}") !== false) $line=str_replace("{THEREAREXQUESTIONS}", $clang->gT("There are {NUMBEROFQUESTIONS} questions in this survey."), $line); //Note this line MUST be before {NUMBEROFQUESTIONS}
+ };
+ }
+ else
+ {
+ if (strpos($line, '{THEREAREXQUESTIONS}') !== false) $line=str_replace('{THEREAREXQUESTIONS}' , '' , $line);
+ };
if (strpos($line, "{NUMBEROFQUESTIONS}") !== false) $line=str_replace("{NUMBEROFQUESTIONS}", $totalquestionsAsked, $line);
if (strpos($line, "{TOKEN}") !== false) {
Index: survey.php
===================================================================
--- survey.php (revision 8796)
+++ survey.php (working copy)
@@ -251,8 +251,11 @@
{
$gid=$gl[0];
$groupUnconditionnalQuestionsCount[$gid]=0;
+ $qnumber = 0;
foreach ($_SESSION['fieldarray'] as $ia)
{
+ ++$qnumber;
+ $ia[9] = $qnumber; // incremental question count;
if ($ia[5] == $gid)
{
$qidattributes=getQuestionAttributes($ia[0]);
@@ -260,6 +263,7 @@
continue;
}
$qtypesarray[$ia[1]] = $ia[4];
+
list($plus_qanda, $plus_inputnames)=retrieveAnswers($ia);
if ($plus_qanda)
{
Index: admin/database.php
===================================================================
--- admin/database.php (revision 8796)
+++ admin/database.php (working copy)
@@ -1070,6 +1070,10 @@
'printanswers'=>$_POST['printanswers'],
'publicstatistics'=>$_POST['publicstatistics'],
'autoredirect'=>$_POST['autoredirect'],
+ 'showXquestions'=>$_POST['showXquestions'],
+ 'showgroupinfo'=>$_POST['showgroupinfo'],
+ 'showqnumcode'=>$_POST['showqnumcode'],
+ 'shownoanswer'=>$_POST['shownoanswer'],
'allowprev'=>$_POST['allowprev'],
'listpublic'=>$_POST['public'],
'htmlemail'=>$_POST['htmlemail'],
@@ -1317,6 +1321,10 @@
'allowregister'=>$_POST['allowregister'],
'allowsave'=>$_POST['allowsave'],
'autoredirect'=>$_POST['autoredirect'],
+ 'showXquestions'=>$_POST['showXquestions'],
+ 'showgroupinfo'=>$_POST['showgroupinfo'],
+ 'showqnumcode'=>$_POST['showqnumcode'],
+ 'shownoanswer'=>$_POST['shownoanswer'],
'allowprev'=>$_POST['allowprev'],
'printanswers'=>$_POST['printanswers'],
// 'usetokens'=>$_POST['usetokens'],
@@ -1443,4 +1451,4 @@
}
}
-?>
\ No newline at end of file
+?>
Index: admin/html.php
===================================================================
--- admin/html.php (revision 8796)
+++ admin/html.php (working copy)
@@ -2689,6 +2689,172 @@
. "";
+ // Show {THEREAREXQUESTIONS} block
+ switch($showXquestions)
+ {
+ case 'show':
+ $editsurvey .= ''
+ . $clang->gT('Show "There are X questions in this survey"')
+ . ' ';
+ break;
+ case 'hide':
+ $editsurvey .= ''
+ . $clang->gT('Show "There are X questions in this survey"')
+ . ' ';
+ break;
+ case 'choose':
+ default:
+ $sel_showxq = array( 'Y' => '' , 'N' => '' );
+ if(isset($esrow['showXquestions']))
+ {
+ $set_showxq = $esrow['showXquestions'];
+ $sel_showxq[$set_showxq] = ' selected="selected"';
+ }
+ if(empty($sel_showxq['Y']) && empty($sel_showxq['N']))
+ {
+ $sel_showxq['Y'] = ' selected="selected"';
+ };
+ $editsurvey .= ''.$clang->gT('Show "There are X questions in this survey"')." \n"
+ . ''
+ . ''.$clang->gT('Yes')." \n"
+ . ''.$clang->gT('No')." \n"
+ . ' ';
+ unset($sel_showxq,$set_showxq);
+ break;
+ }
+
+
+ // Show {GROUPNAME} and/or {GROUPDESCRIPTION} block
+ switch($showgroupinfo)
+ {
+ case 'both':
+ $editsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'name':
+ $editsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'description':
+ $editsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'none':
+ $editsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'choose':
+ default:
+ $sel_showgri = array( 'B' => '' , 'D' => '' , 'N' => '' , 'X' => '' );
+ if(isset($esrow['showgroupinfo']))
+ {
+ $set_showgri = $esrow['showgroupinfo'];
+ $sel_showgri[$set_showgri] = ' selected="selected"';
+ }
+ if(empty($sel_showgri['B']) && empty($sel_showgri['D']) && empty($sel_showgri['N']) && empty($sel_showgri['X']) )
+ {
+ $sel_showgri['C'] = ' selected="selected"';
+ };
+ $editsurvey .= ''.$clang->gT('Show Group Name and/or Group Description')." \n"
+ . ''
+ . ''.$clang->gT('Show both')." \n"
+ . ''.$clang->gT('Show group name only')." \n"
+ . ''.$clang->gT('Show group description only')." \n"
+ . ''.$clang->gT('Hide both')." \n"
+ . ' ';
+ unset($sel_showgri,$set_showgri);
+ break;
+ };
+
+
+
+ // Show {QUESTION_CODE} and/or {QUESTION_NUMBER} block
+ switch($showqnumcode)
+ {
+ case 'none':
+ $editsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'number':
+ $editsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'code':
+ $editsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'both':
+ $editsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'choose':
+ default:
+ $sel_showqnc = array( 'B' => '' , 'C' => '' , 'N' => '' , 'X' => '' );
+ if(isset($esrow['showqnumcode']))
+ {
+ $set_showqnc = $esrow['showqnumcode'];
+ $sel_showqnc[$set_showqnc] = ' selected="selected"';
+ }
+ if(empty($sel_showqnc['B']) && empty($sel_showqnc['C']) && empty($sel_showqnc['N']) && empty($sel_showqnc['X']) )
+ {
+ $sel_showqnc['C'] = ' selected="selected"';
+ };
+ $editsurvey .= ''.$clang->gT('Show Question Number and/or Question Code')." \n"
+ . ''
+ . ''.$clang->gT('Show both')." \n"
+ . ''.$clang->gT('Show question number only')." \n"
+ . ''.$clang->gT('Show question Code only')." \n"
+ . ''.$clang->gT('Hide both')." \n"
+ . ' ';
+ unset($sel_showqnc,$set_showqnc);
+ break;
+ };
+
+
+ // Show "No Answer" block
+ switch($shownoanswer)
+ {
+ case 0:
+ $editsurvey .= ''.$clang->gT('"Show no answer" is forced off by the system adminstrator.').' ';
+ break;
+ case 2:
+ $editsurvey .= ''.$clang->gT('Show No Answer')." \n"
+ . '';
+ $editsurvey .= 'gT('Yes')." \n";
+ $editsurvey .= 'gT('No')." \n"
+ . ' ';
+ break;
+ default:
+ $editsurvey .= ''.$clang->gT('"Show no answer" is forced on by the system adminstrator.').' ';
+ break;
+ };
+
+
+
+
+
// End Presention and navigation TAB
$editsurvey .= "\n";
@@ -3286,10 +3452,140 @@
. "\n"
. "".$clang->gT("Yes")." \n"
. "".$clang->gT("No")." \n"
- . " "
+ . "";
+ // Show {THEREAREXQUESTIONS} block
+ switch($showXquestions)
+ {
+ case 'show':
+ $newsurvey .= ''.$clang->gT('Show "There are X questions in this survey"').' '
+ . ' ';
+ break;
+ case 'hide':
+ $newsurvey .= ''. $clang->gT('Show "There are X questions in this survey"').' '
+ . ' ';
+ break;
+ case 'choose':
+ default:
+ $newsurvey .= ''.$clang->gT('Show "There are X questions in this survey"')." \n"
+ . ''
+ . ''.$clang->gT('Yes')." \n"
+ . ''.$clang->gT('No')." \n"
+ . ' ';
+ break;
+ };
+ $newsurvey .= ' ';
+
+
+ // Show {GROUPNAME} and/or {GROUPDESCRIPTION} block
+ switch($showgroupinfo)
+ {
+ case 'both':
+ $newsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'name':
+ $newsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'description':
+ $newsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'none':
+ $newsurvey .= ''
+ . $clang->gT('Show Group Name and/or Group Description')
+ . ' ';
+ break;
+ case 'choose':
+ default:
+ $newsurvey .= ''.$clang->gT('Show Group Name and/or Group Description')." \n"
+ . ''
+ . ''.$clang->gT('Show both')." \n"
+ . ''.$clang->gT('Show group name only')." \n"
+ . ''.$clang->gT('Show group description only')." \n"
+ . ''.$clang->gT('Hide both')." \n"
+ . ' ';
+ break;
+ };
+
+
+
+ // Show {QUESTION_CODE} and/or {QUESTION_NUMBER} block
+ switch($showqnumcode)
+ {
+ case 'none':
+ $newsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'number':
+ $newsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'code':
+ $newsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'both':
+ $newsurvey .= ''
+ . $clang->gT('Show Question Number and/or Question Code')
+ . ' ';
+ break;
+ case 'choose':
+ default:
+ $newsurvey .= ''.$clang->gT('Show Question Number and/or Question Code')." \n"
+ . ''
+ . ''.$clang->gT('Show both')." \n"
+ . ''.$clang->gT('Show question number only')." \n"
+ . ''.$clang->gT('Show question code only')." \n"
+ . ''.$clang->gT('Hide both')." \n"
+ . ' ';
+ break;
+ };
+
+
+ // Show no answer
+ switch($shownoanswer)
+ {
+ case 0:
+ $newsurvey .= ''.$clang->gT('"Show no answer" is forced off by the system adminstrator.').' ';
+ break;
+
+ case 2:
+ $newsurvey .= ''.$clang->gT('Show no answer?')." \n"
+ . "\n"
+ . ''.$clang->gT('Yes')." \n"
+ . ''.$clang->gT('No')." \n"
+ . ' ';
+ break;
+
+ default:
+ $newsurvey .= ''.$clang->gT('"Show no answer" is foced on by the system adminstrator.').' ';
+ break;
+ };
+
+
+
+
+
//Default date format
- . "".$clang->gT("Date format:")." \n"
+ $newsurvey .= "".$clang->gT("Date format:")." \n"
. "\n";
foreach (getDateFormatData() as $index=>$dateformatdata)
{
Index: admin/install/create-mysql.sql
===================================================================
--- admin/install/create-mysql.sql (revision 8796)
+++ admin/install/create-mysql.sql (working copy)
@@ -199,6 +199,10 @@
`allowsave` char(1) default 'Y',
`autonumber_start` bigint(11) default '0',
`autoredirect` char(1) default 'N',
+ `showXquestions` char(1) default 'Y',
+ `showgroupinfo` char(1) default 'B',
+ `showqnumcode` char(1) default '0',
+ `shownoanswer` char(1) default 'Y',
`allowprev` char(1) default 'Y',
`printanswers` char(1) default 'N',
`ipaddr` char(1) default 'N',
Index: admin/install/create-postgres.sql
===================================================================
--- admin/install/create-postgres.sql (revision 8796)
+++ admin/install/create-postgres.sql (working copy)
@@ -271,6 +271,10 @@
printanswers character(1) DEFAULT 'N'::bpchar,
autonumber_start integer DEFAULT 0,
autoredirect character(1) DEFAULT 'N'::bpchar,
+ showXquestions character(1) DEFAULT 'Y'::bpchar,
+ showgroupinfo character(1) DEFAULT 'B'::bpchar,
+ showqnumcode character(1) DEFAULT '0'::bpchar,
+ shownoanswer character(1) DEFAULT 'Y'::bpchar,
allowprev character(1) DEFAULT 'Y'::bpchar,
ipaddr character(1) DEFAULT 'N'::bpchar,
refurl character(1) DEFAULT 'N'::bpchar,
Index: admin/install/create-mssqlnative.sql
===================================================================
--- admin/install/create-mssqlnative.sql (revision 8796)
+++ admin/install/create-mssqlnative.sql (working copy)
@@ -243,6 +243,10 @@
[allowsave] char(1) default 'Y',
[autonumber_start] bigINT default '0',
[autoredirect] char(1) default 'N',
+ [showXquestions] char(1) default 'Y',
+ [showgroupinfo] char(1) default 'B',
+ [showqnumcode] char(1) default '0',
+ [shownoanswer] char(1) default 'Y',
[allowprev] char(1) default 'Y',
[printanswers] char(1) default 'N',
[ipaddr] char(1) default 'N',
Index: admin/install/create-mssql.sql
===================================================================
--- admin/install/create-mssql.sql (revision 8796)
+++ admin/install/create-mssql.sql (working copy)
@@ -243,6 +243,10 @@
[allowsave] char(1) default 'Y',
[autonumber_start] bigINT default '0',
[autoredirect] char(1) default 'N',
+ [showXquestions] char(1) default 'Y',
+ [showgroupinfo] char(1) default 'B',
+ [showqnumcode] char(1) default '0',
+ [shownoanswer] char(1) default 'Y',
[allowprev] char(1) default 'Y',
[printanswers] char(1) default 'N',
[ipaddr] char(1) default 'N',
Index: admin/globalsettings.php
===================================================================
--- admin/globalsettings.php (revision 8796)
+++ admin/globalsettings.php (working copy)
@@ -72,6 +72,10 @@
setGlobalSetting('siteadminemail',strip_tags($_POST['siteadminemail']));
setGlobalSetting('siteadminname',strip_tags($_POST['siteadminname']));
setGlobalSetting('shownoanswer',sanitize_int($_POST['shownoanswer']));
+ setGlobalSetting('showXquestions',($_POST['showXquestions']));
+ setGlobalSetting('showgroupinfo',($_POST['showgroupinfo']));
+ setGlobalSetting('showqnumcode',($_POST['showqnumcode']));
+ $repeatheadingstemp=(int)($_POST['repeatheadings']);
$repeatheadingstemp=(int)($_POST['repeatheadings']);
if ($repeatheadingstemp==0) $repeatheadingstemp=25;
setGlobalSetting('repeatheadings',$repeatheadingstemp);
@@ -211,9 +215,11 @@
$dateformatdata=getDateFormatData($_SESSION['dateformat']);
$editsurvey.= "\t".$clang->gT("Time difference (in hours):")." \n"
- . "\t\t "
+ . "\t\t "
. $clang->gT("Server time:").' '.convertDateTimeFormat(date('Y-m-d H:i:s'),'Y-m-d H:i:s',$dateformatdata['phpdate'].' H:i')." - ".$clang->gT("Corrected time :").' '.convertDateTimeFormat(date_shift(date("Y-m-d H:i:s"), 'Y-m-d H:i:s', getGlobalSetting('timeadjust')),'Y-m-d H:i:s',$dateformatdata['phpdate'].' H:i')."
- \n";
+ \n";
$thisusepdfexport=getGlobalSetting('usepdfexport');
$editsurvey .= "\t".$clang->gT("PDF export available:")." \n"
@@ -270,8 +276,9 @@
if (getGlobalSetting('emailmethod')=='qmail') {$editsurvey .= " selected='selected'";}
$editsurvey .= ">".$clang->gT("Qmail")." \n"
. "\t\t\n"
- . "\t".$clang->gT("SMTP host:")." \n"
- . "\t\t ".$clang->gT("Enter your hostname and port, e.g.: my.smtp.com:25")." \n"
+ . "\t\n\t\t".$clang->gT("SMTP host:")." \n"
+ . "\t\t\n"
+ . "\t\t\t ".$clang->gT("Enter your hostname and port, e.g.: my.smtp.com:25")." \n\t\t \n\t \n"
. "\t".$clang->gT("SMTP username:")." \n"
. "\t\t \n"
. "\t".$clang->gT("SMTP password:")." \n"
@@ -351,19 +358,77 @@
$editsurvey .= "\t ".$clang->gT("Miscellaneous")." \n";
// shownoanswer
- $shownoanswer=getGlobalSetting('shownoanswer');
- $editsurvey .= "\t".$clang->gT("Show 'no answer' option for non-mandatory questions:")." \n"
- . "\t\t\n"
- . "\t\t\tgT("Yes")." \n"
- . "\t\t\tgT("No")." \n"
+ $shownoanswer=getGlobalSetting('shownoanswer');
+ $editsurvey .= "\t".$clang->gT("Show 'no answer' option for non-mandatory questions:")." \n"
+ . "\t\t\n"
+ . "\t\t\tgT('Yes')." \n"
+ . "\t\t\tgT('No')." \n"
+ . "\t\t\tgT('Choose')." \n"
. "\t\t \n";
+
$thisrepeatheadings=getGlobalSetting('repeatheadings');
$editsurvey .= "\t".$clang->gT("Number of answers to show before repeating the headings in array questions:")." \n"
. "\t\t \n";
+
+
+ // showXquestions
+ $set_xq=getGlobalSetting('showXquestions');
+ $sel_xq = array( 'hide' => '' , 'show' => '' , 'choose' => '');
+ $sel_xq[$set_xq] = ' selected="selected"';
+ if( empty($sel_xq['hide']) && empty($sel_xq['show']) && empty($sel_xq['choose']))
+ {
+ $sel_xq['choose'] = ' selected="selected"';
+ };
+ $editsurvey .= "\t".$clang->gT('Show "There are X questions in this survey"')." \n"
+ . "\t\t\n"
+ . "\t\t\t".$clang->gT('Yes')." \n"
+ . "\t\t\t".$clang->gT('No')." \n"
+ . "\t\t\t".$clang->gT('Survey admin can choose')." \n"
+ . "\t\t \n";
+ unset($set_xq,$sel_xq);
+
+ // showgroupinfo
+ $set_gri=getGlobalSetting('showgroupinfo');
+ $sel_gri = array( 'both' => '' , 'choose' =>'' , 'description' => '' , 'name' => '' , 'none' => '' );
+ $sel_gri[$set_gri] = ' selected="selected"';
+ if( empty($sel_gri['both']) && empty($sel_gri['choose']) && empty($sel_gri['description']) && empty($sel_gri['name']) && empty($sel_gri['none']))
+ {
+ $sel_gri['choose'] = ' selected="selected"';
+ };
+ $editsurvey .= "\t".$clang->gT('Show Group Name and/or Group Description')." \n"
+ . "\t\t\n"
+ . "\t\t\t".$clang->gT('Show both')." \n"
+ . "\t\t\t".$clang->gT('Show group name only')." \n"
+ . "\t\t\t".$clang->gT('Show group description only')." \n"
+ . "\t\t\t".$clang->gT('Hide both')." \n"
+ . "\t\t\t".$clang->gT('Survey admin can Choose')." \n"
+ . "\t\t \n";
+ unset($set_gri,$sel_gri);
+
+ // showqnumcode
+ $set_qnc=getGlobalSetting('showqnumcode');
+ $sel_qnc = array( 'both' => '' , 'choose' =>'' , 'number' => '' , 'code' => '' , 'none' => '' );
+ $sel_qnc[$set_qnc] = ' selected="selected"';
+ if( empty($sel_qnc['both']) && empty($sel_qnc['choose']) && empty($sel_qnc['number']) && empty($sel_qnc['code']) && empty($sel_qnc['none']))
+ {
+ $sel_qnc['choose'] = ' selected="selected"';
+ };
+ $editsurvey .= "\t".$clang->gT('Show Question Number and/or Question Code')." \n"
+ . "\t\t\n"
+ . "\t\t\t".$clang->gT('Show both')." \n"
+ . "\t\t\t".$clang->gT('Show question number only')." \n"
+ . "\t\t\t".$clang->gT('Show question code only')." \n"
+ . "\t\t\t".$clang->gT('Hide both')." \n"
+ . "\t\t\t".$clang->gT('Survey admin can Choose')." \n"
+ . "\t\t \n";
+ unset($set_qnc,$sel_qnc);
+
$editsurvey .= "\t \n";
// End TAB page & form
$editsurvey .= "\t
\n";