Skip to content

Commit

Permalink
Fixed issue #6931: Array questions do not display graphs by default e…
Browse files Browse the repository at this point in the history
…ven if set to Yes - patch by pfpDave
  • Loading branch information
c-schmitz committed Nov 30, 2012
1 parent 04c54a3 commit 0bca7c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -591,7 +591,8 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
$fieldmap=createFieldMap($surveyid, "full", false, false, $language);
$sDatabaseType = Yii::app()->db->getDriverName();
$statisticsoutput="";

$qqid = "";

/* Some variable depend on output type, actually : only line feed */
switch($outputType)
{
Expand Down Expand Up @@ -1570,7 +1571,7 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,

}

return array("alist"=>$alist, "qtitle"=>$qtitle, "qquestion"=>$qquestion, "qtype"=>$qtype, "statisticsoutput"=>$statisticsoutput);
return array("alist"=>$alist, "qtitle"=>$qtitle, "qquestion"=>$qquestion, "qtype"=>$qtype, "statisticsoutput"=>$statisticsoutput, "parentqid"=>$qqid);
}

/**
Expand Down Expand Up @@ -2875,7 +2876,7 @@ protected function displayResults($outputs, $results, $rt, $outputType, $surveyi
//-------------------------- PCHART OUTPUT ----------------------------
list($qsid, $qgid, $qqid) = explode("X", $rt, 3);
$qsid = $surveyid;
$aattr = getQuestionAttributeValues($qqid, substr($rt, 0, 1));
$aattr = getQuestionAttributeValues($outputs['parentqid'], substr($rt, 0, 1));

//PCHART has to be enabled and we need some data
if ($usegraph == 1) {
Expand Down

0 comments on commit 0bca7c2

Please sign in to comment.