anketa['id'] = $anketa; SurveyAnalysis::Init($this->anketa['id']); SurveyAnalysis::$setUpJSAnaliza = false; // create new XLS document $this->xls = new xls(); // Poskrbimo za datoteko s podatki $SDF = SurveyDataFile::get_instance(); $SDF->init($this->anketa['id']); $SDF->prepareFiles(); $this->headFileName = $SDF->getHeaderFileName(); $this->dataFileName = $SDF->getDataFileName(); $this->dataFileStatus = $SDF->getStatus(); $_GET['a'] = A_ANALYSIS; // preberemo nastavitve iz baze (prej v sessionu) SurveyUserSession::Init($this->anketa['id']); $this->sessionData = SurveyUserSession::getData('ttest'); // ustvarimo ttest objekt $this->ttestClass = new SurveyTTest($this->anketa['id']); if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init()){ $this->anketa['uid'] = $global_user_id; SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']); } else return false; return true; } else{ return false; } } // SETTERS && GETTERS function getFile($fileName) { //Close and output rtf document $output = $this->createXls(); $this->xls->display($fileName, $output); } function init() { return true; } function encodeText($text) { // popravimo sumnike ce je potrebno $text = html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'); $text = str_replace(array("š","š","č"),array("š","š","č"),$text); return strip_tags($text); } function createXls() { global $site_path; global $lang; global $output; $convertTypes = array('charSet' => "windows-1250", 'delimit' => ";", 'newLine' => "\n", 'BOMchar' => "\xEF\xBB\xBF"); $output = $convertTypes['BOMchar']; $output .= '
'.$lang['export_analisys_ttest'].' |
'; $output .= ''.$sprLabel2.''; $output .= ' | '; $output .= ''; $output .= ''.$sprLabel1.''; $output .= ' | '; $output .= '|||||||||
'; #frekvenca $output .= ' | n | '; #povprečje $output .= 'x | '; #varianca $output .= 's² | '; #standardna napaka $output .= 'se(x) | '; #margini $output .= '±1,96×se(x) | '; #d $output .= 'd | '; #sed $output .= 'se(d) | '; #signifikanca $output .= 'Sig. | '; #ttest $output .= 't | '; $output .= '|
---|---|---|---|---|---|---|---|---|---|---|
'.$label1.' | '; #frekvenca $output .= ''.$this->ttestClass->formatNumber($ttest[1]['n'],0).' | '; #povprečje $output .= ''.$this->ttestClass->formatNumber($ttest[1]['x'],3).' | '; #varianca $output .= ''.$this->ttestClass->formatNumber($ttest[1]['s2'],3).' | '; #standardna napaka $output .= ''.$this->ttestClass->formatNumber($ttest[1]['se'],3).' | '; #margini $output .= ''.$this->ttestClass->formatNumber($ttest[1]['margin'],3).' | '; #d $output .= ''.$this->ttestClass->formatNumber($ttest['d'],3).' | '; #sed $output .= ''.$this->ttestClass->formatNumber($ttest['sed'],3).' | '; #signifikanca $output .= ''.$this->ttestClass->formatNumber($ttest['sig'],3).' | '; #ttest $output .= ''.$this->ttestClass->formatNumber($ttest['t'],3).' | '; $output .= '|
'.$label2.' | '; #frekvenca $output .= ''.$this->ttestClass->formatNumber($ttest[2]['n'],0).' | '; #povprečje $output .= ''.$this->ttestClass->formatNumber($ttest[2]['x'],3).' | '; #varianca $output .= ''.$this->ttestClass->formatNumber($ttest[2]['s2'],3).' | '; #standardna napaka $output .= ''.$this->ttestClass->formatNumber($ttest[2]['se'],3).' | '; #margini $output .= ''.$this->ttestClass->formatNumber($ttest[2]['margin'],3).' | '; $output .= '