Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
6a5fc8d0e7
@ -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;
|
||||
@ -349,8 +331,6 @@ class SurveyDataCollect{
|
||||
}
|
||||
}
|
||||
|
||||
$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);
|
||||
@ -420,8 +398,6 @@ class SurveyDataCollect{
|
||||
// Naredimo še cleanup pointerjev
|
||||
$this->cleanup();
|
||||
|
||||
$this->setLogCheckpoint('CDF5');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1420,15 +1396,11 @@ class SurveyDataCollect{
|
||||
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;
|
||||
|
||||
$_dataLine = "";
|
||||
@ -1440,8 +1412,6 @@ class SurveyDataCollect{
|
||||
$jeziki[0] = $lang['language'];
|
||||
$jeziki[$lang['id']] = $lang['language'];
|
||||
|
||||
$this->setLogCheckpoint('C3');
|
||||
|
||||
if ($this->noErrors) {
|
||||
|
||||
while ($rowUser = mysqli_fetch_assoc($this->_qry_users[$c])) {
|
||||
@ -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)
|
||||
@ -3425,8 +3383,6 @@ class SurveyDataCollect{
|
||||
$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)
|
||||
|| (isset($this->_cnt_questions_types['27']) && $this->_cnt_questions_types['27'] > 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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user