From 9e0e32e1dcfa9275382223bef3038962082562c7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 7 Mar 2024 18:44:19 +0900 Subject: do not plot answer that was submitted before the quiz is started in chart --- services/app/src/App.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/app/src/App.php b/services/app/src/App.php index b3e3491..299646b 100644 --- a/services/app/src/App.php +++ b/services/app/src/App.php @@ -934,6 +934,9 @@ final class App $stats = []; foreach ($correctAnswers as $answer) { + if ($answer->submitted_at < $quiz->started_at) { + continue; + } if (!isset($stats[$answer->author_id])) { $stats[$answer->author_id]['user'] = [ 'name' => $answer->author_name, -- cgit v1.2.3-70-g09d2