Skip to content

Commit

Permalink
Fixed issue #7998: Underscore character in subqestion code breaks exp…
Browse files Browse the repository at this point in the history
…ort of Array (numerical) questions
  • Loading branch information
c-schmitz committed Oct 9, 2013
1 parent 0fbc94f commit af33002
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions application/helpers/admin/export/Writer.php
Expand Up @@ -241,31 +241,10 @@ public function getFullFieldSubHeading(SurveyObj $survey, FormattingOptions $oOp
}

break;

case ':':
case ';':
//The headers created by this section of code are significantly different from
//the old code. I believe that they are more accurate. - elameno
list($scaleZeroTitle, $scaleOneTitle) = explode('_', $answerCode);
$sqs = $survey->getSubQuestionArrays($questionId);

$scaleZeroText = '';
$scaleOneText = '';
foreach ($sqs as $sq)
{
if ($sq['title'] == $scaleZeroTitle && $sq['scale_id'] == 0)
{
$scaleZeroText = $sq['question'];
}
elseif ($sq['title'] == $scaleOneTitle && $sq['scale_id'] == 1)
{
$scaleOneText = $sq['question'];
}
}

$subHeading .= ' ['.$this->stripTagsFull($scaleZeroText).']['.$this->stripTagsFull($scaleOneText).']';
$subHeading .= ' ['.$this->stripTagsFull($field['subquestion1']).']['.$this->stripTagsFull($field['subquestion2']).']';
break;

case '1':
$answerScale = substr($fieldName, -1) + 1;
$subQuestions = $survey->getSubQuestionArrays($questionId);
Expand Down

0 comments on commit af33002

Please sign in to comment.