Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
164 righe
7.2 KiB
164 righe
7.2 KiB
<? |
|
if (isset($manager) && is_a($manager,"Commissione")===true) { |
|
$object = $manager->getObject(); |
|
$tipiBuste = $object->tipologieBusta(); |
|
$checkCriteri = $object->getCriteri(); |
|
$buste = array(); |
|
$economica = false; |
|
$tecnica = false; |
|
foreach($checkCriteri AS $checkCriterio) { |
|
if ($checkCriterio["tipologia"] == "Q") { |
|
if (isset($checkCriterio["economico"]) && $checkCriterio["economico"] == "S" && !$economica) { |
|
$richieste = $object->getRichieste("economica"); |
|
if (!empty($richieste)) { |
|
$economica = true; |
|
$buste["economica"] = $tipiBuste["economica"]; |
|
} |
|
} |
|
if (!isset($checkCriterio["economico"]) || (isset($checkCriterio["economico"]) && $checkCriterio["economico"] == "N") && !$tecnica) { |
|
$richieste = $object->getRichieste("tecnica"); |
|
if (!empty($richieste)) { |
|
$tecnica = true; |
|
$buste["tecnica"] = $tipiBuste["tecnica"]; |
|
} |
|
} |
|
if ($economica && $tecnica) { break; } |
|
} |
|
} |
|
if (isset($criterioValutazione)) { |
|
$coppie = true; |
|
if (count($partecipanti) < 3 || $infoCommissione["modalita"] == "R") { |
|
$coppie = false; |
|
$valori = $manager->getCoefficientiValutazione($criterioValutazione["codice"],$_SESSION["utente"]->codice); |
|
?> |
|
<form action="save.php" method="post" rel="validate"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $infoCommissione["codice"] ?>"> |
|
<? if (!empty($lotto)) { ?><input id="codice_lotto" type="hidden" name="codice_lotto" value="<?= $lotto["codice"] ?>"><? } ?> |
|
<input id="codice_criterio" type="hidden" name="codice_criterio" value="<?= $criterioValutazione["codice"] ?>"> |
|
<? |
|
} |
|
} |
|
?> |
|
<div class="table-responsive"> |
|
<table width="100%" class="table table-striped table-hover"> |
|
<thead> |
|
<tr> |
|
<th>#</th> |
|
<? if ($manager->modulo != "concorsi") { ?> |
|
<th width="10%"><?= __("Partita IVA") ?></th> |
|
<th><?= __("Ragione Sociale") ?></th> |
|
<? } else { ?> |
|
<th><?= __("ID") ?></th> |
|
<? } ?> |
|
<? |
|
foreach ($buste AS $busta) { |
|
echo "<th width='15%' class='text-center'>" . __($busta["titolo"]) . "</th>"; |
|
} |
|
if (isset($criterioValutazione)) { echo "<th colspan=\"2\" width=\"120\">".__("Valutazione")."</th>"; } |
|
?> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? |
|
if (isset($criterioValutazione) && $coppie) { |
|
$saved = $this->db->prepare("SELECT punteggio_partecipante_1, punteggio_partecipante_2 FROM b_confronto_coppie WHERE codice_commissione = :codice_commissione |
|
AND codice_utente = :codice_utente AND codice_criterio = :codice_criterio AND codice_partecipante_1 = :a "); |
|
$saved->bindValue(":codice_commissione",$infoCommissione["codice"]); |
|
$saved->bindValue(":codice_utente",$_SESSION["utente"]->codice); |
|
$saved->bindValue(":codice_criterio",$criterioValutazione["codice"]); |
|
} |
|
$count = "A"; |
|
$i = 0; |
|
$beginned = false; |
|
foreach($partecipanti AS $partecipante) { |
|
$i++; |
|
?> |
|
<tr> |
|
<td width="10"><?= $count ?></td> |
|
<? if ($manager->modulo != "concorsi") { ?> |
|
<td><?= $partecipante["codice_fiscale"] ?></td> |
|
<td><strong><?= $partecipante["ragione_sociale"] ?></strong></td> |
|
<? } else { ?> |
|
<td><?= $partecipante["id"] ?></td> |
|
<? }?> |
|
<? |
|
foreach ($buste AS $id_busta => $busta) { |
|
$showBustaPath = "{$manager->viewPath}&partecipante={$partecipante["codice"]}&busta={$id_busta}" . ((!empty($lotto)) ? "&codice_lotto={$lotto["codice"]}" : ""); |
|
addBypassCheckURL($showBustaPath); |
|
?> |
|
<td> |
|
<button type="button" class="btn btn-block btn-sm btn-info" onClick="showModalWithURL('<?= $showBustaPath ?>')"> |
|
<span class="fa fa-folder-open"></span> <?= __("Visualizza") ?> |
|
</button> |
|
</td> |
|
<? |
|
} |
|
if (isset($coppie)) { |
|
if ($coppie) { |
|
if ($i < count($partecipanti)) { |
|
$saved->bindValue(":a",$partecipante["codice"]); |
|
$saved->execute(); |
|
$stato = "bg-warning"; |
|
$stato_label = __("Valutazione non terminata"); |
|
if ($saved->rowCount() == (count($partecipanti) - $i)) { |
|
$stato = "bg-success"; |
|
$stato_label = __("Valutazione completa"); |
|
} |
|
?> |
|
<td class="text-center" width="10"> |
|
<button class="btn btn-sm btn-primary" type="button" onClick="showModalWithURL('coppie.php?codice_criterio=<?= $criterioValutazione["codice"] ?>&codice=<?= $manager->getInfo()["codice"] ?>&partecipante=<?= $partecipante["codice"] ?><?= (!empty($lotto)) ? "&codice_lotto={$lotto["codice"]}" : "" ?>')"> |
|
<span class="fa fa-edit"></span> |
|
</button> |
|
</td> |
|
<td class="text-center" width="10"> |
|
<div class="status_flag <?= $stato ?>"><span class="sr-only"><?= $stato_label ?></span></div> |
|
</td> |
|
<? |
|
} else { |
|
?> |
|
<td colspan="2"> |
|
</td> |
|
<? |
|
} |
|
} else { |
|
$value = $valori[$partecipante["codice"]] ?? ""; |
|
if ($value !== "") { |
|
$beginned = true; |
|
$value *= 10; |
|
} |
|
?> |
|
<td class="form-group" width="120"> |
|
<input class="form-control text-center input-lg" |
|
title="<?= __("Punteggio") ?> <?= $count ?>" |
|
rel="N;1;0;N;10;<=" |
|
name="partecipante[<?= $partecipante["codice"] ?>]" |
|
value="<?= $value ?>"> |
|
</td> |
|
<? |
|
} |
|
} ?> |
|
</tr> |
|
<? |
|
$count++; |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
<? |
|
if (isset($coppie) && $coppie === false) { |
|
if (!$beginned) { |
|
?> |
|
<script> |
|
swal({title:"<?= __("Indicazioni di compilazione") ?>", html:"<?= __("Esprimi una valutazione compresa tra 0 e 10.") ?><br><small><?= __("E' possibile utilizzare anche valori decimali") ?></small>",type:"warning"}); |
|
</script> |
|
<? |
|
} |
|
?> |
|
<button type="submit" class="btn btn-block btn-lg btn-success"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
</form> |
|
<? |
|
} |
|
} |
|
?>
|