diff --git a/components/ILIAS/Test/src/Participants/Participant.php b/components/ILIAS/Test/src/Participants/Participant.php index c7b98678d9b2..997b477170f9 100644 --- a/components/ILIAS/Test/src/Participants/Participant.php +++ b/components/ILIAS/Test/src/Participants/Participant.php @@ -183,11 +183,7 @@ public function getLastAccess(): ?\DateTimeImmutable public function hasAnsweredQuestionsForScoredAttempt(): bool { - if (!$this->hasAttemptOverviewInformation()) { - return false; - } - - return $this->attempt_overview->hasAnsweredQuestions(); + return $this->attempt_overview?->hasAnsweredQuestions() ?? false; } public function getRemainingDuration(