Skip to content

Commit

Permalink
38473: Failed test: Team-Wiki ohne Vorlage
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Nov 15, 2023
1 parent 1f65eb2 commit de7d988
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit de7d988

Please sign in to comment.