From de7d988fc493c3a4951f573ef7c99385d8fbaf9e Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Wed, 15 Nov 2023 14:18:52 +0100 Subject: [PATCH] 38473: Failed test: Team-Wiki ohne Vorlage --- .../TutorFeedbackFile/TutorFeedbackFileTeamRepository.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/ILIAS/Exercise/TutorFeedbackFile/TutorFeedbackFileTeamRepository.php b/components/ILIAS/Exercise/TutorFeedbackFile/TutorFeedbackFileTeamRepository.php index c1e748dbaba7..8fc17ddacd82 100755 --- a/components/ILIAS/Exercise/TutorFeedbackFile/TutorFeedbackFileTeamRepository.php +++ b/components/ILIAS/Exercise/TutorFeedbackFile/TutorFeedbackFileTeamRepository.php @@ -51,12 +51,15 @@ protected function getTeamId(int $ass_id, int $user_id): int if ($rec = $this->db->fetchAssoc($set)) { return (int) $rec["id"]; } - throw new \ilExerciseException("Team not found for user $user_id in assignment $ass_id"); + return 0; } public function createCollection(int $ass_id, int $user_id): void { $team_id = $this->getTeamId($ass_id, $user_id); + if ($team_id === 0) { + return; + } $new_id = $this->wrapper->createEmptyCollection(); $this->db->update( "exc_team_data", @@ -72,6 +75,9 @@ public function createCollection(int $ass_id, int $user_id): void public function getIdStringForAssIdAndUserId(int $ass_id, int $user_id): string { $team_id = $this->getTeamId($ass_id, $user_id); + if ($team_id === 0) { + return ""; + } $set = $this->db->queryF( "SELECT feedback_rcid FROM exc_team_data " . " WHERE id = %s",