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.
59 righe
2.4 KiB
59 righe
2.4 KiB
<? |
|
|
|
if (isset($gara)) { |
|
$statuses = []; |
|
foreach($lotti AS $lotto) { |
|
if ($gara->setLotto($lotto["codice"]) && !empty($gara->getPartecipanti())) { |
|
$hrefComandoStatus = $hrefComando . "&codice_lotto={$lotto["codice"]}"; |
|
$codici_criteri = []; |
|
if ($id_comando == "punteggiTecnici") { |
|
$criteri = $gara->getCriteriTecniciValutabili(); |
|
} else { |
|
$criteri = $gara->getCriteriEconomiciValutabili(); |
|
} |
|
if (!empty($criteri)) { |
|
$partecipanti = $gara->getPartecipanti(TRUE); |
|
$codice_partecipanti = []; |
|
if (!empty($partecipanti)) { |
|
foreach($partecipanti AS $partecipante) { |
|
$codice_partecipanti[] = $partecipante["codice"]; |
|
} |
|
} |
|
$codice_partecipanti = implode(",",$codice_partecipanti); |
|
foreach($criteri AS $criterio) { |
|
$codici_criteri[] = $criterio["codice"]; |
|
} |
|
$sql_bad = "SELECT codice FROM b_gare_punteggi_partecipanti WHERE codice_partecipante IN (" . $codice_partecipanti. ") AND codice_criterio IN (".implode(",",$codici_criteri).")"; |
|
$ris_bad = $pdo->go($sql_bad); |
|
$num_punteggi = $ris_bad->rowCount(); |
|
if (!empty($num_punteggi)) { |
|
$totale_valutazioni = count($partecipanti) * count($criteri); |
|
if ($num_punteggi == $totale_valutazioni) { |
|
$statuses[] = "status-border-success"; |
|
} else { |
|
$statuses[] = "status-border-warning"; |
|
if (!$lock) { |
|
$alertManager->addWarningAlert(__("Lotto") . " " . $lotto["numero"] . " - " . __("Attribuzione punteggi " . (($id_comando == "punteggiTecnici") ? "tecnici" : "economici") . " non completa"),$hrefComandoStatus); |
|
} |
|
} |
|
} else { |
|
$statuses[] = "status-border-danger"; |
|
if (!$lock) { |
|
$alertManager->addDangerAlert(__("Lotto") . " " . $lotto["numero"] . " - " . __("Nessun punteggio " . (($id_comando == "punteggiTecnici") ? "tecnico" : "economico") . " è stato specificato"),$hrefComandoStatus); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
$statuses = array_unique($statuses); |
|
if (count($statuses) === 1) { |
|
$status = $statuses[0]; |
|
} else { |
|
$status = "status-border-warning"; |
|
} |
|
if ($status == "status-border-danger" && !empty($lock)) { |
|
$status = null; |
|
} |
|
$gara->lotto = null; |
|
} |
|
?>
|