19declare(strict_types=1);
32 protected \ilDBInterface
$db;
44 $set = $this->db->queryF(
45 "SELECT id FROM il_exc_team " .
46 " WHERE ass_id = %s AND user_id = %s",
47 [
"integer",
"integer"],
50 if ($rec = $this->db->fetchAssoc($set)) {
51 return (
int) $rec[
"id"];
62 $new_id = $this->wrapper->createEmptyCollection();
66 "feedback_rcid" => [
"text", $new_id]
69 "id" => [
"integer", $team_id]
76 $set = $this->db->queryF(
77 "SELECT id FROM exc_team_data " .
78 " WHERE feedback_rcid = %s",
82 $rec = $this->db->fetchAssoc($set);
83 return (
int) ($rec[
"id"] ?? 0);
93 $set = $this->db->queryF(
94 "SELECT feedback_rcid FROM exc_team_data " .
99 $rec = $this->db->fetchAssoc($set);
100 return ($rec[
"if_rcid"] ??
"");
106 return ($rcid !==
"");
113 return $this->wrapper->getCollectionForIdString($rcid);
126 public function deliverFile(
$ass_id, $participant_id, $file): void
130 if ($file ===
$info->getTitle()) {
131 $this->wrapper->deliverFile(
$info->getRid());
134 throw new \ilExerciseException(
"Resource $file not found.");
140 if ($rid ===
$info->getRid()) {
141 $this->wrapper->deliverFile(
$info->getRid());
142 return $info->getTitle();
153 return $this->wrapper->getCollectionResourcesInfo(
$collection);
161 throw new \
ilExerciseException(
"Collection cannot be deleted for user in team assignment $ass_id.");
168 $set = $this->db->queryF(
169 "SELECT feedback_rcid FROM exc_team_data " .
174 $rec = $this->db->fetchAssoc($set);
175 $rcid = $rec[
"feedback_rcid"] ??
"";
177 $this->wrapper->deleteCollectionForIdString($rcid, $stakeholder);
createCollection(int $ass_id, int $user_id)
deleteCollection(int $ass_id, int $user_id, ResourceStakeholder $stakeholder)
getIdStringForAssIdAndUserId(int $ass_id, int $user_id)
hasCollection(int $ass_id, int $user_id)
deleteTeamCollection(int $team_id, ResourceStakeholder $stakeholder)
getFilenameForRid(int $ass_id, int $part_id, string $rid)
getCollection(int $ass_id, int $user_id)
count(int $ass_id, int $user_id)
getCollectionResourcesInfo(int $ass_id, int $user_id)
getParticipantIdForRcid(int $ass_id, string $rcid)
__construct(IRSSWrapper $wrapper, \ilDBInterface $db)
getTeamId(int $ass_id, int $user_id)
Class ResourceCollection.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ResourceStakeholder.