summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/class.SurveyParaAnalysis.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/class.SurveyParaAnalysis.php')
-rw-r--r--admin/survey/classes/class.SurveyParaAnalysis.php496
1 files changed, 209 insertions, 287 deletions
diff --git a/admin/survey/classes/class.SurveyParaAnalysis.php b/admin/survey/classes/class.SurveyParaAnalysis.php
index f5813cf..6af23c5 100644
--- a/admin/survey/classes/class.SurveyParaAnalysis.php
+++ b/admin/survey/classes/class.SurveyParaAnalysis.php
@@ -47,19 +47,19 @@ class SurveyParaAnalysis{
private $spr_type;
- function __construct($anketa)
- {
- if ((int)$anketa > 0)
- {
+ function __construct($anketa){
+ global $global_user_id;
+
+ if ((int)$anketa > 0){
+
$this->anketa = $anketa;
SurveyAnalysisHelper::getInstance()->Init($this->anketa);
# polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
Common::deletePreviewData($this->anketa);
@@ -311,100 +311,108 @@ class SurveyParaAnalysis{
}
echo '<div id="dataSettingsCheckboxes" class="paraAnalysisGraph" '.($showSettings ? '' : ' style="display:none;"').'>';
- echo '<div id="toggleDataCheckboxes2" onClick="toggleDataCheckboxes(\'paraAnalysisGraph\');"><span class="faicon close icon-orange" style="padding-bottom:2px;"></span> '.$lang['srv_para_close_settings'].'</div>';
-
- echo '<table id="para_settings"><tr><th>Spremenljivke</th><th rowspan="2" class="anl_bl spacer"></th><th>Prekinitve</th><th rowspan="2" class="anl_bl spacer"></th><th>Podrobno</th></tr>';
- echo '<tr><td>';
- # spremenljivke
- echo '<div class="floatLeft">';
- echo '<label>';
+
+ echo '<div class="wrap1360 page_'.$_GET['a'].' subpage_'.$_GET['m'].'">';
+
+ //Spremenljivke
+ echo '<div class="section" id="one">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_para_label_variables'].'</span>';
+
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_question_basic" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_question_basic == true ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_para_show_question_basic'];
- echo '</label>';
- echo '<br/>';
- echo '<label>';
+ echo '<label for="show_question_basic">'.$lang['srv_para_show_question_basic'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_graph_basic" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_graph_basic == true ? ' checked="checked"' : '').' autocomplete="off" >';
- echo $lang['srv_para_show_show_graph_basic'];
- echo '</label>';
+ echo '<label for="show_graph_basic">'.$lang['srv_para_show_show_graph_basic'].'</label>';
+ echo '</div>';
echo '</div>';
- # end:spremenljivke
- echo '</td><td>';
- # prekinitve
- echo '<div class="floatLeft">';
- echo '<label>';
+
+ echo '</div>';
+
+ //Prekinitve
+ echo '<div class="section" id="two">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_para_label_breaks'].'</span>';
+
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_question_breaks" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_question_breaks == true ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_para_show_question_breaks'];
- echo '</label>';
- echo '<br/>';
- echo '<label>';
+ echo '<label for="show_question_breaks">'.$lang['srv_para_show_question_breaks'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_graph_breaks" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_graph_breaks == true ? ' checked="checked"' : '').' autocomplete="off" >';
- echo $lang['srv_para_show_show_graph_breaks'];
- echo '</label>';
- echo '<br/>';
- echo '<label>'.$lang['srv_para_graph_type'].':';
+ echo '<label for="show_graph_breaks">'.$lang['srv_para_show_show_graph_breaks'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+ /*echo '<label>'.$lang['srv_para_graph_type'].':';
echo '<select id="show_graph_breaks_type" onchange="changeParaAnalysisSelect(this);" autocomplete="off">';
echo '<option value="0"'.((int)$this->show_graph_breaks_type == 0 ? ' selected="selected"' : '').'>'.$lang['srv_para_graph_type0'].'</option>';
echo '<option value="1"'.((int)$this->show_graph_breaks_type == 1 ? ' selected="selected"' : '').'>'.$lang['srv_para_graph_type1'].'</option>';
echo '<option value="2"'.((int)$this->show_graph_breaks_type == 2 ? ' selected="selected"' : '').'>'.$lang['srv_para_graph_type2'].'</option>';
echo '</select>';
- echo '</label>';
+ echo '</label>';*/
+
echo '</div>';
-
- # end: prekinitve
- echo '</td><td>';
- # podrobno
- echo '<div class="floatLeft">';
- echo '<label>';
+
+ // Podrobno
+ echo '<div class="section" id="three">';
+ echo '<span class="setting_title">'.$lang['srv_para_label_details'].'</span>';
+
+ echo '<div class="subsection">';
+
+ echo '<div class="setting_holder">';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_with_zero" onclick="changeParaAnalysisCbx(this,true);" '.($this->show_with_zero == false ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_para_only_valid'];
- echo '</label>';
- echo '<br/>';
- echo '<label>';
+ echo '<label for="show_with_zero">'.$lang['srv_para_only_valid'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_with_other" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_with_other == true ? ' checked="checked"' : '').' autocomplete="off" >';
- echo $lang['srv_para_show_rows_other'];
- echo '</label>';
+ echo '<label for="show_with_other">'.$lang['srv_para_show_rows_other'].'</label>';
+ echo '</div>';
echo '</div>';
- echo '<div class="floatLeft spaceLeftBig anl_bl">';
- echo '<label>';
+
+ echo '<div class="setting_holder">';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_categories" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_categories == true ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_analiza_kategorialneSpremenljivke'];
- echo '</label>';
- echo '<br/>';
- echo '<label>';
+ echo '<label for="show_categories">'.$lang['srv_analiza_kategorialneSpremenljivke'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_numbers" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_numbers == true ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_analiza_numericneSpremenljivke'];
- echo '</label>';
- echo '<br/>';
- echo '<label>';
+ echo '<label for="show_numbers">'.$lang['srv_analiza_numericneSpremenljivke'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_text" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_text == true ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_analiza_textovneSpremenljivke'];
- echo '</label>';
+ echo '<label for="show_text">'.$lang['srv_analiza_textovneSpremenljivke'].'</label>';
echo '</div>';
-
- echo '<div class="floatLeft spaceLeftBig">';
- echo '<label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_question_advanced" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_question_advanced == true ? ' checked="checked"' : '').' autocomplete="off">';
- echo $lang['srv_para_show_question_advanced'];
- echo '</label>';
- echo '<br/>';
- echo '<label>';
+ echo '<label for="show_question_advanced">'.$lang['srv_para_show_question_advanced'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="show_graph_advanced" onclick="changeParaAnalysisCbx(this,false);" '.($this->show_graph_advanced == true ? ' checked="checked"' : '').' autocomplete="off" >';
- echo $lang['srv_para_show_show_graph_advanced'];
- echo '</label>';
+ echo '<label for="show_graph_advanced">'.$lang['srv_para_show_show_graph_advanced'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</div>';
+
echo '</div>';
-
- # end:podrobno
- echo '</td></tr></table>';
-
- if ($paraType == 'basic') {
- }
- if ($paraType == 'advanced') {
- }
-
- echo '<div class="clr"></div>';
-
echo '</div>'; // konec diva zapiranje nastavitev
-
+
+ if ($showSettings) {
+ echo '<script type="text/javascript">
+ toggle_drop_settings_margin();
+ </script>';
+ }
echo '<div id="div_para_data">';
@@ -562,66 +570,24 @@ class SurveyParaAnalysis{
$rows = $data;
$baseColspan = 6;
+
+ echo '<h2>'.$lang['srv_para_label_breaks'].'</h2>';
echo '<table id="tbl_para_analitics" class="graph'.($showGraph ? ' showGraph' : '').'">';
- echo '<tr class="persist-header">';
- echo '<th class="anl_w50 pointer" ';
- if ($sort_field == 'variable') {
- if ($sort_type == SORT_DESC) {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=v&sort_type=" . SORT_ASC . "')\"";
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=v&sort_type=" . SORT_DESC . "')\"";
- }
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=v&sort_type=" . SORT_ASC . "')\"";
- }
- echo '>';
- echo '<span class="floatLeft pointer">' . $lang['srv_para_variable'] . '</span>';
- if ($sort_field == 'variable') {
- echo '<span class="floatRight faicon '.$sort_type_sprite.'">&nbsp;</span>';
- }
- echo'</th>';
+
+ echo '<tr>';
+ echo '<th>' . $lang['srv_para_variable'] . '</th>';
if ($showQuestion) {
- echo '<th class="anl_w200" >'.$lang['srv_para_question'].'</th>';
- }
- echo '<th class="anl_w50" title="'.$lang['srv_para_breaks'].'">'.$lang['srv_para_breaks_short'].'</th>';
- if ($show_delta) {
- echo '<th class="anl_w50" title="'.$lang['srv_para_breaks_delta'].'">'.$lang['srv_para_breaks_delta_short'].'</th>';
- }
-
-/*
- * echo '<th class="anl_w70" title="'.$lang['srv_para_breaks_value'].'"';
- if ($sort_field == 'ns') {
- if ($sort_type == SORT_DESC) {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=ns&sort_type=" . SORT_ASC . "')\"";
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=ns&sort_type=" . SORT_DESC . "')\"";
- }
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=ns&sort_type=" . SORT_ASC . "')\"";
+ echo '<th>'.$lang['srv_para_question'].'</th>';
}
+ echo '<th title="'.$lang['srv_para_breaks'].'">'.$lang['srv_para_breaks_short'].'</th>';
- echo '>';
- echo '<span>' . $lang['srv_para_breaks_short']. Help :: display('srv_item_nonresponse') . '</span>';
- if ($sort_field == 'ns') {
- echo '<span class="floatRight faicon '.$sort_type_sprite.'">&nbsp;</span>';
+ if ($show_delta) {
+ echo '<th title="'.$lang['srv_para_breaks_delta'].'">'.$lang['srv_para_breaks_delta_short'].'</th>';
}
-*/
- echo '<th class="anl_w50" title="'.$lang['srv_para_breaks_value'].'">';
- echo '<span>' . $lang['srv_para_breaks_value_short']. '</span>';
- echo '</th>';
- echo '<th class="anl_w50" title="'.$lang['srv_para_breaks_value_bruto'].'">';
- echo '<span>' . $lang['srv_para_breaks_value_bruto_short'].'</span>';
- echo '</th>';
- echo '<th class="anl_w50" title="'.$lang['srv_para_breaks_value_neto'].'">';
- echo '<span>' . $lang['srv_para_breaks_value_neto_short'].'</span>';
- echo '</th>';
-# echo '<th class="anl_w70 pointer" title="'.$lang['srv_para_breaks_value_bruto'].'">';
-# echo '<span>' . $lang['srv_para_breaks_value_bruto_short']. '</span>';
-# echo '</th>';
-# echo '<th class="anl_w75 pointer" title="'.$lang['srv_para_breaks_value_neto'].'">';
-# echo '<span>' . $lang['srv_para_breaks_value_neto_short']. '</span>';
-# echo '</th>';
+ echo '<th title="'.$lang['srv_para_breaks_value'].'">' . $lang['srv_para_breaks_value_short'] . '</th>';
+ echo '<th title="'.$lang['srv_para_breaks_value_bruto'].'">' . $lang['srv_para_breaks_value_bruto_short'] . '</th>';
+ echo '<th title="'.$lang['srv_para_breaks_value_neto'].'">' . $lang['srv_para_breaks_value_neto_short'] . '</th>';
if ($showGraph) {
echo '<th class="anl_bb" title="' . $lang['srv_para_breaks_graph_title'] . '">' . $lang['srv_para_breaks_graph_title'] . '</th>';
}
@@ -631,9 +597,8 @@ class SurveyParaAnalysis{
$oldPage = reset($sprPage);
$newPage = $oldPage;
echo '<tr>';
- echo '<td colspan="' . ($baseColspan + (int)$showQuestion + (int)$showGraph). '" class=" para_page_break">
+ echo '<td colspan="' . ($baseColspan + (int)$showQuestion + (int)$showGraph). '" class="para_page_break">
<span>' . $pages[$newPage] . '</span></td>';
- //echo '<td class="empty_cell"></td>';
echo '</tr>';
}
@@ -643,37 +608,35 @@ class SurveyParaAnalysis{
if ($newPage != $oldPage) {
$oldPage = $newPage;
echo '<tr>';
- echo '<td colspan="' . ($baseColspan + (int)$showQuestion + (int)$showGraph). '" class=" para_page_break">
+ echo '<td colspan="' . ($baseColspan + (int)$showQuestion + (int)$showGraph). '" class="para_page_break">
<span>' . $pages[$newPage] . '</span></td>';
- //echo '<td class="empty_cell"></td>';
echo '</tr>';
}
}
- echo '<tr class="'.$css_sublcass.'">';
- echo '<td >';
- echo '<span class="anl_variabla">';
- echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $row['spid'] . '\'); return false;" href="#">' . $row['variable'] . '</a>';
- echo '</span>';
- echo '</td>';
+ echo '<tr>';
+ echo '<td><a onclick="showspremenljivkaSingleVarPopup(\'' . $row['spid'] . '\'); return false;" href="#">' . $row['variable'] . '</a></td>';
+
if ($showQuestion) {
echo '<td>';
echo (strlen($row['naslov']) > 40 ? substr($row['naslov'],0,40)."..." : $row['naslov']);
echo '</td>';
}
+
$val = 0;
if (isset($row['values'][-3])) {
$val = $row['values'][-3];
}
echo '<td>'.$val.'</td>';
+
if ($show_delta) {
echo '<td>'.$row['delta'].'</td>';
}
+
echo '<td>'.common::formatNumber($row['sp']*100,1).'</td>';
echo '<td>'.common::formatNumber($row['sp_bruto']*100,1).'</td>';
echo '<td>'.common::formatNumber($row['sp_neto']*100,1).'</td>';
- #echo '<td>'.common::formatNumber($value,2).'</td>';
if ($showGraph) {
$width = $row['sp'];
if ((int)$showGraphType == 1) {
@@ -682,22 +645,20 @@ class SurveyParaAnalysis{
$width = $row['sp_neto'];
}
- echo '<td class="empty_cell">';
+ echo '<td class="graph_cell">';
if ($row['sp'] > 0) {
- echo '<div class="para_analitics_bar" style="'.'width:'.($width*100).'%; text-align:right; padding-right:5px; color:green;"></div>';
+ echo '<div class="graph_full" style="'.'width:'.($width*100).'%;"></div>';
} else {
- echo '<div class="para_analitics_bar null_value" style="'.'width:1px"></div>';
+ echo '/';
}
echo '</td>';
}
echo '</tr>';
-
}
echo '</table>';
#SurveyAnalysisHelper::getInstance()->displayMissingLegend();
$this->displayLink();
- echo '<br class="clr" />';
}
@@ -801,6 +762,8 @@ class SurveyParaAnalysis{
}
}
*/
+
+ /*SORTIRANJE
$sort_type = SORT_ASC;
if (isset($_REQUEST['sort_type'])
&& ((int)$_REQUEST['sort_type'] == SORT_DESC || (int)$_REQUEST['sort_type'] == SORT_ASC)) {
@@ -840,78 +803,48 @@ class SurveyParaAnalysis{
$rows = array_reverse($rows);
}
- }
+ }*/
$this->displayFormula();
+
+ echo '<h2>'.$lang['srv_para_label_variables'].'</h2>';
echo '<table id="tbl_para_analitics" class="graph'.($showGraph ? ' showGraph' : '').'">';
- echo '<tr class="persist-header">';
- echo '<th class="pointer" ';
- if ($sort_field == 'variable') {
- if ($sort_type == SORT_DESC) {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=variable&sort_type=" . SORT_ASC . "')\"";
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=variable&sort_type=" . SORT_DESC . "')\"";
- }
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=variable&sort_type=" . SORT_ASC . "')\"";
- }
- echo '>';
- echo '<span class="floatLeft pointer">' . $lang['srv_para_variable'] . '</span>';
- if ($sort_field == 'variable') {
- echo '<span class="floatRight sprites '.$sort_type_sprite.'">&nbsp;</span>';
- }
- echo'</th>';
+
+ echo '<tr>';
+ echo '<th>' . $lang['srv_para_variable'] . '</th>';
if ($showQuestion) {
echo '<th>'.$lang['srv_para_question'].'</th>';
}
if ($show_delta) {
- echo '<th class="anl_w50" title="'.$lang[''].'">delta</th>';
- }
- echo '<th class="anl_w50 pointer" title="'.$lang['srv_para_unaswered'].'"';
- if ($sort_field == 'ns') {
- if ($sort_type == SORT_DESC) {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=ns&sort_type=" . SORT_ASC . "')\"";
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=ns&sort_type=" . SORT_DESC . "')\"";
- }
- } else {
- echo " onclick=\"window.location.assign('" . $pageUrl . "&sort=ns&sort_type=" . SORT_ASC . "')\"";
+ echo '<th title="'.$lang[''].'">delta</th>';
}
- echo '>';
- echo '<span>' . $lang['srv_para_unaswered_short'] . ' %</span>'; // . Help :: display('srv_item_nonresponse')
- if ($sort_field == 'ns') {
- echo '<span class="floatRight sprites '.$sort_type_sprite.'">&nbsp;</span>';
- }
- echo '</th>';
+ echo '<th>' . $lang['srv_para_unaswered_short'] . ' %</th>';
if ($showGraph) {
- echo '<th class="anl_bb" title="' . $lang['srv_para_unaswered_graph_title'] . '">' . $lang['srv_para_unaswered_graph_title'] . '</th>';
+ echo '<th title="' . $lang['srv_para_unaswered_graph_title'] . '">' . $lang['srv_para_unaswered_graph_title'] . '</th>';
}
echo '</tr>';
-
+
foreach ($rows AS $row) {
- echo '<tr class="'.$css_sublcass.'">';
- echo '<td >';
- echo '<span class="anl_variabla">';
+ echo '<tr>';
+ echo '<td>';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $row['spid'] . '\'); return false;" href="#">' . $row['variable'] . '</a>';
- echo '</span>';
echo '</td>';
if ($showQuestion) {
echo '<td>';
- echo (strlen($row['naslov']) > 40 ? substr($row['naslov'],0,40)."..." : $row['naslov']);
+ echo (strlen($row['naslov']) > 80 ? substr($row['naslov'],0,80)."..." : $row['naslov']);
echo '</td>';
}
if ($show_delta) {
echo '<td>'.$row['delta'].'</td>';
}
echo '<td>'.common::formatNumber($row['ns']*100,1).'</td>';
- #echo '<td>'.common::formatNumber($value,2).'</td>';
if ($showGraph) {
- echo '<td class="empty_cell">';
+ echo '<td class="graph_cell">';
if ($row['ns'] > 0) {
- echo '<div class="para_analitics_bar" style="'.'width:'.($row['ns']*100).'%; text-align:right; padding-right:5px; color:green;"></div>';
+ echo '<div class="graph_full" style="'.'width:'.($row['ns']*100).'%;"></div>';
} else {
- echo '<div class="para_analitics_bar null_value" style="'.'width:1px"></div>';
+ echo '/';
}
echo '</td>';
}
@@ -922,7 +855,6 @@ class SurveyParaAnalysis{
#SurveyAnalysisHelper::getInstance()->displayMissingLegend();
$this->displayLink();
- echo '<br class="clr" />';
}
function displayGraphDataAdvanced( ) {
@@ -965,47 +897,56 @@ class SurveyParaAnalysis{
$this->displayFormula();
+
+ echo '<div id="scroll1">';
+ echo '<div id="scroll2">';
+
+ echo '<script>
+ check_para_wrap();
+ </script>';
+
+ echo '<table id="tbl_para_analitics" class="podrobno">';
-
- echo '<table id="tbl_para_analitics" class="persist-area">';
- echo '<tr class="persist-header">';
+ echo '<tr>';
// Dodatna stolpca zaradi izvoza za Katjo Lozar
if($admin_type == '0'){
- echo '<th style="width:30px;">ID VPRASANJA</th>';
- echo '<th style="width:30px;">ID VARIABLE</th>';
+ echo '<th class="center">ID VPRAĊ ANJA</th>';
+ echo '<th class="center">ID VARIABLE</th>';
}
- echo '<th>'.$lang['srv_para_variable'].'</th>';
+ echo '<th class="left">'.$lang['srv_para_variable'].'</th>';
if ($showQuestion) {
- echo '<th>'.$lang['srv_para_question'].'</th>';
+ echo '<th class="left">'.$lang['srv_para_question'].'</th>';
}
- echo '<th >'.$lang['srv_para_valid'].'</th>';
+ //echo '<th >'.$lang['srv_para_valid'].'</th>';
foreach ($this->_missings AS $value => $text) {
$cnt_miss++;
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_mv_'.$text]."\" >{$value}<br/>(".$lang['srv_mv_'.$text].")</th>";
+ echo "<th class=\"left\" title=\"".$lang['srv_mv_'.$text]."\" >{$value}<br>(".$lang['srv_mv_'.$text].")</th>";
}
foreach ($this->_unsets AS $value => $text)
{
$cnt_undefined++;
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_mv_'.$text]."\">{$value}<br/>(".$lang['srv_mv_'.$text].")</th>";
+ echo "<th class=\"left\" title=\"".$lang['srv_mv_'.$text]."\">{$value} (".$lang['srv_mv_'.$text].")</th>";
}
if ($show_delta) {
- echo "<th class=\"anl_w50\" title=\"".$lang['']."delta\">".$lang['']."&Delta;</th>";
+ echo "<th title=\"".$lang['']."delta\">".$lang['']."&Delta;</th>";
}
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_para_nonconceptual']."\">".$lang['srv_para_nonconceptual']."</th>";
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_para_approp']."\">".$lang['srv_para_approp']."</th>";
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_para_all_units']."\">".$lang['srv_para_all_units']."</th>";
+ echo "<th title=\"".$lang['srv_para_nonconceptual']."\">".$lang['srv_para_nonconceptual']."</th>";
+ echo "<th title=\"".$lang['srv_para_approp']."\">".$lang['srv_para_approp']."</th>";
+ echo "<th title=\"".$lang['srv_para_all_units']."\">".$lang['srv_para_all_units']."</th>";
if ($isNotStandardProfile)
{
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_para_status']."\">".$lang['srv_para_status']."</th>";
+ echo "<th title=\"".$lang['srv_para_status']."\">".$lang['srv_para_status']."</th>";
}
- echo "<th class=\"anl_w50\" title=\"".$lang['srv_para_unaswered']."\">".$lang['srv_para_unaswered_short']. Help :: display('srv_item_nonresponse')."</th>";
+ echo "<th title=\"".$lang['srv_para_unaswered']."\">".$lang['srv_para_unaswered_short']. Help :: display('srv_item_nonresponse')."</th>";
if ($showGraph) {
- echo '<th class="anl_bb">' . $lang['srv_para_unaswered_graph_title'] . '</th>';
+ echo '<th class="left">' . $lang['srv_para_unaswered_graph_title_br'] . '</th>';
}
echo '</tr>';
+
+
foreach ($headerVariablesId AS $key => $headerVariableId)
{
$spr = $this->_HEADERS[$headerVariableId];
@@ -1024,29 +965,24 @@ class SurveyParaAnalysis{
echo '<tr class="multiGroupHeader">';
if($admin_type == '0'){
- echo '<td>'.$spr['spr_id'].'</td>';
- echo '<td></td>';
+ echo '<td class="center">'.$spr['spr_id'].'</td>';
+ echo '<td class="center"></td>';
}
+
+ $count_missing = count($this->_missings);
if ($showQuestion) {
- echo '<td class="showQuestion">';
- echo '<span class="anl_variabla">';
+ echo '<td class="left semi-bold">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $spr['variable'] . '</a>';
- echo '</span>';
echo '</td>';
- echo '<td colspan="'.(count($this->_missings)+count($this->_unsets)+$added_colspan).'">';
+ echo '<td class="left semi-bold" colspan="'.($count_missing+count($this->_unsets)+$added_colspan).'">';
echo $spr['naslov'];
echo '</td>';
} else {
- echo '<td colspan="'.(count($this->_missings)+count($this->_unsets)+$added_colspan).'">';
- echo '<span class="anl_variabla">';
+ echo '<td class="left semi-bold" colspan="'.($count_missing+count($this->_unsets)+$added_colspan).'">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $spr['variable'] . '</a>';
- echo '</span>';
echo '</td>';
}
- if ($showGraph) {
- echo '<td class="empty_cell30"></td>';
- }
echo '</tr>';
}
else {
@@ -1068,72 +1004,56 @@ class SurveyParaAnalysis{
echo '<tr class="multiGroupHeader">';
if($admin_type == '0'){
- echo '<td>'.$spr['spr_id'].'</td>';
- echo '<td></td>';
+ echo '<td class="center">'.$spr['spr_id'].'</td>';
+ echo '<td class="center"></td>';
}
if ($showQuestion) {
- echo '<td class="showQuestion">';
- echo '<span class="anl_variabla">';
+ echo '<td class="left semi-bold">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $spr['variable'] . '</a>';
- echo '</span>';
echo '</td>';
- echo '<td colspan="'.(count($this->_missings)+count($this->_unsets)+$added_colspan ).'">';
+ echo '<td class="left semi-bold" colspan="'.($count_missing+count($this->_unsets)+$added_colspan+4).'">';
echo $spr['naslov'];
echo '</td>';
} else {
- echo '<td colspan="'.(count($this->_missings)+count($this->_unsets)+$added_colspan ).'">';
- echo '<span class="anl_variabla">';
+ echo '<td class="left semi-bold" colspan="'.($count_missing+count($this->_unsets)+$added_colspan+3).'">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $spr['variable'] . '</a>';
- echo '</span>';
echo '</td>';
}
- if ($showGraph) {
- echo '<td class="empty_cell30"></td>';
- }
echo '</tr>';
}
else
{ #dodamo header za grupo
+
+
echo '<tr class="multiVariablesHeader">';
if($admin_type == '0'){
- echo '<td>'.$spr['spr_id'].'</td>';
- echo '<td></td>';
+ echo '<td class="center">'.$spr['spr_id'].'</td>';
+ echo '<td class="center"></td>';
}
if ($showQuestion) {
- echo '<td class="showQuestion">';
+ echo '<td class="left semi-bold">';
if (count($grids) > 1) {
- echo '<span class="anl_variabla">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $grid['variable'] . '</a>';
- echo '</span>';
} else {
- echo '<span class="anl_variabla">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $spr['variable'] . '</a>';
- echo '</span>';
}
echo '</td>';
- echo '<td colspan="'.(count($this->_missings)+count($this->_unsets)+$added_colspan).'">';
- echo $grid['naslov'];
+ echo '<td class="left semi-bold" colspan="'.($count_missing+count($this->_unsets)+$added_colspan+4).'">';
+ echo (strlen($grid['naslov']) > 30 ? substr($grid['naslov'],0,30)."..." : $grid['naslov']);
echo '</td>';
} else {
- echo '<td colspan="'.(count($this->_missings)+count($this->_unsets)+$added_colspan).'">';
+ echo '<td class="left semi-bold" colspan="'.($count_missing+count($this->_unsets)+$added_colspan+3).'">';
if (count($grids) > 1) {
- echo '<span class="anl_variabla">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $grid['variable'] . '</a>';
- echo '</span>';
} else {
- echo '<span class="anl_variabla">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $spr['variable'] . '</a>';
- echo '</span>';
}
echo '</td>';
}
- if ($showGraph) {
- echo '<td class="empty_cell30"></td>';
- }
echo '</tr>';
}
}
@@ -1169,28 +1089,26 @@ class SurveyParaAnalysis{
}
$delta = $data_seq['delta'];
*/
- echo '<tr class="'.$css_sublcass.'">';
+ echo '<tr>';
if($admin_type == '0'){
- echo '<td rowspan="'.($showPercent*2).'">'.$spr['spr_id'].'</td>';
- echo '<td rowspan="'.($showPercent*2).'">'.$variable['vr_id'].'</td>';
+ echo '<td class="center" rowspan="'.($showPercent*2).'">'.$spr['spr_id'].'</td>';
+ echo '<td class="center" rowspan="'.($showPercent*2).'">'.$variable['vr_id'].'</td>';
}
//echo '<td style="border-top:0px none !important;border-bottom:0px none !important;">&nbsp;</td>';
- echo '<td rowspan="'.($showPercent*2).'">';
- echo '<span class="anl_variabla">';
+ echo '<td class="left" rowspan="'.($showPercent*2).'">';
echo '<a onclick="showspremenljivkaSingleVarPopup(\'' . $key . '\'); return false;" href="#">' . $variable['variable'] . '</a>';
- echo '</span>';
echo '</td>';
if ($showQuestion) {
- echo '<td class="showQuestion" rowspan="'.($showPercent*2).'">';
- echo $variable['naslov'];
+ echo '<td class="left" rowspan="'.($showPercent*2).'">';
+ echo (strlen($variable['naslov']) > 30 ? substr($variable['naslov'],0,30)."..." : $variable['naslov']);
echo '</td>';
}
- echo '<td>';
+ /*echo '<td>';
echo (int)$data_seq['veljavni'];
- echo '</td>';
+ echo '</td>';*/
foreach ($this->_missings AS $value => $text) {
$missing = 0;
if (isset($data_seq['values'][$value])) {
@@ -1217,11 +1135,11 @@ class SurveyParaAnalysis{
}
echo "<td rowspan=\"".($showPercent*2)."\">" . common::formatNumber($data_seq['ns'],2) . "</td>";
if ($showGraph) {
- echo "<td rowspan=\"".($showPercent*2)."\" class=\"empty_cell30\">";
+ echo "<td rowspan=\"".($showPercent*2)."\" class=\"graph_cell left\">";
if ($data_seq['ns'] > 0) {
- echo '<div class="para_analitics_bar" style="'.'width:'.($data_seq['ns']*100).'%; text-align:right; padding-right:5px; color:green;"></div>';
+ echo '<div class="graph_full" style="'.'width:'.($data_seq['ns']*100).'%;"></div>';
} else {
- echo '<div class="para_analitics_bar null_value" style="'.'width:1px"></div>';
+ echo '/';
}
echo '</td>';
}
@@ -1230,19 +1148,19 @@ class SurveyParaAnalysis{
if ($showPercent)
{
echo '<tr class="'.$css_sublcass.' percent">';
- echo '<td>';
+ /*echo '<td>';
$val = 0;
if ($percent_all > 0) {
$val = $data[$seq]['veljavni'] / $percent_all * 100;
}
echo common::formatNumber($val,0,null,'%') ;
- echo '</td>';
+ echo '</td>';*/
foreach ($this->_missings AS $value => $text) {
$val = 0;
if ($percent_all > 0 && isset($data[$seq]['values'][$value])) {
$val = ($data[$seq]['values'][$value] / $percent_all * 100);
}
- echo '<td>'.common::formatNumber($val,0,null,'%').'</td>';
+ echo '<td class="dashed">'.common::formatNumber($val,0,null,'%').'</td>';
}
foreach ($this->_unsets AS $value => $text)
{
@@ -1250,7 +1168,7 @@ class SurveyParaAnalysis{
if ($percent_all > 0 && isset($data[$seq]['values'][$value])) {
$val = ($data[$seq]['values'][$value] / $percent_all * 100);
}
- echo '<td>'.common::formatNumber($val,0,null,'%').'</td>';
+ echo '<td class="dashed">'.common::formatNumber($val,0,null,'%').'</td>';
}
echo '</tr>';
}
@@ -1260,14 +1178,14 @@ class SurveyParaAnalysis{
}
}
echo '</table>';
+ echo '</div>';
+ echo '</div>';
SurveyAnalysisHelper::getInstance()->displayMissingLegend();
-
- echo '<br class="clr" />';
-
}
- function getVariables()
- {
+ function getVariables() {
+
+ $dvp = SurveyUserSetting :: getInstance()->getSettings('default_variable_profile');
$_currentVariableProfile = SurveyVariablesProfiles :: checkDefaultProfile($dvp);
$tmp_svp_pv = SurveyVariablesProfiles :: getProfileVariables($this->_PROFILE_ID_VARIABLE );
@@ -1397,10 +1315,18 @@ class SurveyParaAnalysis{
$vseEnote += $cnt;
if (is_numeric($key) && (isset($this->_missings[(int)$key]) || isset($this->_unsets[(int)$key]))) {
+
// shranimo vrednosti -1 ... -99 za prikaz v tabeli podrobno
- $values[(int)$key] += $cnt;
+ if(isset($values[(int)$key]))
+ $values[(int)$key] += $cnt;
+ else
+ $values[(int)$key] = $cnt;
+
+ if(isset($this->cols_with_value[(int)$key]))
+ $this->cols_with_value[(int)$key] += $cnt;
+ else
+ $this->cols_with_value[(int)$key] = $cnt;
- $this->cols_with_value[(int)$key] += $cnt;
if (isset($this->_unsets[$key])) {
$nevsebinski += $cnt;
@@ -1423,7 +1349,11 @@ class SurveyParaAnalysis{
} else {
- $this->cols_with_value['valid'] += $cnt;
+ if(isset($this->cols_with_value['valid']))
+ $this->cols_with_value['valid'] += $cnt;
+ else
+ $this->cols_with_value['valid'] = $cnt;
+
$veljavni += $cnt;
}
}
@@ -1466,14 +1396,6 @@ class SurveyParaAnalysis{
$_variable = $variable['variable'];
$_naslov = $variable['naslov'];
- if (count($variables) > 1 && in_array($tip, array(2,18,17))) {
- $_variable = $spr['variable'];
- $_naslov = $spr['naslov'];
- }
- if ($tip == 16 ) {
- $_variable = $grid['variable'];
- $_naslov = $grid['naslov'];
- }
$result[$seq]['spid'] = $headerVariableId;
$result[$seq]['sid'] = $spr['spr_id'];