Skip to content

Commit

Permalink
DEv Removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 23, 2017
1 parent 43ab5be commit cc27da3
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -3084,11 +3081,9 @@ protected function displayResults($outputs, $results, $rt, $outputType, $surveyi
if ($outputs['qtype'] == 'P')
{
$extraline .= "<div class='statisticsbrowsecolumn' id='columnlist_{$ColumnName_RM[$i]}'></div></td></tr>\n";
$sColumnNameForView = $ColumnName_RM[$i];
} else
{
$extraline .= "<div class='statisticsbrowsecolumn' id='columnlist_{$sColumnName}'></div></td></tr>\n";
$sColumnNameForView = $sColumnName;
}
}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cc27da3

Please sign in to comment.