Skip to content

Commit

Permalink
Fixed issue #5658: Notices when importing survey
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12257 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c_schmitz committed Jan 30, 2012
1 parent 9941c6d commit a7707dc
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions application/helpers/common_helper.php
Expand Up @@ -2328,7 +2328,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
foreach ($aresult as $arow) //With each question, create the appropriate field(s))
{
++$questionSeq;

// fix fact taht group_order may have gaps
if ($_groupOrder != $arow['group_order']) {
$_groupOrder = $arow['group_order'];
Expand All @@ -2344,7 +2344,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
// If S or A don't exist then set it to 0
// Implicit (subqestion intermal to a question type ) or explicit qubquestions/answer count starts at 1

// Types "L", "!" , "O", "D", "G", "N", "X", "Y", "5","S","T","U"
// Types "L", "!", "O", "D", "G", "N", "X", "Y", "5", "S", "T", "U"
$fieldname="{$arow['sid']}X{$arow['gid']}X{$arow['qid']}";

if ($qtypes[$arow['type']]['subquestions']==0 && $arow['type'] != "R" && $arow['type'] != "|")
Expand Down Expand Up @@ -2679,13 +2679,16 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
}
}
}
$fieldmap[$fieldname]['relevance']=$arow['relevance'];
$fieldmap[$fieldname]['grelevance']=$arow['grelevance'];
$fieldmap[$fieldname]['questionSeq']=$questionSeq;
$fieldmap[$fieldname]['groupSeq']=$groupSeq;
$fieldmap[$fieldname]['preg']=$arow['preg'];
$fieldmap[$fieldname]['other']=$arow['other'];
$fieldmap[$fieldname]['help']=$arow['help'];
if (isset($fieldmap[$fieldname]))
{
$fieldmap[$fieldname]['relevance']=$arow['relevance'];
$fieldmap[$fieldname]['grelevance']=$arow['grelevance'];
$fieldmap[$fieldname]['questionSeq']=$questionSeq;
$fieldmap[$fieldname]['groupSeq']=$groupSeq;
$fieldmap[$fieldname]['preg']=$arow['preg'];
$fieldmap[$fieldname]['other']=$arow['other'];
$fieldmap[$fieldname]['help']=$arow['help'];
}
}

if (isset($fieldmap)) {
Expand Down

0 comments on commit a7707dc

Please sign in to comment.