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.
101 righe
4.8 KiB
101 righe
4.8 KiB
<? |
|
if (isset($this) && is_a($this,"Commissione") && $this->admin) { |
|
$object = $this->getObject(null); |
|
if (method_exists($object,"chooseLotto")) { |
|
$continua = false; |
|
$object->printSelectLottiConditions = ["hasPartecipanti","hasCriteriCommissione"]; |
|
if ($object->chooseLotto($_GET["codice_lotto"] ?? false,$_SERVER["PHP_SELF"]."?".http_build_query($_GET))) { |
|
$continua = true; |
|
$lotto = $object->lotto; |
|
} |
|
} else { |
|
$continua = true; |
|
} |
|
if ($continua) { |
|
$criteri = $object->getCriteriValutabili(); |
|
$totaleValutazioni = 0; |
|
foreach($criteri AS $criterio) { |
|
if ($criterio["tipologia"] == "Q") { $totaleValutazioni++; } |
|
} |
|
$partecipanti = $object->getPartecipanti(NULL,TRUE); |
|
$valutazioni = $object->getCoefficientiValutazione(); |
|
$totaleValutazioni = $totaleValutazioni * count($partecipanti); |
|
if (count($criteri) > 0 && count($partecipanti) > 0) { |
|
$error = false; ?> |
|
<div class="card mt-2"> |
|
<div class="card-body p-0"> |
|
<div class="table-responsive"> |
|
<table class="table table-striped"> |
|
<thead> |
|
<tr> |
|
<th width="20%"><?= __("Cognome") ?></th> |
|
<th width="20%"><?= __("Nome") ?></th> |
|
<th class="text-center">%</th> |
|
<th width="10"></th> |
|
<tr> |
|
</thead> |
|
<tbody id="commissari"> |
|
<? |
|
$commissione = $this->getCommissari($codice_utente); |
|
if (!empty($commissione)) { |
|
foreach($commissione AS $commissario) { |
|
?> |
|
<tr> |
|
<td class="form-group"> |
|
<?= $commissario["cognome"] ?> |
|
</td> |
|
<td class="form-group"> |
|
<?= $commissario["nome"] ?> |
|
</td> |
|
<td class="text-center"> |
|
<? |
|
$perc = 0; |
|
if (!empty($totaleValutazioni) && !empty($valutazioni)) { |
|
$totaleCommissario = 0; |
|
foreach($criteri AS $criterio) { |
|
if (!empty($valutazioni[$criterio["codice"]][$commissario["codice_utente"]])) { $totaleCommissario += count($valutazioni[$criterio["codice"]][$commissario["codice_utente"]]); } |
|
} |
|
$perc = $totaleCommissario * 100 / $totaleValutazioni; |
|
if ($perc > 100) { $perc = 100; } |
|
$perc = round($perc); |
|
?> |
|
<div class="progress"> |
|
<div class="progress-bar <?= ($perc == 100) ? "bg-success" : "bg-warning progress-bar-striped progress-bar-animated" ?>" role="progressbar" style="width: <?= $perc ?>%;%;" aria-valuenow="<?= $perc ?>%;" aria-valuemin="0" aria-valuemax="100"><?= $perc ?>%</div> |
|
</div> |
|
<? |
|
} |
|
?> |
|
</td> |
|
<td> |
|
<? |
|
if ($perc > 0) { |
|
?> |
|
<button type="button" class="btn btn-sm btn-info" onClick="showModalWithURL('/backend/common/commissioni/report.php?modulo=<?= $this->modulo ?>&codice_elemento=<?= $this->elemento ?>&codice_utente=<?= $commissario["codice_utente"] ?><?= (isset($lotto)) ? "&codice_lotto={$lotto["codice"]}" : "" ?>')"> |
|
<span class="fa fa-search"></span> |
|
</button> |
|
<? |
|
} |
|
?> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
<div class="card-footer"> |
|
<? if (!empty($totaleValutazioni) && !empty($valutazioni)) { ?> |
|
<button type="button" class="btn btn-sm btn-block btn-info" onClick="showModalWithURL('/backend/common/commissioni/report.php?modulo=<?= $this->modulo ?>&codice_elemento=<?= $this->elemento ?><?= (isset($lotto)) ? "&codice_lotto={$lotto["codice"]}" : "" ?>')"> |
|
<span class="fa fa-search"></span> <?= __("Report valutazione") ?> |
|
</button> |
|
<? } ?> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
} |
|
} |
|
?>
|
|
|