diff --git a/admin/survey/classes/class.GDPR.php b/admin/survey/classes/class.GDPR.php index a74ec0090..14205f267 100644 --- a/admin/survey/classes/class.GDPR.php +++ b/admin/survey/classes/class.GDPR.php @@ -55,113 +55,87 @@ class GDPR{ global $site_url; global $lang; - $survey_list = array(); - $survey_list = $this->getUserSurveys(); + + // Dobimo seznam vseh anket in stevilke + list($survey_list, $survey_count) = $this->getUserSurveys(); - // echo '
'; - - echo ''; - } // Prikazemo vsebino zavihka gdpr - nastavitve uporabnika @@ -1440,12 +1407,24 @@ class GDPR{ $temp_naslov = array(); $temp_active = array(); + $count_gdpr = 0; + $count_potential_gdpr = 0; + $count_no_gdpr = 0; + $key = 0; foreach($surveys as $anketa){ $potential_gdpr = $this->potentialGDPRSurvey($anketa['id']); $gdpr = $this->isGDPRSurvey($anketa['id']); + // Prestejemo ankete v posamezni skupini + if($gdpr == '1') + $count_gdpr++; + elseif($potential_gdpr == '1') + $count_potential_gdpr++; + else + $count_no_gdpr++; + $temp_gdpr[$key] = $gdpr; $temp_gdpr_p[$key] = $potential_gdpr; $temp_naslov[$key] = $anketa['naslov']; @@ -1464,7 +1443,13 @@ class GDPR{ array_multisort($temp_gdpr, SORT_DESC, $temp_gdpr_p, SORT_DESC, $temp_active, SORT_DESC, $temp_naslov, SORT_DESC, $survey_list); - return $survey_list; + $survey_count = array( + 'gdpr' => $count_gdpr, + 'potential_gdpr' => $count_potential_gdpr, + 'no_gdpr' => $count_no_gdpr + ); + + return array($survey_list, $survey_count); } // Pridobimo vse zahteve za izbris za userja (za vse ankete ali samo za doloceno anketo) diff --git a/admin/survey/classes/class.SurveyTheme.php b/admin/survey/classes/class.SurveyTheme.php index ffb1c40da..de553f92a 100644 --- a/admin/survey/classes/class.SurveyTheme.php +++ b/admin/survey/classes/class.SurveyTheme.php @@ -370,10 +370,8 @@ class SurveyTheme { } //Gumbi - echo ''; echo '