From 4e93b2e0ca74926b6db9d2cb60fb02a1b6dd5c86 Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Mon, 10 Oct 2011 01:32:52 +0000 Subject: [PATCH] Updated to Limesurvey 1.91+ Revision 11132 --- include/limesurvey/admin/admin_functions.php | 3 +- include/limesurvey/admin/import_functions.php | 15 +- include/limesurvey/admin/integritycheck.php | 79 ++++---- include/limesurvey/admin/printablesurvey.php | 71 +++---- .../admin/remotecontrol/lsrc.testclient.php | 2 + .../limesurvey/admin/scripts/admin_core.js | 1 + .../admin/scripts/emailtemplates.js | 12 +- include/limesurvey/admin/statistics.php | 175 +++++++++--------- include/limesurvey/admin/surveylist.php | 9 +- include/limesurvey/common_functions.php | 38 +++- include/limesurvey/docs/release_notes.txt | 18 ++ include/limesurvey/group.php | 16 +- include/limesurvey/index.php | 3 +- include/limesurvey/qanda.php | 16 +- include/limesurvey/question.php | 15 +- include/limesurvey/replacements.php | 9 + .../limesurvey/scripts/jquery/lime-slider.js | 2 +- include/limesurvey/scripts/survey_runtime.js | 8 + 18 files changed, 290 insertions(+), 202 deletions(-) diff --git a/include/limesurvey/admin/admin_functions.php b/include/limesurvey/admin/admin_functions.php index 92932a60..c62c69ee 100644 --- a/include/limesurvey/admin/admin_functions.php +++ b/include/limesurvey/admin/admin_functions.php @@ -335,7 +335,8 @@ function getAdminHeader($meta=false) { $strAdminHeader.=$meta; } - $strAdminHeader.="\n" + $strAdminHeader.="\n"; + $strAdminHeader.= "\n" . "\n" . "\n" . "\n" diff --git a/include/limesurvey/admin/import_functions.php b/include/limesurvey/admin/import_functions.php index 54abcf33..ae8506c9 100644 --- a/include/limesurvey/admin/import_functions.php +++ b/include/limesurvey/admin/import_functions.php @@ -1399,6 +1399,7 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe } } + $aOldNewFieldmap=aReverseTranslateFieldnames($oldsid,$newsid,$aGIDReplacements,$aQIDReplacements); // Import conditions -------------------------------------------------------------- if(isset($xml->conditions)) { @@ -1457,6 +1458,19 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe $insertdata["method"]='=='; } + // Now process the value and replace @sgqa@ codes TIBO + if (preg_match("/^@(.*)@$/",$insertdata["value"],$cfieldnameInCondValue)) + { + if (isset($aOldNewFieldmap[$cfieldnameInCondValue[1]])) + { + $newvalue = '@'.$aOldNewFieldmap[$cfieldnameInCondValue[1]].'@'; + $insertdata["value"] = $newvalue; + } + + } + + + // now translate any links $query=$connect->GetInsertSQL($tablename,$insertdata); $result=$connect->Execute($query) or safe_die ($clang->gT("Error").": Failed to insert data
{$query}
\n".$connect->ErrorMsg()); @@ -1561,7 +1575,6 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe GiveAllSurveyPermissions($_SESSION['loginID'],$newsid); if ($bTranslateInsertansTags) { - $aOldNewFieldmap=aReverseTranslateFieldnames($oldsid,$newsid,$aGIDReplacements,$aQIDReplacements); TranslateInsertansTags($newsid,$oldsid,$aOldNewFieldmap); } diff --git a/include/limesurvey/admin/integritycheck.php b/include/limesurvey/admin/integritycheck.php index 2c2fed55..dee6053f 100644 --- a/include/limesurvey/admin/integritycheck.php +++ b/include/limesurvey/admin/integritycheck.php @@ -28,27 +28,30 @@ if($_SESSION['USER_RIGHT_CONFIGURATOR'] == 1) . "
".$clang->gT("Data Consistency Check")."
\n" . "".$clang->gT("If errors are showing up you might have to execute this script repeatedly.")."
\n" . "\n"; @@ -858,8 +858,8 @@ while ($degrow = $degresult->FetchRow()) $question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose *only one* of the following:"); $question['ANSWER'] .= "\n\t\n"; if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose *only one* of the following:"));} @@ -911,15 +911,19 @@ while ($degrow = $degresult->FetchRow()) list ($category, $answer) = explode($optCategorySeparator,$dearow['answer']); if ($category != '') { - $dearow['answer'] = "($category) $answer"; + $dearow['answer'] = "($category) $answer ".addsgqacode("(".$dearow['code'].")"); } else { - $dearow['answer'] = $answer; + $dearow['answer'] = $answer.addsgqacode(" (".$dearow['code'].")"); } + $question['ANSWER'] .= "\t".$wrapper['item-start']."\t\t".input_type_image('radio' , $dearow['answer'])."\n\t\t\t".$dearow['answer']."\n".$wrapper['item-end']; + } + else + { + $question['ANSWER'] .= "\t".$wrapper['item-start']."\t\t".input_type_image('radio' , $dearow['answer'])."\n\t\t\t".$dearow['answer'].addsgqacode(" (".$dearow['code'].")")."\n".$wrapper['item-end']; } - $question['ANSWER'] .= "\t".$wrapper['item-start']."\t\t".input_type_image('radio' , $dearow['answer'])."\n\t\t\t".$dearow['answer']."\n".$wrapper['item-end']; if(isset($_POST['printableexport'])){$pdf->intopdf(" o ".$dearow['answer']);} ++$rowcounter; @@ -942,7 +946,7 @@ while ($degrow = $degresult->FetchRow()) if(trim($qidattributes["other_replace_text"])=='') {$qidattributes["other_replace_text"]="Other";} // $printablesurveyoutput .="\t".$wrapper['item-start']."\t\t".input_type_image('radio' , $clang->gT("Other"))."\n\t\t\t".$clang->gT("Other")."\n\t\t\t\n".$wrapper['item-end']; - $question['ANSWER'] .= $wrapper['item-start-other'].input_type_image('radio',$clang->gT($qidattributes["other_replace_text"])).' '.$clang->gT($qidattributes["other_replace_text"])."\n\t\t\t".input_type_image('other')."\n".$wrapper['item-end']; + $question['ANSWER'] .= $wrapper['item-start-other'].input_type_image('radio',$clang->gT($qidattributes["other_replace_text"])).' '.$clang->gT($qidattributes["other_replace_text"]).addsgqacode(" (-oth-)")."\n\t\t\t".input_type_image('other').addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."other)")."\n".$wrapper['item-end']; if(isset($_POST['printableexport'])){$pdf->intopdf(" o ".$clang->gT($qidattributes["other_replace_text"]).": ________");} } $question['ANSWER'] .= $wrapper['whole-end']; @@ -958,14 +962,14 @@ while ($degrow = $degresult->FetchRow()) $question['ANSWER'] = "\t\n"; $question['ANSWER'] .= "\t

\n\t\t".$clang->gT("Make a comment on your choice here:")."\n"; if(isset($_POST['printableexport'])){$pdf->intopdf("Make a comment on your choice here:");} - $question['ANSWER'] .= "\t\t".input_type_image('textarea',$clang->gT("Make a comment on your choice here:"),50,8)."\n\t

\n"; + $question['ANSWER'] .= "\t\t".input_type_image('textarea',$clang->gT("Make a comment on your choice here:"),50,8).addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."comment)")."\n\t

\n"; for($i=0;$i<9;$i++) { @@ -1078,7 +1082,7 @@ while ($degrow = $degresult->FetchRow()) while ($mearow = $mearesult->FetchRow()) { $longest_string = longest_string($mearow['question'] , $longest_string ); - $question['ANSWER'] .= "\t
  • \n\t\t".input_type_image('checkbox',$mearow['question']).$mearow['question']."\n\t\t".input_type_image('text','comment box',60).addsgqacode(" (".$fieldname.$mearow['title'].") ")."\n\t
  • \n"; + $question['ANSWER'] .= "\t
  • \n\t\t".input_type_image('checkbox',$mearow['question']).$mearow['question'].addsgqacode(" (".$fieldname.$mearow['title'].") ")."\n\t\t".input_type_image('text','comment box',60).addsgqacode(" (".$fieldname.$mearow['title']."comment) ")."\n\t
  • \n"; $pdfoutput[$j]=array(" o ".$mearow['title']," __________"); $j++; } @@ -1191,8 +1195,8 @@ while ($degrow = $degresult->FetchRow()) // ================================================================== case "Y": //YES/NO $question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose *only one* of the following:"); - $question['ANSWER'] = "\n\n"; + $question['ANSWER'] = "\n\n"; if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose *only one* of the following:"),"U");} if(isset($_POST['printableexport'])){$pdf->intopdf(" o ".$clang->gT("Yes"));} @@ -1207,20 +1211,19 @@ while ($degrow = $degresult->FetchRow()) $question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose the appropriate response for each item:"); $question['QUESTION_TYPE_HELP'] .= array_filter_help($qidattributes, $surveyprintlang, $surveyid); - $question['ANSWER'] = ' + $question['ANSWER'] = " - - - - - + + + + + - -'; + "; if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose the appropriate response for each item:"),"U");} $pdfoutput = array(); @@ -1275,7 +1278,7 @@ while ($degrow = $degresult->FetchRow()) $question['ANSWER'] .= "\n
     123451".addsgqacode(" (1)")."2".addsgqacode(" (2)")."3".addsgqacode(" (3)")."4".addsgqacode(" (4)")."5".addsgqacode(" (5)")."
    \n\t\n\t\t\n\t\t\t\n"; for ($i=1; $i<=10; $i++) { - $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; } $question['ANSWER'] .= "\t\n\n\t\n"; if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose the appropriate response for each item:"),"U");} @@ -1313,9 +1316,9 @@ while ($degrow = $degresult->FetchRow()) - - - + + + @@ -1354,9 +1357,9 @@ while ($degrow = $degresult->FetchRow()) - - - + + + @@ -1584,7 +1587,7 @@ while ($degrow = $degresult->FetchRow()) $column_headings = array(); while ($frow = $fresult->FetchRow()) { - $column_headings[] = $frow['answer']; + $column_headings[] = $frow['answer'].addsgqacode(" (".$frow['code'].")"); } if (trim($qidattributes['answer_width'])!='') { @@ -1691,7 +1694,7 @@ while ($degrow = $degresult->FetchRow()) $pdfoutput[0][0]=''; while ($frow = $fresult->FetchRow()) { - $printablesurveyoutput2 .="\t\t\t\n"; + $printablesurveyoutput2 .="\t\t\t\n"; $myheader2 .= ""; $pdfoutput[0][$l1+1]=$frow['answer']; $l1++; @@ -1708,7 +1711,7 @@ while ($degrow = $degresult->FetchRow()) $scale2array = array(); while ($frow1 = $fresult1->FetchRow()) { - $printablesurveyoutput2 .="\t\t\t\n"; + $printablesurveyoutput2 .="\t\t\t\n"; $pdfoutput[1][$l2]=$frow['answer']; //add current question code @@ -1806,7 +1809,7 @@ while ($degrow = $degresult->FetchRow()) { $question['ANSWER'] .= "\t\t\n"; $rowclass = alternation($rowclass,'row'); - $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; //$printablesurveyoutput .="\t\t\t\t\t\n\t\t\t\t\n"; $counter2=0;} - + $statisticsoutput .= "\t\t\t\t\n"; $counter2++; @@ -759,7 +758,7 @@ foreach ($filters as $flt) $statisticsoutput .= " />"; $statisticsoutput .= showSpeaker($niceqtext) ."
    \n" - + ."\t\t\t\t\t".$clang->gT("Date (YYYY-MM-DD) equals").":
    \n" ."\t\t\t\t\t\n" ."\t\t\t\t\n\t\t\t\t\n"; $counter2++; - + //add this to all the other fields } @@ -921,23 +920,23 @@ foreach ($filters as $flt) { $myfield2 = $myfield . "$row[0]"; $statisticsoutput .= "\n"; - + if ($counter2 == 4) {$statisticsoutput .= "\t\t\t\t
    \n\t\t\t\t\n"; $counter2=0;} $statisticsoutput .= "\t\t\t\t\n"; $counter2++; } @@ -970,44 +969,44 @@ foreach ($filters as $flt) { $myfield2 = $myfield . "$row[0]"; $statisticsoutput .= "\n"; - + if ($counter2 == 4) {$statisticsoutput .= "\t\t\t\t\n\t\t\t\t\n"; $counter2=0;} - + $statisticsoutput .= "\t\t\t\t\n"; $counter2++; - + //add to array } @@ -1028,36 +1027,36 @@ foreach ($filters as $flt) { $myfield2 = $myfield . "$row[0]"; $statisticsoutput .= "\n"; - + if ($counter2 == 4) {$statisticsoutput .= "\t\t\t\t\n\t\t\t\t\n"; $counter2=0;} - + $statisticsoutput .= "\t\t\t\t\n"; $counter2++; @@ -1189,26 +1188,26 @@ foreach ($filters as $flt) { $myfield2 = $myfield . "$row[0]"; $statisticsoutput .= "\n"; - + if ($counter2 == 4) { $statisticsoutput .= "\t\t\t\t\n\t\t\t\t\n"; $counter2=0; } - + $statisticsoutput .= "\t\t\t\t\n"; $counter2++; - + //add fields to main array } @@ -1277,7 +1276,7 @@ foreach ($filters as $flt) { //adjust layout depending on counter if ($counter2 == 4) {$statisticsoutput .= "\t\t\t\t\n\t\t\t\t\n"; $counter=0;} - + //myfield is the SGQ identifier //myfield2 is just used as comment in HTML like "R40X34X1721-1" $myfield2 = "R" . $myfield . $i . "-" . strlen($i); @@ -1285,19 +1284,19 @@ foreach ($filters as $flt) $statisticsoutput .= "\n" ."\t\t\t\t\n"; $counter2++; - + //add averything to main array } @@ -1374,7 +1373,7 @@ foreach ($filters as $flt) //check if there is a dualscale_headerA/B $dshquery = "SELECT value FROM ".db_table_name("question_attributes")." WHERE qid={$flt[0]} AND attribute='dualscale_headerA'"; $dshresult = db_execute_num($dshquery) or safe_die ("Couldn't get dualscale header!
    $dshquery
    ".$connect->ErrorMsg()); - + //get header while($dshrow=$dshresult->FetchRow()) { @@ -1393,7 +1392,7 @@ foreach ($filters as $flt) $statisticsoutput .= " /> " .showSpeaker($niceqtext." [".str_replace("'", "`", $row[1])."] - ".$clang->gT("Label").": ".$labeltitle) ."
    \n"; - + /* get labels * table "labels" contains * - lid @@ -1402,7 +1401,7 @@ foreach ($filters as $flt) * - sortorder * - language */ - + $fquery = "SELECT * FROM ".db_table_name("answers")." WHERE qid={$flt[0]} AND language='{$language}' and scale_id=0 ORDER BY sortorder, code"; $fresult = db_execute_assoc($fquery); @@ -1430,7 +1429,7 @@ foreach ($filters as $flt) //----------------- LABEL 2 --------------------- - + //myfield2 = answer code $myfield2 = $myfield . "$row[0]#1"; @@ -1460,7 +1459,7 @@ foreach ($filters as $flt) //check if there is a dualsclae_headerA/B $dshquery2 = "SELECT value FROM ".db_table_name("question_attributes")." WHERE qid={$flt[0]} AND attribute='dualscale_headerB'"; $dshresult2 = db_execute_num($dshquery2) or safe_die ("Couldn't get dualscale header!
    $dshquery2
    ".$connect->ErrorMsg()); - + //get header while($dshrow2=$dshresult2->FetchRow()) { @@ -1481,7 +1480,7 @@ foreach ($filters as $flt) $statisticsoutput .= " /> " .showSpeaker($niceqtext." [".str_replace("'", "`", $row[1])."] - ".$clang->gT("Label").": ".$labeltitle2) ."
    \n"; - + $fquery = "SELECT * FROM ".db_table_name("answers")." WHERE qid={$flt[0]} AND language='{$language}' and scale_id=1 ORDER BY sortorder, code"; $fresult = db_execute_assoc($fquery); @@ -1552,10 +1551,10 @@ foreach ($filters as $flt) while ($row=$result->FetchRow()) { $statisticsoutput .= "\t\t\t\t\t\t
    \n"; diff --git a/include/limesurvey/question.php b/include/limesurvey/question.php index 5df7e5b9..10339f50 100644 --- a/include/limesurvey/question.php +++ b/include/limesurvey/question.php @@ -675,14 +675,13 @@ if($thissurvey['allowjumps']=='Y' && !$bIsGroupDescrPage) } echo ''; - - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; } if (isset($conditions) && is_array($conditions) && count($conditions) != 0) diff --git a/include/limesurvey/replacements.php b/include/limesurvey/replacements.php index da954f0e..cfcecfe4 100644 --- a/include/limesurvey/replacements.php +++ b/include/limesurvey/replacements.php @@ -64,6 +64,15 @@ function templatereplace($line, $replacements=array(), $anonymized=false) { $surveyformat = ""; } + /*if (isset($thissurvey['allowjumps']) && $thissurvey['allowjumps']=="Y" && $surveyformat!="allinone" && (isset($_SESSION['step']) && $_SESSION['step']>0)){ + $surveyformat .= " withindex"; + }*/ + if (isset($thissurvey['showprogress']) && $thissurvey['showprogress']=="Y"){ + $surveyformat .= " showprogress"; + } + if (isset($thissurvey['showqnumcode'])){ + $surveyformat .= " showqnumcode-".$thissurvey['showqnumcode']; + } // real survey contact if (isset($surveylist['contact'])) { diff --git a/include/limesurvey/scripts/jquery/lime-slider.js b/include/limesurvey/scripts/jquery/lime-slider.js index dc5c0ae8..5b9884b9 100644 --- a/include/limesurvey/scripts/jquery/lime-slider.js +++ b/include/limesurvey/scripts/jquery/lime-slider.js @@ -19,7 +19,7 @@ $(document).ready(function(){ // call the init slider routine for each element of the .multinum-slider class $(".multinum-slider").each(function(i,e) { var basename = e.id.substr(10); - + $('#answer'+basename).hide(); $(this).prev('label').addClass('slider-label'); //3796 TP - add a class to the labels in slider questions to facilitate styling //$("#slider-"+basename).addClass('ui-slider-2'); diff --git a/include/limesurvey/scripts/survey_runtime.js b/include/limesurvey/scripts/survey_runtime.js index 1bd82f40..3399cb01 100644 --- a/include/limesurvey/scripts/survey_runtime.js +++ b/include/limesurvey/scripts/survey_runtime.js @@ -110,6 +110,14 @@ $(document).ready(function() }); } } + /*replacement for inline javascript for #index */ + /* + $("#index").parents(".outerframe").addClass("withindex"); + if ($("#index").size() && $("#index .row.current").size()){ + var idx = $("#index"); + var row = $("#index .row.current"); + idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2); + */ }); gmaps = new Object;
     $i$i".addsgqacode(" ($i)")."
     '.$clang->gT("Yes").''.$clang->gT("Uncertain").''.$clang->gT("No").''.$clang->gT("Yes").addsgqacode(" (Y)").''.$clang->gT("Uncertain").addsgqacode(" (U)").''.$clang->gT("No").addsgqacode(" (N)").'
     '.$clang->gT("Increase").''.$clang->gT("Same").''.$clang->gT("Decrease").''.$clang->gT("Increase").addsgqacode(" (I)").''.$clang->gT("Same").addsgqacode(" (S)").''.$clang->gT("Decrease").addsgqacode(" (D)").'
    {$frow['answer']}{$frow['answer']}".addsgqacode(" (".$frow['code'].")")."{$frow1['answer']}{$frow1['answer']}".addsgqacode(" (".$frow1['code'].")")."
    {$mearow['answer']}{$mearow['answer']}".addsgqacode(" (".$mearow['code'].")").""; $pdfoutput[$a][0]=$mearow['answer']; for ($i=1; $i<=$fcount; $i++) diff --git a/include/limesurvey/admin/remotecontrol/lsrc.testclient.php b/include/limesurvey/admin/remotecontrol/lsrc.testclient.php index fce49bc0..cc34570d 100644 --- a/include/limesurvey/admin/remotecontrol/lsrc.testclient.php +++ b/include/limesurvey/admin/remotecontrol/lsrc.testclient.php @@ -20,6 +20,8 @@ //// errors are ok, but warnings have nothing to say (in this case, sometimes warnings are useful!) //ini_set("error_reporting", "E_ALL & ~E_WARNING"); +die('Test client is deactivated for security reasons. Open lsrc.testclient.php and comment this line to activate the test client.'); + include_once("lsrc.client.php"); /** * initiate the testclient object diff --git a/include/limesurvey/admin/scripts/admin_core.js b/include/limesurvey/admin/scripts/admin_core.js index 03fd5846..604bcc9c 100644 --- a/include/limesurvey/admin/scripts/admin_core.js +++ b/include/limesurvey/admin/scripts/admin_core.js @@ -1,6 +1,7 @@ //$Id: admin_core.js 10855 2011-08-26 13:30:41Z mot3 $ $(document).ready(function(){ + setupAllTabs(); if(typeof(userdateformat) !== 'undefined') { $(".popupdate").datepicker({ dateFormat: userdateformat, diff --git a/include/limesurvey/admin/scripts/emailtemplates.js b/include/limesurvey/admin/scripts/emailtemplates.js index 51721bb3..3607b751 100644 --- a/include/limesurvey/admin/scripts/emailtemplates.js +++ b/include/limesurvey/admin/scripts/emailtemplates.js @@ -10,8 +10,8 @@ $(document).ready(function(){ /** * This function loads each FCKeditor only when the tab is clicked and only if it is not already loaded */ -function loadHTMLEditor(event, ui) -{ +function loadHTMLEditor(event, ui) +{ if (typeof ui.panel.selector != 'undefined') { sSelector=ui.panel.selector; @@ -22,18 +22,18 @@ function loadHTMLEditor(event, ui) } if ($(sSelector+' iframe').size()==0) { - sCKEditorInstanceName='oFCKeditor_'+$(sSelector+' textarea').attr('id').replace(/-/i, "_"); + sCKEditorInstanceName='oFCKeditor_'+$(sSelector+' textarea').attr('id').replace(/-/g, "_"); eval("if (typeof "+sCKEditorInstanceName+" != 'undefined')"+sCKEditorInstanceName+".ReplaceTextarea();"); } } function fillin(tofield, fromfield) { - if (confirm(sReplaceTextConfirmation)) + if (confirm(sReplaceTextConfirmation)) { if (document.getElementById(tofield).readOnly == false) - { - $('#'+tofield).val($('#'+fromfield).val()); + { + $('#'+tofield).val($('#'+fromfield).val()); } updateCKeditor(tofield,$('#'+fromfield).val()); diff --git a/include/limesurvey/admin/statistics.php b/include/limesurvey/admin/statistics.php index 56909939..a8d160fe 100644 --- a/include/limesurvey/admin/statistics.php +++ b/include/limesurvey/admin/statistics.php @@ -61,8 +61,7 @@ $maxchars = 50; -//don't call this script directly! -if (isset($_REQUEST['homedir'])) {die('You cannot start this script directly');} +include_once("login_check.php"); //some includes, the progressbar is used to show a progressbar while generating the graphs //include_once("login_check.php"); @@ -409,7 +408,7 @@ foreach ($filters as $flt) } $statisticsoutput .= "\t\t
    \n" - + ."" //use current groupname and groupid as heading @@ -484,7 +483,7 @@ foreach ($filters as $flt) // File Upload will need special filters in future, hence the special treatment if ($flt[2] == "|") {$myfield = "|$myfield";} - + //numerical input will get special treatment (arihtmetic mean, standard derivation, ...) if ($flt[2] == "N") {$myfield = "N$myfield";} $statisticsoutput .= " do we want to pre-check the checkbox? if (isset($summary) && (array_search("K{$surveyid}X{$flt[1]}X{$flt[0]}{$row[0]}", $summary) !== FALSE)) {$statisticsoutput .= " checked='checked'";} $statisticsoutput .= " /> "; - + //show speaker $statisticsoutput .= showSpeaker($flt[3]." - ".FlattenText($row[1]))."
    \n"; @@ -580,10 +579,10 @@ foreach ($filters as $flt) ."\t\t\t\t\t
    \n"; - + //we added 1 form -> increase counter $counter2++; - + } break; @@ -603,16 +602,16 @@ foreach ($filters as $flt) while ($row = $result->FetchRow()) { //collecting data for output, for details see above (question type "N") - + //we have one input field for each answer $myfield2 = "Q".$myfield."$row[0]"; if ($counter2 == 4) {$statisticsoutput .= "\t\t\t\t
    "; $statisticsoutput .= "\n" @@ -620,7 +619,7 @@ foreach ($filters as $flt) ."\t\t\t\t\t" ."\t\t\t\t
    "; //heading $statisticsoutput .= "\n" ."\t\t\t\t\n\t\t\t\t
    " ."
    \n" ."\t\t\t\t\n\t\t\t\t
    " ."
    \n" ."\t\t\t\t\n\t\t\t\t
    " ."
    \n"; - + /* * when hoovering the speaker symbol we show the whole question * @@ -1223,13 +1222,13 @@ foreach ($filters as $flt) */ $fquery = "SELECT * FROM ".db_table_name("answers")." WHERE qid={$flt[0]} AND language='{$language}' ORDER BY sortorder, code"; $fresult = db_execute_assoc($fquery); - + //for debugging only: //$statisticsoutput .= $fquery; - + //creating form $statisticsoutput .= "\t\t\t\t\n\t\t\t\t
    " ."
    \n" ."\t\t\t\t\n\t\t\t\t