mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
New feature: Seperate limesurvey instrument for respondent selection
Dev Merged back changes from mcmasterlimers branch
This commit is contained in:
@@ -308,7 +308,7 @@ function spss_fieldmap($prefix = 'V') {
|
||||
foreach ($tokenattributes as $attributefield=>$attributedescription)
|
||||
{
|
||||
//Drop the token field, since it is in the survey too
|
||||
if($attributefield!='token') {
|
||||
if($attributefield!='token' && $attributefield!='callattempts' && $attributefield!='onappointment') { //queXS Addition
|
||||
$fieldno++;
|
||||
$fields[] = array('id'=>"$prefix$fieldno",'name'=>mb_substr($attributefield, 0, 8),
|
||||
'qid'=>0,'code'=>'','SPSStype'=>'A','LStype'=>'Undef',
|
||||
@@ -431,7 +431,7 @@ function spss_getquery() {
|
||||
$tokenattributes=GetTokenFieldsAndNames($surveyid,false);
|
||||
foreach ($tokenattributes as $attributefield=>$attributedescription) {
|
||||
//Drop the token field, since it is in the survey too
|
||||
if($attributefield!='token') {
|
||||
if($attributefield!='token' && $attributefield!='callattempts' && $attributefield!='onappointment') { //queXS Addition
|
||||
$query .= "{$dbprefix}tokens_$surveyid.$attributefield, ";
|
||||
}
|
||||
}
|
||||
@@ -454,4 +454,4 @@ function spss_getquery() {
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1282,6 +1282,8 @@ if ($countquota > 0 && (!isset($countquotals) || $countquotals == 0)) {
|
||||
|
||||
if (isset($conditionsarray) && $conditionsarray) {//ONLY DO THIS IF THERE ARE CONDITIONS!
|
||||
$count='0';
|
||||
|
||||
|
||||
foreach ($conditionsarray as $car) {
|
||||
if ($importversion>=111)
|
||||
{
|
||||
@@ -1296,7 +1298,7 @@ if (isset($conditionsarray) && $conditionsarray) {//ONLY DO THIS IF THERE ARE CO
|
||||
}
|
||||
$conditionrowdata=array_combine($fieldorders,$fieldcontents);
|
||||
|
||||
$oldcid=$conditionrowdata["cid"];
|
||||
$oldcid=$conditionrowdata["cid"];
|
||||
$oldqid=$conditionrowdata["qid"];
|
||||
$oldcfieldname=$conditionrowdata["cfieldname"];
|
||||
$oldcqid=$conditionrowdata["cqid"];
|
||||
@@ -1321,7 +1323,11 @@ if (isset($conditionsarray) && $conditionsarray) {//ONLY DO THIS IF THERE ARE CO
|
||||
}
|
||||
foreach($fieldnames as $fns) {
|
||||
//if the $fns['oldcfieldname'] is not the same as $fns['oldfieldname'] then this is a multiple type question
|
||||
if ($fns['oldcfieldname'] == $fns['oldfieldname']) { //The normal method - non multiples
|
||||
if (stripos($oldcfieldname,'TOKEN') !== false) //detecting tokens
|
||||
{
|
||||
$newcfieldname = $oldcfieldname;
|
||||
}
|
||||
else if ($fns['oldcfieldname'] == $fns['oldfieldname']) { //The normal method - non multiples
|
||||
if ($oldcfieldname==$fns['oldcfieldname']) {
|
||||
$newcfieldname=$fns['newcfieldname'];
|
||||
}
|
||||
@@ -1332,6 +1338,7 @@ if (isset($conditionsarray) && $conditionsarray) {//ONLY DO THIS IF THERE ARE CO
|
||||
}
|
||||
}
|
||||
if (!isset($newcfieldname)) {$newcfieldname="";}
|
||||
|
||||
unset($conditionrowdata["cid"]);
|
||||
$conditionrowdata["qid"]=$newqid;
|
||||
$conditionrowdata["cfieldname"]=$newcfieldname;
|
||||
|
||||
Reference in New Issue
Block a user