[Redizajn 1KA] - Testiranje --> Trajanje --> Dejanski časi - v1

This commit is contained in:
tejagerjovic 2022-03-09 18:36:32 +01:00
parent b1fff94e45
commit 21e2436a4c
5 changed files with 105 additions and 55 deletions

View File

@ -6031,9 +6031,9 @@ class SurveyAdminSettings {
echo '<td class="graph_cell">';
echo '<div class="graph_cell">';
echo '<div class="graph_full" style="width: '.($time[0]/$max*85).'%">&nbsp;</div>';
echo '<div class="graph_full" style="width: '.($time[0]/$max*85).'%"></div>';
if ((($time[1]-$time[0])/$max*85) > 0)
echo ' <div class="graph_empty" style="width: '.(($time[1]-$time[0])/$max*85).'%">&nbsp;</div>';
echo ' <div class="graph_empty" style="width: '.(($time[1]-$time[0])/$max*85).'%"></div>';
echo '</div>';
echo '</td>';
@ -6096,9 +6096,9 @@ class SurveyAdminSettings {
echo '<td class="graph_cell">';
echo '<div class="graph_cell">';
echo '<div class="graph_full" style="width: '.($neto/$max*85).'%">&nbsp;</div>';
echo '<div class="graph_full" style="width: '.($neto/$max*85).'%"></div>';
if (($bruto-$neto)/$max*85 > 0)
echo ' <div class="graph_empty" style="width: '.(($bruto-$neto)/$max*85).'%">&nbsp;</div>';
echo ' <div class="graph_empty" style="width: '.(($bruto-$neto)/$max*85).'%"></div>';
echo '</div>';
echo '</td>';
@ -6144,9 +6144,9 @@ class SurveyAdminSettings {
echo '<td class="graph_cell">';
echo '<div class="graph_cell">';
echo ' <div class="graph_full" style="width: '.($time[0]/$maxb*85).'%">&nbsp;</div>';
echo ' <div class="graph_full" style="width: '.($time[0]/$maxb*85).'%"></div>';
if ((($time[1]-$time[0])/$maxb*85) > 0)
echo ' <div class="graph_empty" style="width: '.(($time[1]-$time[0])/$maxb*85).'%">&nbsp;</div>';
echo ' <div class="graph_empty" style="width: '.(($time[1]-$time[0])/$maxb*85).'%"></div>';
echo '</div>';
echo '</td>';
@ -6213,9 +6213,9 @@ class SurveyAdminSettings {
echo '<td class="graph_cell">';
echo '<div class="graph_cell">';
echo '<div class="graph_full" style="width: '.($neto/$max*85).'%">&nbsp;</div>';
echo '<div class="graph_full" style="width: '.($neto/$max*85).'%"></div>';
if (($bruto-$neto)/$max*85 > 0)
echo ' <div class="graph_empty" style="width: '.(($bruto-$neto)/$max*85).'%">&nbsp;</div>';
echo ' <div class="graph_empty" style="width: '.(($bruto-$neto)/$max*85).'%"></div>';
echo '</div>';
echo '</td>';
@ -6721,11 +6721,28 @@ class SurveyAdminSettings {
// izpis
$skupni_cas = (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s';
$predviden_cas = (bcdiv($total_predvideni, 60, 0)>0?bcdiv($total_predvideni, 60, 0).'min ':'').''.round(bcmod($total_predvideni, 60), 0);
echo '<fieldset><legend>'.$lang['srv_total_trajanje'].'</legend>';
echo '<p class="semi-bold">'.$lang['srv_dejansko_trajanje_real'].':</p>';
echo '<p>'.$skupni_cas.'</p>';
echo '</fieldset>';
echo '<fieldset><legend>'.$lang['srv_dejanski_casi'].'</legend>';
echo '<table style="width:100%" >';
echo '<tr><td></td><td>';
echo '<input type="checkbox" name="predvideni" id="predvideni" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.($_GET['predvideni']==1?'0':'1').'&pages='.$_GET['pages'].'&prikazi01='.$_GET['prikazi01'].'\');" '.($_GET['predvideni']==1?'checked':'').' /><label for="predvideni">'.$lang['srv_vkljuci_predvidene'].'</label>';
echo '</td><td nowrap>'.$lang['srv_stevilo_enot'].'</td></tr>';
echo '<p class="bottom16"><input type="checkbox" name="predvideni" id="predvideni" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.($_GET['predvideni']==1?'0':'1').'&pages='.$_GET['pages'].'&prikazi01='.$_GET['prikazi01'].'\');" '.($_GET['predvideni']==1?'checked':'').' /><label for="predvideni">'.$lang['srv_vkljuci_predvidene'].'</label></p>';
echo '<table>';
echo '<tr>';
echo '<th>'.$lang['srv_casi_po_straneh_stran'].'</th>';
echo '<th colspan="2">'.$lang['srv_neto_v_cas'];
if ($_GET['predvideni'] == 1) {
echo ' / '.$lang['srv_testiranje_predvidenicas_1'];
}
echo '</th>';
echo '<th>'.$lang['srv_stevilo_enot'].'</th>';
echo '</tr>';
foreach ($povprecni_casi AS $vrstni_red => $time) {
@ -6735,49 +6752,58 @@ class SurveyAdminSettings {
$bruto = $povprecni_casi_bruto[$vrstni_red];
echo '<tr>';
echo '<th style="text-align:left; padding-right:20px" nowrap>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</th>';
echo '<td>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</td>';
echo '<td class="right time">'.($time<60 ? round($time,1).'s ' : round($time/60,1).'min ');
if ($_GET['predvideni'] == 1) {
if ($rezanje_preskocene == 1)
$time = $expected_time[$vrstni_red][0];
else
$time = $expected_time[$vrstni_red][1];
echo '<td style="width:100%">';
echo ' <div class="graph_db" style="text-align: right; float: left; width: '.($time/$max*85).'%">&nbsp;</div>';
//if ($bruto-$time > 0)
//echo ' <div class="graph_lb" style="text-align: right; float: left; width: '.(($bruto-$time)/$max*85).'%; border-left:0px">&nbsp;</div>';
echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.($time<60?round($time,1).'s ':round($time/60,1).'min ')./*'<span style="color:gray">/ '.($bruto<60?round($bruto,1).'s ':round($bruto/60,1).'min ').'</span>'.*/'</span>';
echo '<span class="gray"> / '.($time<60 ? round($time,1).'s ' : round($time/60,1).'min ').'</span>';
}
echo '</td>';
echo '<td style="text-align:center" nowrap>'.$count[$vrstni_red]./*' <span style="color:gray">/ '.$count_bruto[$vrstni_red].'</span>'.*/'</td>';
echo '</tr>';
echo '<td class="graph_cell">';
echo '<div class="graph_cell">';
echo '<div class="graph_full" style="width: '.($time/$max*85).'%"></div>';
if ($_GET['predvideni'] == 1) {
if ($rezanje_preskocene == 1)
$time = $expected_time[$vrstni_red][0];
else
$time = $expected_time[$vrstni_red][1];
echo '<tr>';
echo '<th style="text-align:left; padding-right: 20px; color:gray" nowrap>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</th>';
echo '<td style="width:100%">';
echo ' <div class="graph_'.($rezanje_preskocene==1?'lb':'lr').'" style="text-align: right; float: left; width: '.($time/$max*85).'%">&nbsp;</div>';
//if ((($time[1]-$time[0])/$max*85) > 0)
// echo ' <div class="graph_lb" style="border-left: 0; text-align: right; float: left; width: '.(($time[1]-$time[0])/$max*85).'%">&nbsp;</div>';
echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.($time<60?round($time,1).'s ':round($time/60,1).'min ')./*'<span style="color:gray">/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').'</span>'.*/'</span>';
echo '</td>';
echo '</tr>';
echo '<tr><td colspan="3" style="border-bottom:1px solid #E4E4F9"></td></tr>';
echo '<div class="graph_'.($rezanje_preskocene==1?'empty':'red').'" style="width: '.($time/$max*85).'%"></div>';
}
echo '</div>';
echo '</td>';
echo '<td class="right">'.$count[$vrstni_red].'</td>';
echo '</tr>';
}
if ($_GET['predvideni'] != 1)
echo '<tr><td colspan="3" style="border-bottom:1px solid #E4E4F9"></td></tr>';
echo '<tr><td></td><th style="text-align:left">'.$lang['srv_anl_suma1'].': '.(bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s';
if ($_GET['predvideni'] == 1) echo ' / '.$lang['srv_skupaj_predvideni'].': '.(bcdiv($total_predvideni, 60, 0)>0?bcdiv($total_predvideni, 60, 0).'min ':'').''.round(bcmod($total_predvideni, 60), 0).'s';
echo '</th></tr>';
echo '<tr class="semi-bold"><td>'.$lang['srv_anl_suma1'].'<td class="right time">'.$skupni_cas;
if ($_GET['predvideni'] == 1) {
if ($rezanje_preskocene == 1)
$time = $expected_time[$vrstni_red][0];
else
$time = $expected_time[$vrstni_red][1];
echo '<span class="gray"> / '.$predviden_cas.'</span>';
}
echo '</td>';
echo '</td></tr>';
echo '</table>';
if ($_GET['predvideni'] == 1) {
echo '<p><div class="graph_db" style="float: left; width: 11px">&nbsp;</div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_neto_t_cas'].'</span>';
echo '<div class="graph_'.($rezanje_preskocene==1?'lb':'lr').'" style="float: left; width: 11px">&nbsp;</div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_testiranje_predvidenicas'].'</span></p>';
}
echo '<div class="tabela_trajanje_legenda">';
echo '<div class="graph_full legend"></div><span class="legend"> '.$lang['srv_neto_t_cas'].'</span>';
if ($_GET['predvideni'] == 1)
echo '<div class="graph_empty legend"></div><span class="legend"> '.$lang['srv_testiranje_predvidenicas_1'].'</span>';
echo '</div>';
echo '</fieldset>';
@ -6790,17 +6816,21 @@ class SurveyAdminSettings {
// izpis histograma casov za vsako stran
echo '<br /><fieldset><legend>'.$lang['srv_frekvencna_porazdelitev'].'</legend>';
echo '<fieldset><legend>'.$lang['srv_frekvencna_porazdelitev'].'</legend>';
echo '<p>';
echo ' <input type="checkbox" name="pages" id="pages" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$_GET['predvideni'].'&prikazi01='.$_GET['prikazi01'].'&pages='.($_GET['pages']==1?'0':'1').'\');" '.($_GET['pages']==1?'checked':'').' /><label for="pages">'.$lang['srv_show_pages'].'</label>';
echo '</p>';
echo '<div class="setting_holder">';
echo '<div class="setting_item">';
echo '<input type="checkbox" name="pages" id="pages" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$_GET['predvideni'].'&prikazi01='.$_GET['prikazi01'].'&pages='.($_GET['pages']==1?'0':'1').'\');" '.($_GET['pages']==1?'checked':'').' /><label for="pages">'.$lang['srv_show_pages'].'</label>';
echo '</div>';
if ($rezanje_preskocene == 1) {
echo '<p>';
echo '<div class="setting_item">';
echo ' <input type="checkbox" name="prikazi01" id="prikazi01" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$_GET['predvideni'].'&pages='.$_GET['pages'].'&prikazi01='.($_GET['prikazi01']==1?'0':'1').'\');" '.($_GET['prikazi01']==1?'checked':'').' /><label for="prikazi01">'.$lang['srv_prikazi01'].'</label>';
echo '</p>';
echo '</div>';
}
echo '</div>';
// zdruzimo vse case po straneh na en graf
if ($_GET['pages'] != '1') {
$casi2 = array();
@ -6835,7 +6865,7 @@ class SurveyAdminSettings {
if ($_GET['pages'] == '1') {
$sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$key' AND ank_id='$this->anketa'");
$row = mysqli_fetch_array($sql);
echo '<h2>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</h2>';
echo '<p class="bold blue top16">'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</p>';
}
echo '<table style="width:100%; padding:0; margin: 0"><tr>';

View File

@ -4014,10 +4014,11 @@ $lang = array (
"srv_tip_standard_993" => "Upload datoteke",
"srv_tip_standard_994" => "Ime priimek",
"srv_tip_standard_996" => "Podpis",
"srv_vkljuci_predvidene" => "Prika&#382;i tudi predvidene &#269;ase",
"srv_vkljuci_preskocene" => "Prika&#382;i tudi &#269;ase za presko&#269;ene strani",
"srv_vkljuci_predvidene" => "V tabeli prikaži tudi predvidene čase",
"srv_vkljuci_preskocene" => "Prikaži tudi čase za preskočene strani",
"srv_total_trajanje" => "Celoten čas trajanja ankete",
"srv_dejansko_trajanje" => "Predvideno dejansko trajanje ankete",
"srv_dejansko_trajanje_real" => "Dejansko trajanje ankete",
"srv_casi_po_straneh" => "Časi po straneh",
"srv_casi_po_straneh_stran" => "Stran",
"srv_casi_po_blokih" => "Časi po blokih",

View File

@ -3995,10 +3995,11 @@ $lang = array (
"srv_tip_standard_993" => "File upload",
"srv_tip_standard_994" => "First Name Last name",
"srv_tip_standard_996" => "Signature",
"srv_vkljuci_predvidene" => "Show estimated time",
"srv_vkljuci_predvidene" => "Include estimated times in the table",
"srv_vkljuci_preskocene" => "Also show time for skipped pages",
"srv_total_trajanje" => "Total survey duration",
"srv_dejansko_trajanje" => "Estimated actual duration of survey",
"srv_dejansko_trajanje_real" => "Actual duration of survey",
"srv_casi_po_straneh" => "Times by pages",
"srv_casi_po_straneh_stran" => "Page",
"srv_casi_po_vprasanjih_vprasanje" => "Question",

View File

@ -10092,6 +10092,10 @@ div.subpage_predvidenicas table td.time,
div.subpage_cas table td.time {
padding-right: 0;
}
div.subpage_predvidenicas table td.predvideni,
div.subpage_cas table td.predvideni {
color: #C4C4C4;
}
div.subpage_predvidenicas div.graph_full,
div.subpage_cas div.graph_full {
background-color: #1E88E5;
@ -10103,6 +10107,11 @@ div.subpage_cas div.graph_empty {
background-color: #E5E5E5;
height: 24px;
}
div.subpage_predvidenicas div.graph_red,
div.subpage_cas div.graph_red {
background-color: #FFE3E3;
height: 24px;
}
div.subpage_predvidenicas div.tabela_trajanje_legenda,
div.subpage_cas div.tabela_trajanje_legenda {
display: flex;

View File

@ -107,6 +107,10 @@ div.subpage_cas {
td.time {
padding-right: 0;
}
td.predvideni {
color: $dark-gray;
}
}
div.graph_full {
@ -120,6 +124,11 @@ div.subpage_cas {
height: 24px;
}
div.graph_red {
background-color: $status-red;
height: 24px;
}
div.tabela_trajanje_legenda {
display: flex;
flex-direction: row;