mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Updated to Limesurvey 1.91+ Revision 11132
This commit is contained in:
@@ -335,7 +335,8 @@ function getAdminHeader($meta=false)
|
|||||||
{
|
{
|
||||||
$strAdminHeader.=$meta;
|
$strAdminHeader.=$meta;
|
||||||
}
|
}
|
||||||
$strAdminHeader.="<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n"
|
$strAdminHeader.="<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n";
|
||||||
|
$strAdminHeader.= "<script type=\"text/javascript\" src=\"{$homeurl}/scripts/tabpane/js/tabpane.js\"></script>\n"
|
||||||
. "<script type=\"text/javascript\" src=\"{$rooturl}/scripts/jquery/jquery.js\"></script>\n"
|
. "<script type=\"text/javascript\" src=\"{$rooturl}/scripts/jquery/jquery.js\"></script>\n"
|
||||||
. "<script type=\"text/javascript\" src=\"{$rooturl}/scripts/jquery/jquery-ui.js\"></script>\n"
|
. "<script type=\"text/javascript\" src=\"{$rooturl}/scripts/jquery/jquery-ui.js\"></script>\n"
|
||||||
. "<script type=\"text/javascript\" src=\"{$rooturl}/scripts/jquery/jquery.qtip.js\"></script>\n"
|
. "<script type=\"text/javascript\" src=\"{$rooturl}/scripts/jquery/jquery.qtip.js\"></script>\n"
|
||||||
|
|||||||
@@ -1399,6 +1399,7 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$aOldNewFieldmap=aReverseTranslateFieldnames($oldsid,$newsid,$aGIDReplacements,$aQIDReplacements);
|
||||||
// Import conditions --------------------------------------------------------------
|
// Import conditions --------------------------------------------------------------
|
||||||
if(isset($xml->conditions))
|
if(isset($xml->conditions))
|
||||||
{
|
{
|
||||||
@@ -1457,6 +1458,19 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe
|
|||||||
$insertdata["method"]='==';
|
$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
|
// now translate any links
|
||||||
$query=$connect->GetInsertSQL($tablename,$insertdata);
|
$query=$connect->GetInsertSQL($tablename,$insertdata);
|
||||||
$result=$connect->Execute($query) or safe_die ($clang->gT("Error").": Failed to insert data<br />{$query}<br />\n".$connect->ErrorMsg());
|
$result=$connect->Execute($query) or safe_die ($clang->gT("Error").": Failed to insert data<br />{$query}<br />\n".$connect->ErrorMsg());
|
||||||
@@ -1561,7 +1575,6 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe
|
|||||||
GiveAllSurveyPermissions($_SESSION['loginID'],$newsid);
|
GiveAllSurveyPermissions($_SESSION['loginID'],$newsid);
|
||||||
if ($bTranslateInsertansTags)
|
if ($bTranslateInsertansTags)
|
||||||
{
|
{
|
||||||
$aOldNewFieldmap=aReverseTranslateFieldnames($oldsid,$newsid,$aGIDReplacements,$aQIDReplacements);
|
|
||||||
TranslateInsertansTags($newsid,$oldsid,$aOldNewFieldmap);
|
TranslateInsertansTags($newsid,$oldsid,$aOldNewFieldmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ if($_SESSION['USER_RIGHT_CONFIGURATOR'] == 1)
|
|||||||
$connect->query("delete FROM {$dbprefix}survey_permissions where sid not in (select sid from {$dbprefix}surveys)");
|
$connect->query("delete FROM {$dbprefix}survey_permissions where sid not in (select sid from {$dbprefix}surveys)");
|
||||||
$connect->query("delete FROM {$dbprefix}survey_permissions where uid not in (select uid from {$dbprefix}users)");
|
$connect->query("delete FROM {$dbprefix}survey_permissions where uid not in (select uid from {$dbprefix}users)");
|
||||||
|
|
||||||
|
// Silently fix subquestions
|
||||||
|
fixSubquestions();
|
||||||
|
|
||||||
/***** Check for activate survey tables with missing survey entry **/
|
/***** Check for activate survey tables with missing survey entry **/
|
||||||
|
|
||||||
$sQuery = db_select_tables_like("{$dbprefix}survey\_%");
|
$sQuery = db_select_tables_like("{$dbprefix}survey\_%");
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ if(isset($showsgqacode) && $showsgqacode == true)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$surveyname = $surveyname;
|
$surveyname = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$survey_output = array(
|
$survey_output = array(
|
||||||
@@ -493,7 +493,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
{
|
{
|
||||||
$explanation .= $clang->gT("Answer was")." ";
|
$explanation .= $clang->gT("Answer was")." ";
|
||||||
}
|
}
|
||||||
$explanation .= " `".$distinctrow['value']."`";
|
$explanation .= " ".$distinctrow['value'];
|
||||||
}
|
}
|
||||||
if(!$distinctrow['cqid']) { // cqid == 0 ==> token attribute match
|
if(!$distinctrow['cqid']) { // cqid == 0 ==> token attribute match
|
||||||
$tokenData = GetTokenFieldsAndNames($surveyid);
|
$tokenData = GetTokenFieldsAndNames($surveyid);
|
||||||
@@ -531,7 +531,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
{
|
{
|
||||||
$explanation .= $clang->gT("is")." ";
|
$explanation .= $clang->gT("is")." ";
|
||||||
}
|
}
|
||||||
$explanation .= " `".$distinctrow['value']."`";
|
$answer_section = $distinctrow['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$conquery="SELECT cid, cqid, q.title,\n"
|
$conquery="SELECT cid, cqid, q.title,\n"
|
||||||
@@ -838,7 +838,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
{
|
{
|
||||||
$pdfoutput .=" o ".$i." ";
|
$pdfoutput .=" o ".$i." ";
|
||||||
// $printablesurveyoutput .="\t\t\t<input type='checkbox' name='$fieldname' value='$i' readonly='readonly' />$i \n";
|
// $printablesurveyoutput .="\t\t\t<input type='checkbox' name='$fieldname' value='$i' readonly='readonly' />$i \n";
|
||||||
$question['ANSWER'] .="\t\t<li>\n\t\t\t".input_type_image('radio',$i)."\n\t\t\t$i\n\t\t</li>\n";
|
$question['ANSWER'] .="\t\t<li>\n\t\t\t".input_type_image('radio',$i)."\n\t\t\t$i ".addsgqacode("($i)")."\n\t\t</li>\n";
|
||||||
}
|
}
|
||||||
if(isset($_POST['printableexport'])){$pdf->intopdf($pdfoutput);}
|
if(isset($_POST['printableexport'])){$pdf->intopdf($pdfoutput);}
|
||||||
$question['ANSWER'] .="\t</ul>\n";
|
$question['ANSWER'] .="\t</ul>\n";
|
||||||
@@ -858,8 +858,8 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
$question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose *only one* of the following:");
|
$question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose *only one* of the following:");
|
||||||
|
|
||||||
$question['ANSWER'] .= "\n\t<ul>\n";
|
$question['ANSWER'] .= "\n\t<ul>\n";
|
||||||
$question['ANSWER'] .= "\t\t<li>\n\t\t\t".input_type_image('radio',$clang->gT("Female"))."\n\t\t\t".$clang->gT("Female")."\n\t\t</li>\n";
|
$question['ANSWER'] .= "\t\t<li>\n\t\t\t".input_type_image('radio',$clang->gT("Female"))."\n\t\t\t".$clang->gT("Female")." ".addsgqacode("(F)")."\n\t\t</li>\n";
|
||||||
$question['ANSWER'] .= "\t\t<li>\n\t\t\t".input_type_image('radio',$clang->gT("Male"))."\n\t\t\t".$clang->gT("Male")."\n\t\t</li>\n";
|
$question['ANSWER'] .= "\t\t<li>\n\t\t\t".input_type_image('radio',$clang->gT("Male"))."\n\t\t\t".$clang->gT("Male")." ".addsgqacode("(M)")."\n\t\t</li>\n";
|
||||||
$question['ANSWER'] .= "\t</ul>\n";
|
$question['ANSWER'] .= "\t</ul>\n";
|
||||||
|
|
||||||
if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose *only one* of the following:"));}
|
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']);
|
list ($category, $answer) = explode($optCategorySeparator,$dearow['answer']);
|
||||||
if ($category != '')
|
if ($category != '')
|
||||||
{
|
{
|
||||||
$dearow['answer'] = "($category) $answer";
|
$dearow['answer'] = "($category) $answer ".addsgqacode("(".$dearow['code'].")");
|
||||||
}
|
}
|
||||||
else
|
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']);}
|
if(isset($_POST['printableexport'])){$pdf->intopdf(" o ".$dearow['answer']);}
|
||||||
|
|
||||||
++$rowcounter;
|
++$rowcounter;
|
||||||
@@ -942,7 +946,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
if(trim($qidattributes["other_replace_text"])=='')
|
if(trim($qidattributes["other_replace_text"])=='')
|
||||||
{$qidattributes["other_replace_text"]="Other";}
|
{$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<input type='text' size='30' readonly='readonly' />\n".$wrapper['item-end'];
|
// $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<input type='text' size='30' readonly='readonly' />\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"]).": ________");}
|
if(isset($_POST['printableexport'])){$pdf->intopdf(" o ".$clang->gT($qidattributes["other_replace_text"]).": ________");}
|
||||||
}
|
}
|
||||||
$question['ANSWER'] .= $wrapper['whole-end'];
|
$question['ANSWER'] .= $wrapper['whole-end'];
|
||||||
@@ -958,14 +962,14 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
$question['ANSWER'] = "\t<ul>\n";
|
$question['ANSWER'] = "\t<ul>\n";
|
||||||
while ($dearow = $dearesult->FetchRow())
|
while ($dearow = $dearesult->FetchRow())
|
||||||
{
|
{
|
||||||
$question['ANSWER'] .= "\t\t<li>\n\t\t\t".input_type_image('radio',$dearow['answer'])."\n\t\t\t".$dearow['answer']."\n\t\t</li>\n";
|
$question['ANSWER'] .= "\t\t<li>\n\t\t\t".input_type_image('radio',$dearow['answer'])."\n\t\t\t".$dearow['answer'].addsgqacode(" (".$dearow['code'].")")."\n\t\t</li>\n";
|
||||||
if(isset($_POST['printableexport'])){$pdf->intopdf($dearow['answer']);}
|
if(isset($_POST['printableexport'])){$pdf->intopdf($dearow['answer']);}
|
||||||
}
|
}
|
||||||
$question['ANSWER'] .= "\t</ul>\n";
|
$question['ANSWER'] .= "\t</ul>\n";
|
||||||
|
|
||||||
$question['ANSWER'] .= "\t<p class=\"comment\">\n\t\t".$clang->gT("Make a comment on your choice here:")."\n";
|
$question['ANSWER'] .= "\t<p class=\"comment\">\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:");}
|
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</p>\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</p>\n";
|
||||||
|
|
||||||
for($i=0;$i<9;$i++)
|
for($i=0;$i<9;$i++)
|
||||||
{
|
{
|
||||||
@@ -1078,7 +1082,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
while ($mearow = $mearesult->FetchRow())
|
while ($mearow = $mearesult->FetchRow())
|
||||||
{
|
{
|
||||||
$longest_string = longest_string($mearow['question'] , $longest_string );
|
$longest_string = longest_string($mearow['question'] , $longest_string );
|
||||||
$question['ANSWER'] .= "\t<li><span>\n\t\t".input_type_image('checkbox',$mearow['question']).$mearow['question']."</span>\n\t\t".input_type_image('text','comment box',60).addsgqacode(" (".$fieldname.$mearow['title'].") ")."\n\t</li>\n";
|
$question['ANSWER'] .= "\t<li><span>\n\t\t".input_type_image('checkbox',$mearow['question']).$mearow['question'].addsgqacode(" (".$fieldname.$mearow['title'].") ")."</span>\n\t\t".input_type_image('text','comment box',60).addsgqacode(" (".$fieldname.$mearow['title']."comment) ")."\n\t</li>\n";
|
||||||
$pdfoutput[$j]=array(" o ".$mearow['title']," __________");
|
$pdfoutput[$j]=array(" o ".$mearow['title']," __________");
|
||||||
$j++;
|
$j++;
|
||||||
}
|
}
|
||||||
@@ -1191,8 +1195,8 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
// ==================================================================
|
// ==================================================================
|
||||||
case "Y": //YES/NO
|
case "Y": //YES/NO
|
||||||
$question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose *only one* of the following:");
|
$question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose *only one* of the following:");
|
||||||
$question['ANSWER'] = "\n<ul>\n\t<li>\n\t\t".input_type_image('radio',$clang->gT('Yes'))."\n\t\t".$clang->gT('Yes')."\n\t</li>\n";
|
$question['ANSWER'] = "\n<ul>\n\t<li>\n\t\t".input_type_image('radio',$clang->gT('Yes'))."\n\t\t".$clang->gT('Yes').addsgqacode(" (Y)")."\n\t</li>\n";
|
||||||
$question['ANSWER'] .= "\n\t<li>\n\t\t".input_type_image('radio',$clang->gT('No'))."\n\t\t".$clang->gT('No')."\n\t</li>\n</ul>\n";
|
$question['ANSWER'] .= "\n\t<li>\n\t\t".input_type_image('radio',$clang->gT('No'))."\n\t\t".$clang->gT('No').addsgqacode(" (N)")."\n\t</li>\n</ul>\n";
|
||||||
|
|
||||||
if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose *only one* of the following:"),"U");}
|
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"));}
|
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'] = $clang->gT("Please choose the appropriate response for each item:");
|
||||||
$question['QUESTION_TYPE_HELP'] .= array_filter_help($qidattributes, $surveyprintlang, $surveyid);
|
$question['QUESTION_TYPE_HELP'] .= array_filter_help($qidattributes, $surveyprintlang, $surveyid);
|
||||||
|
|
||||||
$question['ANSWER'] = '
|
$question['ANSWER'] = "
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<th>1</th>
|
<th>1".addsgqacode(" (1)")."</th>
|
||||||
<th>2</th>
|
<th>2".addsgqacode(" (2)")."</th>
|
||||||
<th>3</th>
|
<th>3".addsgqacode(" (3)")."</th>
|
||||||
<th>4</th>
|
<th>4".addsgqacode(" (4)")."</th>
|
||||||
<th>5</th>
|
<th>5".addsgqacode(" (5)")."</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>";
|
||||||
';
|
|
||||||
|
|
||||||
if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose the appropriate response for each item:"),"U");}
|
if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose the appropriate response for each item:"),"U");}
|
||||||
$pdfoutput = array();
|
$pdfoutput = array();
|
||||||
@@ -1275,7 +1278,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
$question['ANSWER'] .= "\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<td> </td>\n";
|
$question['ANSWER'] .= "\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<td> </td>\n";
|
||||||
for ($i=1; $i<=10; $i++)
|
for ($i=1; $i<=10; $i++)
|
||||||
{
|
{
|
||||||
$question['ANSWER'] .= "\t\t\t<th>$i</th>\n";
|
$question['ANSWER'] .= "\t\t\t<th>$i".addsgqacode(" ($i)")."</th>\n";
|
||||||
}
|
}
|
||||||
$question['ANSWER'] .= "\t</thead>\n\n\t<tbody>\n";
|
$question['ANSWER'] .= "\t</thead>\n\n\t<tbody>\n";
|
||||||
if(isset($_POST['printableexport'])){$pdf->intopdf($clang->gT("Please choose the appropriate response for each item:"),"U");}
|
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())
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<th>'.$clang->gT("Yes").'</th>
|
<th>'.$clang->gT("Yes").addsgqacode(" (Y)").'</th>
|
||||||
<th>'.$clang->gT("Uncertain").'</th>
|
<th>'.$clang->gT("Uncertain").addsgqacode(" (U)").'</th>
|
||||||
<th>'.$clang->gT("No").'</th>
|
<th>'.$clang->gT("No").addsgqacode(" (N)").'</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -1354,9 +1357,9 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<th>'.$clang->gT("Increase").'</th>
|
<th>'.$clang->gT("Increase").addsgqacode(" (I)").'</th>
|
||||||
<th>'.$clang->gT("Same").'</th>
|
<th>'.$clang->gT("Same").addsgqacode(" (S)").'</th>
|
||||||
<th>'.$clang->gT("Decrease").'</th>
|
<th>'.$clang->gT("Decrease").addsgqacode(" (D)").'</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -1584,7 +1587,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
$column_headings = array();
|
$column_headings = array();
|
||||||
while ($frow = $fresult->FetchRow())
|
while ($frow = $fresult->FetchRow())
|
||||||
{
|
{
|
||||||
$column_headings[] = $frow['answer'];
|
$column_headings[] = $frow['answer'].addsgqacode(" (".$frow['code'].")");
|
||||||
}
|
}
|
||||||
if (trim($qidattributes['answer_width'])!='')
|
if (trim($qidattributes['answer_width'])!='')
|
||||||
{
|
{
|
||||||
@@ -1691,7 +1694,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
$pdfoutput[0][0]='';
|
$pdfoutput[0][0]='';
|
||||||
while ($frow = $fresult->FetchRow())
|
while ($frow = $fresult->FetchRow())
|
||||||
{
|
{
|
||||||
$printablesurveyoutput2 .="\t\t\t<th>{$frow['answer']}</th>\n";
|
$printablesurveyoutput2 .="\t\t\t<th>{$frow['answer']}".addsgqacode(" (".$frow['code'].")")."</th>\n";
|
||||||
$myheader2 .= "<td></td>";
|
$myheader2 .= "<td></td>";
|
||||||
$pdfoutput[0][$l1+1]=$frow['answer'];
|
$pdfoutput[0][$l1+1]=$frow['answer'];
|
||||||
$l1++;
|
$l1++;
|
||||||
@@ -1708,7 +1711,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
$scale2array = array();
|
$scale2array = array();
|
||||||
while ($frow1 = $fresult1->FetchRow())
|
while ($frow1 = $fresult1->FetchRow())
|
||||||
{
|
{
|
||||||
$printablesurveyoutput2 .="\t\t\t<th>{$frow1['answer']}</th>\n";
|
$printablesurveyoutput2 .="\t\t\t<th>{$frow1['answer']}".addsgqacode(" (".$frow1['code'].")")."</th>\n";
|
||||||
$pdfoutput[1][$l2]=$frow['answer'];
|
$pdfoutput[1][$l2]=$frow['answer'];
|
||||||
|
|
||||||
//add current question code
|
//add current question code
|
||||||
@@ -1806,7 +1809,7 @@ while ($degrow = $degresult->FetchRow())
|
|||||||
{
|
{
|
||||||
$question['ANSWER'] .= "\t\t<tr class=\"$rowclass\">\n";
|
$question['ANSWER'] .= "\t\t<tr class=\"$rowclass\">\n";
|
||||||
$rowclass = alternation($rowclass,'row');
|
$rowclass = alternation($rowclass,'row');
|
||||||
$question['ANSWER'] .= "\t\t\t<th class=\"answertext\">{$mearow['answer']}</th>\n";
|
$question['ANSWER'] .= "\t\t\t<th class=\"answertext\">{$mearow['answer']}".addsgqacode(" (".$mearow['code'].")")."</th>\n";
|
||||||
//$printablesurveyoutput .="\t\t\t\t\t<td>";
|
//$printablesurveyoutput .="\t\t\t\t\t<td>";
|
||||||
$pdfoutput[$a][0]=$mearow['answer'];
|
$pdfoutput[$a][0]=$mearow['answer'];
|
||||||
for ($i=1; $i<=$fcount; $i++)
|
for ($i=1; $i<=$fcount; $i++)
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
//// errors are ok, but warnings have nothing to say (in this case, sometimes warnings are useful!)
|
//// errors are ok, but warnings have nothing to say (in this case, sometimes warnings are useful!)
|
||||||
//ini_set("error_reporting", "E_ALL & ~E_WARNING");
|
//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");
|
include_once("lsrc.client.php");
|
||||||
/**
|
/**
|
||||||
* initiate the testclient object
|
* initiate the testclient object
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
//$Id: admin_core.js 10855 2011-08-26 13:30:41Z mot3 $
|
//$Id: admin_core.js 10855 2011-08-26 13:30:41Z mot3 $
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
setupAllTabs();
|
||||||
if(typeof(userdateformat) !== 'undefined')
|
if(typeof(userdateformat) !== 'undefined')
|
||||||
{
|
{
|
||||||
$(".popupdate").datepicker({ dateFormat: userdateformat,
|
$(".popupdate").datepicker({ dateFormat: userdateformat,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function loadHTMLEditor(event, ui)
|
|||||||
}
|
}
|
||||||
if ($(sSelector+' iframe').size()==0)
|
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();");
|
eval("if (typeof "+sCKEditorInstanceName+" != 'undefined')"+sCKEditorInstanceName+".ReplaceTextarea();");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ $maxchars = 50;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//don't call this script directly!
|
include_once("login_check.php");
|
||||||
if (isset($_REQUEST['homedir'])) {die('You cannot start this script directly');}
|
|
||||||
|
|
||||||
//some includes, the progressbar is used to show a progressbar while generating the graphs
|
//some includes, the progressbar is used to show a progressbar while generating the graphs
|
||||||
//include_once("login_check.php");
|
//include_once("login_check.php");
|
||||||
|
|||||||
@@ -253,14 +253,11 @@ elseif ($action == "ajaxowneredit"){
|
|||||||
elseif ($action == "ajaxgetusers"){
|
elseif ($action == "ajaxgetusers"){
|
||||||
header('Content-type: application/json');
|
header('Content-type: application/json');
|
||||||
|
|
||||||
$query = "SELECT users_name, uid FROM ".db_table_name('users').";";
|
$aSeenUsers = getuserlist();
|
||||||
|
|
||||||
$result = db_execute_assoc($query) or safe_die($connect->ErrorMsg());
|
|
||||||
|
|
||||||
$aUsers = array();
|
$aUsers = array();
|
||||||
if($result->RecordCount() > 0) {
|
foreach ($aSeenUsers as $userline) {
|
||||||
while($rows = $result->FetchRow())
|
$aUsers[] = array($userline['uid'], $userline['user']);
|
||||||
$aUsers[] = array($rows['uid'], $rows['users_name']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ajaxoutput = json_encode($aUsers) . "\n";
|
$ajaxoutput = json_encode($aUsers) . "\n";
|
||||||
|
|||||||
@@ -2391,7 +2391,24 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$usedinconditions = "N";
|
// This question is not directly used in a condition, however we should
|
||||||
|
// check if its SGQA code is not used as a value in another condition
|
||||||
|
// as a @SGQA@ code
|
||||||
|
$atsgqaQuery = "SELECT count(1) as sgqausedincondition "
|
||||||
|
. "FROM ".db_table_name('questions')." as q, "
|
||||||
|
. db_table_name('conditions')." as c "
|
||||||
|
. "WHERE c.qid=q.qid AND q.sid=".$arow['sid']." AND "
|
||||||
|
. "c.value like '@".$arow['sid']."X".$arow['gid']."X".$arow['qid']."%'";
|
||||||
|
$atsgqaResult = db_execute_assoc($atsgqaQuery) or safe_die ("Couldn't get list @sgqa@ conditions in createFieldMap function.<br />$atsgqaQuery<br />".$connect->ErrorMsg()); //Checked
|
||||||
|
$atsgqaRow = $atsgqaResult->FetchRow();
|
||||||
|
if ($atsgqaRow['sgqausedincondition'] == 0 )
|
||||||
|
{
|
||||||
|
$usedinconditions = "N";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$usedinconditions = "Y";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Field identifier
|
// Field identifier
|
||||||
@@ -7816,4 +7833,21 @@ function sDefaultSubmitHandler()
|
|||||||
EOS;
|
EOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function fixes the group ID and type on all subquestions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function fixSubquestions()
|
||||||
|
{
|
||||||
|
$surveyidresult=db_execute_assoc("select sq.qid, sq.parent_qid, sq.gid as sqgid, q.gid, sq.type as sqtype, q.type
|
||||||
|
from ".db_table_name('questions')." sq JOIN ".db_table_name('questions')." q on sq.parent_qid=q.qid
|
||||||
|
where sq.parent_qid>0 and (sq.gid!=q.gid or sq.type!=q.type)");
|
||||||
|
foreach($surveyidresult->GetRows() as $sv)
|
||||||
|
{
|
||||||
|
db_execute_assoc('update '.db_table_name('questions')." set type='{$sv['type']}', gid={$sv['gid']} where qid={$sv['qid']}");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Closing PHP tag intentionally omitted - yes, it is okay
|
// Closing PHP tag intentionally omitted - yes, it is okay
|
||||||
|
|||||||
@@ -78,6 +78,24 @@ HOW TO UPGRADE from a LimeSurvey 1.70(+) version to the latest 1.9x
|
|||||||
Thank you to everyone who helped with this new release!
|
Thank you to everyone who helped with this new release!
|
||||||
|
|
||||||
|
|
||||||
|
Changes from 1.91+ (build 11026) to 1.91+ (build 11110)
|
||||||
|
#Updated translation: Polish (elisa-ls)
|
||||||
|
-Fixed issue: Re-implemented commit 10985 ("groups of "or"ed conditions were displaying multiple times") (maziminke)
|
||||||
|
-Fied issue: Some single choice questions were missing answer codes for available answer options. Some questions using "other" text fields were missing correct IDs. (maziminke)
|
||||||
|
-Fixed issue #05476: File upload questions hidden by condition with min file upload set prevent survey submission (lemeur)
|
||||||
|
-Fixed issue #05477: Users with all rights unticked still see everyone in the system in the surveylist view (lemeur)
|
||||||
|
-Fixed issue #05483: Conditions using previous answers as rightoperand do not work when both questions are on the same page (lemeur)
|
||||||
|
-Fixed issue #05493: Conditions using previous answers (coded as @sgqa@) aren't translated when survey is imported. (lemeur)
|
||||||
|
-Fixed issue 05488: multi numeric - slider, inital value dont register (tpartner)
|
||||||
|
-Fixed issue: slider layout multinumeric can't be answered without javascript (shnoulle)
|
||||||
|
-Fixed issue: Path disclosure vulnerabilities (c_schmitz)
|
||||||
|
-Fixed issue: Templates not editable in Chinese (c_schmitz)
|
||||||
|
|
||||||
|
Changes from 1.91+ (build 11018) to 1.91+ (build 11026)
|
||||||
|
#Updated translation: Italian by Paride Buetti (c_schmitz)
|
||||||
|
-Fixed issue #5426: Language chooser (c_schmitz)
|
||||||
|
-Fixed issue: Tabs not properly displaying for subquestion/answer editing (c_schmitz)
|
||||||
|
|
||||||
Changes from 1.91+ (build 10951) to 1.91+ (build 11018)
|
Changes from 1.91+ (build 10951) to 1.91+ (build 11018)
|
||||||
#Updated translation : French (b00z00)
|
#Updated translation : French (b00z00)
|
||||||
#Updated translation: German (c_schmitz)
|
#Updated translation: German (c_schmitz)
|
||||||
|
|||||||
@@ -1361,14 +1361,14 @@ if (!$previewgrp){
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '</div></div>';
|
echo '</div></div>';
|
||||||
|
/* Can be replaced by php or in global js */
|
||||||
echo "<script type=\"text/javascript\">\n"
|
echo "<script type=\"text/javascript\">\n"
|
||||||
. " $(\".outerframe\").addClass(\"withindex\");\n"
|
. " $(\".outerframe\").addClass(\"withindex\");\n"
|
||||||
. " var idx = $(\"#index\");\n"
|
. " var idx = $(\"#index\");\n"
|
||||||
. " var row = $(\"#index .row.current\");\n"
|
. " var row = $(\"#index .row.current\");\n"
|
||||||
. " idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);\n"
|
. " idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);\n"
|
||||||
. "</script>\n";
|
. "</script>\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<!-- group2.php -->\n"; //This can go eventually - it's redundent for debugging
|
echo "<!-- group2.php -->\n"; //This can go eventually - it's redundent for debugging
|
||||||
|
|||||||
@@ -1102,6 +1102,7 @@ function makelanguagechanger()
|
|||||||
$lang = GetBaseLanguageFromSurveyID($surveyid);
|
$lang = GetBaseLanguageFromSurveyID($surveyid);
|
||||||
|
|
||||||
$htmlcode ="<select name=\"select\" class='languagechanger' onchange=\"javascript:window.location=this.value\">\n";
|
$htmlcode ="<select name=\"select\" class='languagechanger' onchange=\"javascript:window.location=this.value\">\n";
|
||||||
|
$htmlcode .= "<option value=\"$relativeurl/index.php?sid=". $surveyid ."&lang=". $lang ."$tokenparam\">".getLanguageNameFromCode($lang,false)."</option>\n";
|
||||||
$sAddToURL = "";
|
$sAddToURL = "";
|
||||||
$sTargetURL = "$relativeurl/index.php";
|
$sTargetURL = "$relativeurl/index.php";
|
||||||
if ($previewgrp){
|
if ($previewgrp){
|
||||||
@@ -1756,7 +1757,7 @@ function checkUploadedFileValidity($move, $backok=null)
|
|||||||
else
|
else
|
||||||
$filecount = 0;
|
$filecount = 0;
|
||||||
|
|
||||||
if ($filecount < $validation['min_num_of_files'])
|
if ($filecount < $validation['min_num_of_files'] && checkquestionfordisplay($fieldmap[$field]['qid']))
|
||||||
{
|
{
|
||||||
$filenotvalidated = array();
|
$filenotvalidated = array();
|
||||||
$filenotvalidated[$field] = $clang->gT("The minimum number of files has not been uploaded.");
|
$filenotvalidated[$field] = $clang->gT("The minimum number of files has not been uploaded.");
|
||||||
|
|||||||
@@ -4529,12 +4529,9 @@ function do_multiplenumeric($ia)
|
|||||||
. "<div id=\"slider-$myfname\" class=\"ui-slider-1\">\n"
|
. "<div id=\"slider-$myfname\" class=\"ui-slider-1\">\n"
|
||||||
. $slider_showmin
|
. $slider_showmin
|
||||||
. "<div class=\"slider_callout\" id=\"slider-callout-$myfname\"></div>\n"
|
. "<div class=\"slider_callout\" id=\"slider-callout-$myfname\"></div>\n"
|
||||||
. "<div class=\"ui-slider-handle\" id=\"slider-handle-$myfname\"></div>\n"
|
. "<div class=\"ui-slider-handle\" id=\"slider-handle-$myfname\"></div>\n";
|
||||||
. $slider_showmax
|
$answer_main .= "<input class=\"text\" type=\"text\" name=\"$myfname\" id=\"answer$myfname\" value=\"";
|
||||||
. "\t</div>"
|
if (isset($_SESSION[$myfname]) && $_SESSION[$myfname] != '')
|
||||||
. "</div>$sliderright\n"
|
|
||||||
. "<input class=\"text\" type=\"text\" name=\"$myfname\" id=\"answer$myfname\" style=\"display: none;\" value=\"";
|
|
||||||
if (isset($_SESSION[$myfname]))
|
|
||||||
{
|
{
|
||||||
$answer_main .= $_SESSION[$myfname];
|
$answer_main .= $_SESSION[$myfname];
|
||||||
}
|
}
|
||||||
@@ -4542,8 +4539,11 @@ function do_multiplenumeric($ia)
|
|||||||
{
|
{
|
||||||
$answer_main .= $slider_default;
|
$answer_main .= $slider_default;
|
||||||
}
|
}
|
||||||
$answer_main .= "\"/>\n"
|
$answer_main .= "\"/>\n";
|
||||||
. "\t</li>\n";
|
$answer_main .= $slider_showmax
|
||||||
|
. "\t</div>"
|
||||||
|
. "</div>$sliderright\n";
|
||||||
|
$answer_main .= "\t</li>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// $answer .= "\t</tr>\n";
|
// $answer .= "\t</tr>\n";
|
||||||
|
|||||||
@@ -675,14 +675,13 @@ if($thissurvey['allowjumps']=='Y' && !$bIsGroupDescrPage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '</div></div>';
|
echo '</div></div>';
|
||||||
|
echo "<script type=\"text/javascript\">\n"
|
||||||
echo "<script type=\"text/javascript\">\n"
|
. " $(\".outerframe\").addClass(\"withindex\");\n"
|
||||||
. " $(\".outerframe\").addClass(\"withindex\");\n"
|
. " var idx = $(\"#index\");\n"
|
||||||
. " var idx = $(\"#index\");\n"
|
. " var row = $(\"#index .row.current\");\n"
|
||||||
. " var row = $(\"#index .row.current\");\n"
|
. " idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);\n"
|
||||||
. " idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);\n"
|
. "</script>\n";
|
||||||
. "</script>\n";
|
echo "\n";
|
||||||
echo "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($conditions) && is_array($conditions) && count($conditions) != 0)
|
if (isset($conditions) && is_array($conditions) && count($conditions) != 0)
|
||||||
|
|||||||
@@ -64,6 +64,15 @@ function templatereplace($line, $replacements=array(), $anonymized=false)
|
|||||||
{
|
{
|
||||||
$surveyformat = "";
|
$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
|
// real survey contact
|
||||||
if (isset($surveylist['contact']))
|
if (isset($surveylist['contact']))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ $(document).ready(function(){
|
|||||||
// call the init slider routine for each element of the .multinum-slider class
|
// call the init slider routine for each element of the .multinum-slider class
|
||||||
$(".multinum-slider").each(function(i,e) {
|
$(".multinum-slider").each(function(i,e) {
|
||||||
var basename = e.id.substr(10);
|
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
|
$(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');
|
//$("#slider-"+basename).addClass('ui-slider-2');
|
||||||
|
|||||||
@@ -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;
|
gmaps = new Object;
|
||||||
|
|||||||
Reference in New Issue
Block a user