Glasovanje - ni analiz razbitje, ttest, povprecja, tabele in multitabele

This commit is contained in:
pero1203 2022-01-27 10:18:58 +01:00
parent 7926a2fb5f
commit 4a5f788897
7 changed files with 60 additions and 26 deletions

View File

@ -328,11 +328,14 @@ class SurveyCustomReport {
echo '<option value="2" '.($reportElement['type'] == 2 ? 'selected="selected"' : '').'>'.$lang['srv_frequency'].'</option>'; echo '<option value="2" '.($reportElement['type'] == 2 ? 'selected="selected"' : '').'>'.$lang['srv_frequency'].'</option>';
echo '<option value="3" '.($reportElement['type'] == 3 ? 'selected="selected"' : '').'>'.$lang['srv_descriptor_short'].'</option>'; echo '<option value="3" '.($reportElement['type'] == 3 ? 'selected="selected"' : '').'>'.$lang['srv_descriptor_short'].'</option>';
echo '<option value="4" '.($reportElement['type'] == 4 ? 'selected="selected"' : '').'>'.$lang['srv_chart'].'</option>'; echo '<option value="4" '.($reportElement['type'] == 4 ? 'selected="selected"' : '').'>'.$lang['srv_chart'].'</option>';
echo '<option value="5" '.($reportElement['type'] == 5 ? 'selected="selected"' : '').'>'.$lang['srv_crosstabs'].'</option>';
echo '<option value="10" '.($reportElement['type'] == 10 ? 'selected="selected"' : '').'>'.$lang['srv_multicrosstab'].'</option>'; if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") != 0){
echo '<option value="6" '.($reportElement['type'] == 6 ? 'selected="selected"' : '').'>'.$lang['srv_means_label'].'</option>'; echo '<option value="5" '.($reportElement['type'] == 5 ? 'selected="selected"' : '').'>'.$lang['srv_crosstabs'].'</option>';
echo '<option value="7" '.($reportElement['type'] == 7 ? 'selected="selected"' : '').'>'.$lang['srv_ttest'].'</option>'; echo '<option value="10" '.($reportElement['type'] == 10 ? 'selected="selected"' : '').'>'.$lang['srv_multicrosstab'].'</option>';
echo '<option value="9" '.($reportElement['type'] == 9 ? 'selected="selected"' : '').'>'.$lang['srv_break'].'</option>'; echo '<option value="6" '.($reportElement['type'] == 6 ? 'selected="selected"' : '').'>'.$lang['srv_means_label'].'</option>';
echo '<option value="7" '.($reportElement['type'] == 7 ? 'selected="selected"' : '').'>'.$lang['srv_ttest'].'</option>';
echo '<option value="9" '.($reportElement['type'] == 9 ? 'selected="selected"' : '').'>'.$lang['srv_break'].'</option>';
}
echo '</select>'; echo '</select>';

View File

@ -768,39 +768,44 @@ class SurveyStaticHtml
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_FREQUENCY . '" title="' . $lang['srv_frequency'] . '"><span>' . $lang['srv_frequency'] . '</span></a>'; echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_FREQUENCY . '" title="' . $lang['srv_frequency'] . '"><span>' . $lang['srv_frequency'] . '</span></a>';
echo '</li>'; echo '</li>';
# crostabs // Pri glasovanju nimamo teh modulov ker imamo samo 1 vprasanje
echo '<li' . ($_GET['m'] == M_ANALYSIS_CROSSTAB ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[4] . '>'; if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") != 0){
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_CROSSTAB . '" title="' . $lang['srv_crosstabs'] . '"><span>' . $lang['srv_crosstabs'] . '</span></a>';
echo '</li>';
# multicrostabs # crostabs
echo '<li' . ($_GET['m'] == M_ANALYSIS_MULTICROSSTABS ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[8] . '>'; echo '<li' . ($_GET['m'] == M_ANALYSIS_CROSSTAB ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[4] . '>';
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MULTICROSSTABS . '" title="' . $lang['srv_multicrosstabs'] . '"><span>' . $lang['srv_multicrosstabs'] . '</span></a>'; echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_CROSSTAB . '" title="' . $lang['srv_crosstabs'] . '"><span>' . $lang['srv_crosstabs'] . '</span></a>';
echo '</li>'; echo '</li>';
# povprečaj # multicrostabs
echo '<li' . ($_GET['m'] == M_ANALYSIS_MEANS ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[5] . '>'; echo '<li' . ($_GET['m'] == M_ANALYSIS_MULTICROSSTABS ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[8] . '>';
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MEANS . '" title="' . $lang['srv_means'] . '"><span>' . $lang['srv_means'] . '</span></a>'; echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MULTICROSSTABS . '" title="' . $lang['srv_multicrosstabs'] . '"><span>' . $lang['srv_multicrosstabs'] . '</span></a>';
echo '</li>'; echo '</li>';
# ttest # povprečaj
if ($admin_type == 0) { echo '<li' . ($_GET['m'] == M_ANALYSIS_MEANS ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[5] . '>';
echo '<li' . ($_GET['m'] == M_ANALYSIS_TTEST ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[6] . '>'; echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MEANS . '" title="' . $lang['srv_means'] . '"><span>' . $lang['srv_means'] . '</span></a>';
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_TTEST . '" title="' . $lang['srv_ttest'] . '"><span>' . $lang['srv_ttest'] . '</span></a>'; echo '</li>';
# ttest
if ($admin_type == 0) {
echo '<li' . ($_GET['m'] == M_ANALYSIS_TTEST ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[6] . '>';
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_TTEST . '" title="' . $lang['srv_ttest'] . '"><span>' . $lang['srv_ttest'] . '</span></a>';
echo '</li>';
}
# break
echo '<li' . ($_GET['m'] == M_ANALYSIS_BREAK ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[7] . '>';
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_BREAK . '" title="' . $lang['srv_break'] . '"><span>' . $lang['srv_break'] . '</span></a>';
echo '</li>'; echo '</li>';
} }
# break
echo '<li' . ($_GET['m'] == M_ANALYSIS_BREAK ? ' class="highlightLineTab"' : ' class="nonhighlight displayNone"') . $_js_links[7] . '>';
echo '<a href="index.php?anketa=' . $this->sid . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_BREAK . '" title="' . $lang['srv_break'] . '"><span>' . $lang['srv_break'] . '</span></a>';
echo '</li>';
# predogled # predogled
echo '<li class="previewCheck displayNone">'; echo '<li class="previewCheck displayNone">';
echo '<label><input type="checkbox" id="cbx_shoq_analiza_preview" onchange="change_analiza_preview();"' . ($show_analiza_preview == true ? ' checked=checked' : '') . '>' . $lang['srv_preview'] . '</label>'; echo '<label><input type="checkbox" id="cbx_shoq_analiza_preview" onchange="change_analiza_preview();"' . ($show_analiza_preview == true ? ' checked=checked' : '') . '>' . $lang['srv_preview'] . '</label>';
echo '</li>'; echo '</li>';
echo '</ul>'; echo '</ul>';
} }
if ($showDiv) { if ($showDiv) {
echo '</div>'; echo '</div>';
} }

View File

@ -52,6 +52,11 @@ class SurveyBreak
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/'; $this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
// Pri glasovanju tega ne pustimo
if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
die();
}
#inicializiramo class za datoteke #inicializiramo class za datoteke
$this->SDF = SurveyDataFile::get_instance(); $this->SDF = SurveyDataFile::get_instance();

View File

@ -106,6 +106,11 @@ class SurveyCrosstabs {
SurveyInfo :: getInstance()->SurveyInit($this->sid); SurveyInfo :: getInstance()->SurveyInit($this->sid);
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
// Pri glasovanju tega ne pustimo
if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
die();
}
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/'; $this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
# Inicializiramo in polovimo nastavitve missing profila # Inicializiramo in polovimo nastavitve missing profila

View File

@ -43,6 +43,11 @@ class SurveyMeans{
SurveyInfo :: getInstance()->SurveyInit($this->sid); SurveyInfo :: getInstance()->SurveyInit($this->sid);
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
// Pri glasovanju tega ne pustimo
if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
die();
}
# Inicializiramo in polovimo nastavitve missing profila # Inicializiramo in polovimo nastavitve missing profila
SurveyStatusProfiles::Init($this->sid); SurveyStatusProfiles::Init($this->sid);
SurveyUserSetting::getInstance()->Init($this->sid, $global_user_id); SurveyUserSetting::getInstance()->Init($this->sid, $global_user_id);

View File

@ -75,6 +75,11 @@ class SurveyMultiCrosstabs {
# polovimo vrsto tabel (aktivne / neaktivne) # polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->ank_id); SurveyInfo :: getInstance()->SurveyInit($this->ank_id);
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
// Pri glasovanju tega ne pustimo
if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
die();
}
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/'; $this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';

View File

@ -33,11 +33,17 @@ class SurveyTTest
function __construct($sid) { function __construct($sid) {
if ((int)$sid > 0) { if ((int)$sid > 0) {
$this->sid = $sid; $this->sid = $sid;
# polovimo vrsto tabel (aktivne / neaktivne) # polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->sid); SurveyInfo :: getInstance()->SurveyInit($this->sid);
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
// Pri glasovanju tega ne pustimo
if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
die();
}
# Inicializiramo in polovimo nastavitve missing profila # Inicializiramo in polovimo nastavitve missing profila
SurveyStatusProfiles::Init($this->sid); SurveyStatusProfiles::Init($this->sid);