more stats
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s
This commit is contained in:
parent
3b7df5e29d
commit
916429ea72
@ -46,6 +46,22 @@
|
|||||||
$sdata['time'][] = $res['zeit'] ?: 0;
|
$sdata['time'][] = $res['zeit'] ?: 0;
|
||||||
$sdata['points'][] = $res['punkte'];
|
$sdata['points'][] = $res['punkte'];
|
||||||
$sdata['ranking'][] = $res['rang'];
|
$sdata['ranking'][] = $res['rang'];
|
||||||
|
|
||||||
|
$a = array_filter($sdata['speed']);
|
||||||
|
if(count($a)>0)
|
||||||
|
$averagespeed = round(array_sum($a)/count($a),2);
|
||||||
|
|
||||||
|
$a = array_filter($sdata['errors']);
|
||||||
|
if(count($a)>0)
|
||||||
|
$averageerrors = round(array_sum($a)/count($a),2);
|
||||||
|
|
||||||
|
$a = array_filter($sdata['refusals']);
|
||||||
|
if(count($a)>0)
|
||||||
|
$averagerefusals = round(array_sum($a)/count($a),2);
|
||||||
|
|
||||||
|
$a = array_filter($sdata['ranking']);
|
||||||
|
if(count($a)>0)
|
||||||
|
$averageranking = round(array_sum($a)/count($a),2);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -71,6 +87,18 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<h4>Statistik</h4>
|
||||||
|
|
||||||
|
<div class="card" style="width: 18rem;">
|
||||||
|
<ul class="list-group list-group-flush">
|
||||||
|
<li class="list-group-item">Durchschnittsgeschwinigkeit: <span class="badge bg-secondary"><?= $averagespeed ?> m/s</span></li>
|
||||||
|
<li class="list-group-item">Fehler pro Lauf: <span class="badge bg-secondary"><?= $averageerrors ?></span></li>
|
||||||
|
<li class="list-group-item">Verweigerungen pro Lauf: <span class="badge bg-secondary"><?= $averagerefusals ?></span></li>
|
||||||
|
<li class="list-group-item">Durchschnittliche Platzierung: <span class="badge bg-secondary"><?= $averageranking ?></span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<?php if (count($results) > 0) : ?>
|
<?php if (count($results) > 0) : ?>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
Reference in New Issue
Block a user