19 declare(strict_types=1);
32 protected \ilDBInterface
$db;
49 $new_id = $this->wrapper->createEmptyCollection();
53 "feedback_rcid" => [
"text", $new_id]
56 "ass_id" => [
"integer", $ass_id],
57 "usr_id" => [
"integer", $user_id]
64 $set = $this->db->queryF(
65 "SELECT feedback_rcid FROM exc_mem_ass_status " .
66 " WHERE ass_id = %s AND usr_id = %s",
67 [
"integer",
"integer"],
70 $rec = $this->db->fetchAssoc($set);
71 return ($rec[
"feedback_rcid"] ??
"");
77 return ($rcid !==
"");
85 return $this->wrapper->getCollectionForIdString($rcid);
92 if (!is_null($collection = $this->
getCollection($ass_id, $user_id))) {
93 return $collection->count();
98 public function deliverFile(
$ass_id, $participant_id, $file):
void 102 if ($file === $info->getTitle()) {
103 $this->wrapper->deliverFile($info->getRid());
106 throw new \ilExerciseException(
"Resource $file not found.");
112 if ($rid === $info->getRid()) {
113 return $info->getTitle();
121 $set = $this->db->queryF(
122 "SELECT usr_id FROM exc_mem_ass_status " .
123 " WHERE ass_id = %s AND feedback_rcid = %s",
127 $rec = $this->db->fetchAssoc($set);
128 return (
int) ($rec[
"usr_id"] ?? 0);
139 return $this->wrapper->getCollectionResourcesInfo($collection);
151 $this->wrapper->deleteCollectionForIdString(
getFilenameForRid(int $ass_id, int $part_id, string $rid)
__construct(IRSSWrapper $wrapper, \ilDBInterface $db)
Class ResourceCollection.
getParticipantIdForRcid(int $ass_id, string $rcid)
getIdStringForAssIdAndUserId(int $ass_id, int $user_id)
getCollection(int $ass_id, int $user_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
createCollection(int $ass_id, int $user_id)
count(int $ass_id, int $user_id)
deleteCollection(int $ass_id, int $user_id, ResourceStakeholder $stakeholder)
hasCollection(int $ass_id, int $user_id)
getCollectionResourcesInfo(int $ass_id, int $user_id)
Interface ResourceStakeholder.