From 484cf11c07551f0417b26f60a8933130e37b7392 Mon Sep 17 00:00:00 2001 From: Grisu Date: Mon, 5 Dec 2022 12:44:39 +0100 Subject: [PATCH] added pass mark --- app/scripts/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/scripts/functions.php b/app/scripts/functions.php index 4283191..b036eab 100644 --- a/app/scripts/functions.php +++ b/app/scripts/functions.php @@ -235,6 +235,9 @@ function update_points($con, $s_id) { $factor = $results[0]['erg']/ 15.0; foreach($results as $row) { $points = round($row['erg']/$factor); + if ($points == 0 && $row['erg'] != 0) { + $points = 1; + } change_points($con, $row['m_id'], $s_id, $points); } }