Splitta kadavertabellen og minikadavertabellen

This commit is contained in:
Trygve
2025-10-29 01:01:58 +01:00
parent fdddbbb0ef
commit b30996ceea
4 changed files with 113 additions and 14 deletions

View File

@@ -24,9 +24,7 @@ class Runner
$this->email = $email;
$this->phone = $phone;
$this->is_student = $is_student;
for ($i = 0; $i < $GLOBALS['number_of_controls']; $i++) {
$this->splits[$i] = false;
}
$this->splits = [false, false, false];
}
function set_split($control, $timestamp)
@@ -34,14 +32,14 @@ class Runner
$this->splits[$control] = $timestamp;
}
function get_control()
{ for ($i = 0; $i < count($this->splits); $i++) {
if (!is_object($this->splits[$i])) {
return $i-1;
function get_control(){
$control = -1;
for ($i = 0; $i < count($this->splits); $i++) {
if ($this->splits[$i] != false) {
$control++;
}
}
return count($this->splits)-1;
}
return $control;
}
}