Compare commits

...

3 Commits

Author SHA1 Message Date
MAY
747a6834c9 Merge, dopolnjen opis 2023-02-14 10:10:13 +01:00
MAY
85a896fecb Merge branch '2KA_dev' of https://gitlab1.akson.si/mayd/2ka into 2KA_dev
Združene spremembe.
2023-02-14 10:09:00 +01:00
MAY
0ff2e2f614 Popravki:
- checkcontroller: popravljen IF za prikaz elementov
- radiocheckboxselectcontroller: izgled kode
- MultiGridcontroller: popravljen bug, ko je bilo ob nevsebinskem
  odgovoru (ne vem, ne želim povedati) disablano odgovarjanje na ostale
	opcije (ni se dalo enablati)
2023-02-14 10:06:23 +01:00
4 changed files with 28 additions and 14 deletions

View File

@ -1,5 +1,9 @@
# SPREMEMBE, DOPOLNITVE
## Bugi
- odprabljen bug, ko je odgovor na "missing" blokiral spremembo nazaj na vsebinski odgovor
## Nujne security zadeve
- vklopil TLS v vseh CURLih
- vklopil TLS pri pošiljanju emailov

View File

@ -196,14 +196,22 @@ class CheckController extends Controller
$sql3b = sisplet_query("SELECT * FROM srv_condition_vre WHERE cond_id='$condition' AND vre_id='-1'");
$sql4b = sisplet_query("SELECT * FROM srv_data_vrednost" . get('db_table') . " WHERE spr_id='$row[spr_id]' AND usr_id='" . get('usr_id') . "'");
if ($row['operator'] == 0 && mysqli_num_rows($sql3) == 0 && mysqli_num_rows($sql3b) == 0)
if ($row['operator'] == 0 && mysqli_num_rows($sql3) == 0 && mysqli_num_rows($sql3b) == 0)
{
return false;
elseif ($row['operator'] == 0 && mysqli_num_rows($sql3) == 0 && mysqli_num_rows($sql3b) > 0 && mysqli_num_rows($sql4b) > 0)
}
elseif ($row['operator'] == 0 && mysqli_num_rows($sql3) == 0 && mysqli_num_rows($sql3b) > 0 && mysqli_num_rows($sql4b) > 0)
{
return false;
}
elseif ($row['operator'] == 1 && mysqli_num_rows($sql3) > 0)
{
return false;
}
elseif ($row['operator'] == 1 && mysqli_num_rows($sql3b) > 0 && mysqli_num_rows($sql4b) == 0)
{
return false;
}
// multigrid
} elseif ($row2['tip'] == 6 || $row2['tip'] == 16) {
@ -683,9 +691,11 @@ class CheckController extends Controller
*/
public function check_captcha()
{
// s tem preverimo, ali gre za F2F terminal
global $data_export_ajax_access;
// Ce urejamo podatke v admin vmesniku ne preverjamo nicesar
if(isset($_GET['t']) && $_GET['t'] == 'postprocess' || get('grupa') == '0' || get('grupa') == ''){
if(isset($_GET['t']) && $_GET['t'] == 'postprocess' || get('grupa') == '0' || get('grupa') == '' || count($data_export_ajax_access) == 0){
return;
}

View File

@ -348,10 +348,10 @@ class MultigridController extends Controller
$tabelaSmeski ='';
}
echo '<td class="category '.$tabelaSmeski. $_checked.' ' . $cssAlign . '">';
# ni missing vrednost
echo '<td class="category '.$tabelaSmeski. $_checked.' ' . $cssAlign . '">';
# ni missing vrednost
echo '<label for="vrednost_' . $row1['id'] . '_grid_' . $value . '">';
echo '<input type="radio" ' . (!$hideName ? ' name="vrednost_' . $row1['id'] . '"' : '') . ' id="vrednost_' . $row1['id'] . '_grid_' . $value . '" value="' . $value . '"' . $_checked . ($is_missing ? ' disabled' : '') . ' data-calculation="' . $srv_grids[$i]['variable'] . '" vre_id = '.$row1['id'].' onclick="checkChecked(this); checkBranching(); setCheckedClass(this, null, ' . $row1['id'] . '); customRadioTableSelect(' . $row1['id'] . ', ' . $value. ');">';
echo '<input type="radio" ' . (!$hideName ? ' name="vrednost_' . $row1['id'] . '"' : '') . ' id="vrednost_' . $row1['id'] . '_grid_' . $value . '" value="' . $value . '"' . $_checked . ' data-calculation="' . $srv_grids[$i]['variable'] . '" vre_id = '.$row1['id'].' onclick="checkChecked(this); checkBranching(); setCheckedClass(this, null, ' . $row1['id'] . '); customRadioTableSelect(' . $row1['id'] . ', ' . $value. ');">';
if($row['enota'] == 11){
echo '<span class="enka-vizualna-skala siv-'.$row['grids'].$value.'"></span>';

View File

@ -193,7 +193,7 @@ class RadioCheckboxSelectController extends Controller
$spremenljivkaParams = new enkaParameters($row['params']);
$stolpci = ($spremenljivkaParams->get('stolpci') ? $spremenljivkaParams->get('stolpci') : 1);
$checkbox_limit = ($spremenljivkaParams->get('checkbox_limit') ? $spremenljivkaParams->get('checkbox_limit') : 0);
$checkbox_min_limit = ($spremenljivkaParams->get('checkbox_min_limit') ? $spremenljivkaParams->get('checkbox_min_limit') : 0);
$checkbox_min_limit = ($spremenljivkaParams->get('checkbox_min_limit') ? $spremenljivkaParams->get('checkbox_min_limit') : 0);
// Ali skrivamo radio gumbe in checkboxe
$hideRadio = ($spremenljivkaParams->get('hideRadio') == 1) ? ' hideRadio' : '';
@ -355,12 +355,12 @@ class RadioCheckboxSelectController extends Controller
if ($row['orientation'] != 6 && $row['orientation'] != 7) {
echo '<div class="variabla' . (($row1['hidden'] == 2) ? ' answer-disabled ' : '') . $oblika['cssFloat'] . ' ' . ($missing == 1 ? 'missing' : '') . ' ' . $_checked . ' ' . $hideRadio . '" id="vrednost_if_' . $row1['id'] . '"' . ($row1['if_id'] > 0 ? ' style="display:none"' : '') . ($hide_missing ? ' style="display:none"' : '') . '>';
if($row['tip'] == 2){
echo '<label for="' . $_id . '"><input type="checkbox" name="vrednost_' . $spremenljivka . '[]" id="' . $_id . '" value="' . $row1['id'] . '"' . $_checked . ($_disabled ? ' disabled' : '') . ' data-calculation="' . ($missing == 1 ? '0' : '1') . '" onclick="checkBranching(); ' . ($checkbox_limit > 0 ? 'checkboxLimit(\'' . $spremenljivka . '\', \'' . $row1['id'] . '\', \'' . $checkbox_limit . '\');' : '') . ' ' . ($missing == 1 ? ' checkMissing(this);' : '') . ' setCheckedClass(this, \'2\');"> ';
}
elseif($row['tip'] == 27){ //ce je heatmap, kjer je v uporabi checkbox za belezenje klikov na obmocja, je potrebno spremeniti "name"
echo '<label for="' . $_id . '"><input type="checkbox" name="vrednostHeatmap_' . $spremenljivka . '[]" id="' . $_id . '" value="' . $row1['id'] . '"' . $_checked . ($_disabled ? ' disabled' : '') . ' data-calculation="' . ($missing == 1 ? '0' : '1') . '" onclick="checkBranching(); ' . ($checkbox_limit > 0 ? 'checkboxLimit(\'' . $spremenljivka . '\', \'' . $row1['id'] . '\', \'' . $checkbox_limit . '\');' : '') . ' ' . ($missing == 1 ? ' checkMissing(this);' : '') . ' setCheckedClass(this, \'2\');"> ';
}
if($row['tip'] == 2){
echo '<label for="' . $_id . '"><input type="checkbox" name="vrednost_' . $spremenljivka . '[]" id="' . $_id . '" value="' . $row1['id'] . '"' . $_checked . ($_disabled ? ' disabled' : '') . ' data-calculation="' . ($missing == 1 ? '0' : '1') . '" onclick="checkBranching(); ' . ($checkbox_limit > 0 ? 'checkboxLimit(\'' . $spremenljivka . '\', \'' . $row1['id'] . '\', \'' . $checkbox_limit . '\');' : '') . ' ' . ($missing == 1 ? ' checkMissing(this);' : '') . ' setCheckedClass(this, \'2\');"> ';
}
elseif($row['tip'] == 27){ //ce je heatmap, kjer je v uporabi checkbox za belezenje klikov na obmocja, je potrebno spremeniti "name"
echo '<label for="' . $_id . '"><input type="checkbox" name="vrednostHeatmap_' . $spremenljivka . '[]" id="' . $_id . '" value="' . $row1['id'] . '"' . $_checked . ($_disabled ? ' disabled' : '') . ' data-calculation="' . ($missing == 1 ? '0' : '1') . '" onclick="checkBranching(); ' . ($checkbox_limit > 0 ? 'checkboxLimit(\'' . $spremenljivka . '\', \'' . $row1['id'] . '\', \'' . $checkbox_limit . '\');' : '') . ' ' . ($missing == 1 ? ' checkMissing(this);' : '') . ' setCheckedClass(this, \'2\');"> ';
}
// Font awesom checkbox custom