summaryrefslogtreecommitdiffstats
path: root/admin/survey/export/latexclasses/class.LatexAnalysis.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/export/latexclasses/class.LatexAnalysis.php')
-rw-r--r--admin/survey/export/latexclasses/class.LatexAnalysis.php26
1 files changed, 9 insertions, 17 deletions
diff --git a/admin/survey/export/latexclasses/class.LatexAnalysis.php b/admin/survey/export/latexclasses/class.LatexAnalysis.php
index ec00834..98815ed 100644
--- a/admin/survey/export/latexclasses/class.LatexAnalysis.php
+++ b/admin/survey/export/latexclasses/class.LatexAnalysis.php
@@ -86,13 +86,9 @@ class LatexAnalysis{
# preberemo header
if ($this->headFileName !== null) {
//polovimo podatke o nastavitvah trenutnega profila (missingi..)
- //SurveyMissingProfiles :: Init(self::$sid,$global_user_id);
SurveyMissingProfiles :: Init($this->spremenljivka,$this->anketa['uid']);
SurveyAnalysis::$missingProfileData = SurveyMissingProfiles::getProfile(SurveyAnalysis::$currentMissingProfile);
- //echo "SurveyAnalysis::missingProfileData in displayAnalysis: ".SurveyAnalysis::$missingProfileData." </br>";
- //echo "Indeksi SurveyAnalysis::missingProfileData v displayAnalysis: ".print_r(array_keys(SurveyAnalysis::$missingProfileData))." </br>";
- //echo "display_mv_type in displayAnalysis: ".SurveyAnalysis::$missingProfileData['display_mv_type']." </br>";
// Preverimo ce imamo zanke (po skupinah)
SurveyAnalysis::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
@@ -105,14 +101,9 @@ class LatexAnalysis{
#odstranimo sistemske variable
SurveyAnalysis::removeSystemVariables();
-
- //echo in_array($this->$spremenljivka['tip'], SurveyAnalysis::$_FILTRED_TYPES );
//$vars_count = count(SurveyAnalysis::$_FILTRED_VARIABLES);
- //echo 'sprID: '.$_GET['sprID'].'</br>';
- //echo 'export_subtype: '.$export_subtype.'</br>';
-
/*Izpis naslova izvoza*/
switch ( $export_subtype ){
case 'sums':
@@ -166,13 +157,10 @@ class LatexAnalysis{
foreach (SurveyAnalysis::$_HEADERS AS $spid => $spremenljivka) {
$analysisTable = new LatexAnalysisElement($this->anketa, $spremenljivka, $this->export_format, 0, $spid, $this->headFileName, $export_subtype);
//if(SurveyAnalysis::$_FILTRED_VARIABLES[$spid]){
- if (($spremenljivka['tip'] != 'm'
+ if ((isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
&& in_array($spremenljivka['tip'], SurveyAnalysis::$_FILTRED_TYPES ))
&& (!isset($_spid) || (isset($_spid) && $_spid == $spid))
&& ($this->spremenljivka == $spid || $this->spremenljivka == null) ){
- //echo "spremenljivka tip : ".$spremenljivka['tip']."</br>";
- /*echo "spr_id: ".$this->spremenljivka."</br>";
- echo "spid : ".$spid."</br>"; */
# če nimamo zank
if(count(SurveyAnalysis::$_LOOPS) == 0){
$tex .= $analysisTable->displayTablesLatex($spid, $this->export_format);
@@ -238,8 +226,10 @@ class LatexAnalysis{
break;
case 'crosstab':
- $crossData1 = explode(",", $_GET['data1']);
- $crossData2 = explode(",", $_GET['data2']);
+ $tmp_data1 = isset($_GET['data1'])?$_GET['data1']:null;
+ $tmp_data2 = isset($_GET['data2'])?$_GET['data2']:null;
+ $crossData1 = explode(",", $tmp_data1);
+ $crossData2 = explode(",", $tmp_data2);
$analysisTable = new LatexAnalysisElement($this->anketa, 0, $this->export_format, 0, 0, $this->headFileName, $export_subtype);
$tex .= $analysisTable->displayCrosstabsTablesLatex($crossData1, $crossData2);
break;
@@ -261,11 +251,13 @@ class LatexAnalysis{
break;
case 'heatmap_image_pdf':
$analysisHeatmapImage = new LatexAnalysisElement($this->anketa, 0, $this->export_format, 0, 0, $this->headFileName, $export_subtype);
- $tex .= $analysisHeatmapImage->displayHeatmapImageLatex($_GET['sprID']);
+ $tmp_sprID = isset($_GET['sprID'])?$_GET['sprID']:null;
+ $tex .= $analysisHeatmapImage->displayHeatmapImageLatex($tmp_sprID);
break;
case 'chart':
$analysisChart = new LatexAnalysisElement($this->anketa, 0, $this->export_format, 0, 0, $this->headFileName, $export_subtype);
- $tex .= $analysisChart->displayChartLatex($_GET['sprID']);
+ $tmp_sprID = isset($_GET['sprID'])?$_GET['sprID']:null;
+ $tex .= $analysisChart->displayChartLatex($tmp_sprID);
break;
case 'creport':
$analysisCreport = new LatexAnalysisElement($this->anketa, 0, $this->export_format, 0, 0, $this->headFileName, $export_subtype);