diff --git a/application/helpers/admin/statistics_helper.php b/application/helpers/admin/statistics_helper.php index 2793c5e35f2..644175bdf29 100644 --- a/application/helpers/admin/statistics_helper.php +++ b/application/helpers/admin/statistics_helper.php @@ -37,7 +37,6 @@ function createChart($iQuestionID, $iSurveyID, $type = null, $lbl, $gdata, $graw return false; } $rootdir = Yii::app()->getConfig("rootdir"); - $homedir = Yii::app()->getConfig("homedir"); $admintheme = Yii::app()->getConfig("admintheme"); $chartfontfile = Yii::app()->getConfig("chartfontfile"); $chartfontsize = Yii::app()->getConfig("chartfontsize"); @@ -661,7 +660,6 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql, $qtitle = $nresult->title; $qtype = $nresult->type; $qquestion = flattenText($nresult->question); - $qlid = $nresult->parent_qid; $qother = $nresult->other; //1. Get list of answers @@ -2034,9 +2032,9 @@ protected function displaySimpleResults($outputs, $results, $rt, $outputType, $s case 6: case 7: if (($results - $grawdata[5]) > 0) { - $percentage = $grawdata[$i] / $results * 100; // All results + $aggregatedPercentage = $grawdata[$i] / $results * 100; // All results } else { - $percentage = 0; + $aggregatedPercentage = 0; } break; @@ -2203,8 +2201,7 @@ protected function displaySimpleResults($outputs, $results, $rt, $outputType, $s //-------------------------- PCHART OUTPUT ---------------------------- - list($qsid, $qgid, $qqid) = explode("X", $rt, 3); - $qsid = $surveyid; + list(, $qgid, $qqid) = explode("X", $rt, 3); $aattr = QuestionAttribute::model()->getQuestionAttributes($outputs['parentqid']); //PCHART has to be enabled and we need some data @@ -3084,11 +3081,9 @@ protected function displayResults($outputs, $results, $rt, $outputType, $surveyi if ($outputs['qtype'] == 'P') { $extraline .= "
\n"; - $sColumnNameForView = $ColumnName_RM[$i]; } else { $extraline .= "
\n"; - $sColumnNameForView = $sColumnName; } } @@ -3774,9 +3769,6 @@ public function generate_simple_statistics($surveyid, $allfields, $q2show = 'all $sLanguageCode = $survey->language; } - - $surveylanguagecodes = $survey->allLanguages; - // Set language for questions and answers to base language of this survey $language = $survey->language; @@ -3897,7 +3889,6 @@ public function generate_html_chartjs_statistics($surveyid, $allfields, $q2show //no survey ID? -> come and get one if (!isset($surveyid)) {$surveyid = returnGlobal('sid'); } - $surveylanguagecodes = $survey->allLanguages; // Set language for questions and answers to base language of this survey $language = $sLanguageCode;