diff --git a/admin/survey/classes/surveyData/class.SurveyDataCollect.php b/admin/survey/classes/surveyData/class.SurveyDataCollect.php index 34ff1fdaa..9698db74e 100644 --- a/admin/survey/classes/surveyData/class.SurveyDataCollect.php +++ b/admin/survey/classes/surveyData/class.SurveyDataCollect.php @@ -128,8 +128,6 @@ class SurveyDataCollect{ if (is_numeric($sid) && (int)$sid > 0) { - $this->setLogCheckpoint('START'); - // Nastavimo id ankete $this->sid = $sid; @@ -139,8 +137,6 @@ class SurveyDataCollect{ // Nastavimo spremenljivke, ki so potrebne pri generiranju datoteke (cas zadnjega vnosa, status datoteke...) $this->prepareVariables(); - $this->setLogCheckpoint('CONST2'); - // Za vsak slucaj resetiramo vse pointerje $this->cleanup(); @@ -214,24 +210,14 @@ class SurveyDataCollect{ public function createFiles() { global $site_url, $lang, $site_path; - $this->setLogCheckpoint('CF1'); - // Najprej zakesiramo vse podatke $this->cache_data(); - $this->setLogCheckpoint('CF2'); - // Zgeneriramo datoteko z naslovno vrstico $CH = (int)$this->createHeadFile(); - $this->setLogCheckpoint('CF3'); - // Zgeneriramo datoteko s podatki $CD = (int)$this->createDataFile(); - - $this->setLogCheckpoint('CF4'); - - $this->saveLogCheckpoints(); } // Posodobimo datoteke ker so zastarele @@ -297,8 +283,6 @@ class SurveyDataCollect{ // Kreiramo datoteko z responsi private function createDataFile() { - $this->setLogCheckpoint('CDF1'); - $result = false; // Pobrišemo še morebitne prazne vrstice @@ -326,8 +310,6 @@ class SurveyDataCollect{ // Datoteko pripravimo za dodajanje $file_handler = fopen($this->data_file_name, "a"); - $this->setLogCheckpoint('CDF2'); - if ($this->noErrors) { $_tmpCnt = 0; @@ -348,8 +330,6 @@ class SurveyDataCollect{ $_tmpCnt++; } } - - $this->setLogCheckpoint('CDF3'); // Peverimo da res ni prišlo do napak if ($this->noErrors) { @@ -371,8 +351,6 @@ class SurveyDataCollect{ } } - $this->setLogCheckpoint('CDF4'); - // Zapremo datoteko if ($file_handler !== null) { fclose($file_handler); @@ -419,9 +397,7 @@ class SurveyDataCollect{ // Naredimo še cleanup pointerjev $this->cleanup(); - - $this->setLogCheckpoint('CDF5'); - + return $result; } @@ -1419,15 +1395,11 @@ class SurveyDataCollect{ // Zbiramo podatke public function CollectData($c, $file_handler) { global $site_path, $site_url, $lang, $admin_type; - - $this->setLogCheckpoint('C1'); # osvežimo podatke if (mysqli_num_rows($this->_qry_users[$c]) > 0) { mysqli_data_seek($this->_qry_users[$c], 0); } - - $this->setLogCheckpoint('C2'); $_tmpCnt = $c * MAX_USER_PER_LOOP; @@ -1439,8 +1411,6 @@ class SurveyDataCollect{ // lang od 0 je privzet $jeziki[0] = $lang['language']; $jeziki[$lang['id']] = $lang['language']; - - $this->setLogCheckpoint('C3'); if ($this->noErrors) { @@ -2687,8 +2657,6 @@ class SurveyDataCollect{ } // end while user loop } // end if ($this->noErrors) - - $this->setLogCheckpoint('C4'); } /***** KONEC - ZBIRANJE PODATKOV ZA DATOTEKO *****/ @@ -3343,9 +3311,6 @@ class SurveyDataCollect{ // Zakesiramo odgovore respondenta private function cache_data_respondent($string_user){ - - $this->setLogCheckpoint('CDR1'.$string_user); - if ($this->_str_questions != '') { // resetiramo POINTER-je - Array-je do podatkov @@ -3373,15 +3338,10 @@ class SurveyDataCollect{ $_string_user = explode(',', $_string_user); $string_user = ' AND usr_id BETWEEN '.$_string_user[0].' AND '.end($_string_user); - $this->setLogCheckpoint('CDR2'.$string_user); - // Zakesiramo vse podatke - ce ni nobenega vprasanja tega tipa v anketi, ne rabimo tega izvajat $this->cache_data_respondent_vrednost($string_user); - $this->setLogCheckpoint('CDR2B'.$string_user); $this->cache_data_respondent_text($string_user); - $this->setLogCheckpoint('CDR3'.$string_user); - // Kesiranje podatkov za srv_data_grid if((isset($this->_cnt_questions_types['6']) && $this->_cnt_questions_types['6'] > 0) || (isset($this->_cnt_questions_types['16']) && $this->_cnt_questions_types['16'] > 0) @@ -3391,8 +3351,6 @@ class SurveyDataCollect{ ) $this->cache_data_respondent_grid($string_user); - $this->setLogCheckpoint('CDR4'.$string_user); - // Kesiranje podatkov za srv_data_checkgrid if((isset($this->_cnt_questions_types['6']) && $this->_cnt_questions_types['6'] > 0) || (isset($this->_cnt_questions_types['16']) && $this->_cnt_questions_types['16'] > 0) @@ -3424,8 +3382,6 @@ class SurveyDataCollect{ $this->cache_data_respondent_heatmap($string_user); $this->cache_data_respondent_heatmap_regions($string_user); } - - $this->setLogCheckpoint('CDR5'.$string_user); // Kesiranje podatkov za srv_data_vrednost_cond if((isset($this->_cnt_questions_types['2']) && $this->_cnt_questions_types['2'] > 0) @@ -3436,8 +3392,6 @@ class SurveyDataCollect{ // Kesiranje podatkov za randomizirane vrednosti oz. randomizirana vprasanja v blokih $this->cache_data_respondent_random($string_user); } - - $this->setLogCheckpoint('CDR6'.$string_user); } // Zakesiramo case odgovorov po straneh za respondenta @@ -3462,8 +3416,6 @@ class SurveyDataCollect{ // Zakesiramo podatke tabele srv_data_vrednost private function cache_data_respondent_vrednost($string_user){ - $this->setLogCheckpoint('SDRV1'.$string_user); - if ($this->_array_data_vrednost === null) { $_qry_data_vrednost = sisplet_query("SELECT spr_id, vre_id, usr_id, loop_id @@ -3482,8 +3434,6 @@ class SurveyDataCollect{ } } } - - $this->setLogCheckpoint('SDRV2'.$string_user); } // Vrnemo vrednost za uid in spr_id za tabelo srv_data_vrednost diff --git a/admin/survey/classes/surveyData/class.SurveyDataFile.php b/admin/survey/classes/surveyData/class.SurveyDataFile.php index d3a788d11..d42b24bc7 100644 --- a/admin/survey/classes/surveyData/class.SurveyDataFile.php +++ b/admin/survey/classes/surveyData/class.SurveyDataFile.php @@ -201,11 +201,10 @@ class SurveyDataFile { if ((int)$this->all_user_cnt > ONLY_VALID_LIMIT && (int)$this->collect_all_status == 1) { $this->collect_all_status = 0; - $this->data_file_time = 0; - + $updated = sisplet_query("INSERT INTO srv_data_files (sid, collect_all_status, data_file_time) VALUES ('".$this->anketa."','".(int)$this->collect_all_status."', '0000-00-00') - ON DUPLICATE KEY UPDATE collect_all_status = '".(int)$this->collect_all_status."', data_file_time = '0000-00-00'"); + ON DUPLICATE KEY UPDATE collect_all_status = '".(int)$this->collect_all_status."'"); } // Nastavimo, ce imamo testne vnose @@ -430,7 +429,7 @@ class SurveyDataFile { $collectData = new SurveyDataCollect($this->anketa); // File status old - inkrementalno dodamo nove response - if($this->file_status == FILE_STATUS_OLD){ + if($this->file_status == FILE_STATUS_OLD){ $sdc = new SurveyDataCollect($this->anketa); $createdNewFile = (int)$sdc->updateFilesIncremental(); }