19 declare(strict_types=1);
30 protected \ILIAS\FileUpload\FileUpload
$upload;
41 $this->
upload = $DIC->upload();
55 return $this->repo->getIdStringForAssId($this->ass_id);
60 $this->repo->createCollection($this->ass_id);
65 $this->repo->importFromLegacyUpload(
74 $this->repo->importFromDirectory(
83 $this->repo->deleteCollection(
91 return $this->repo->getCollection($this->ass_id);
96 if ($this->repo->hasCollection($this->ass_id)) {
103 'fullpath' => $info->
getSrc(),
107 }, iterator_to_array($this->repo->getCollectionResourcesInfo($this->ass_id)));
110 $storage = new \ilFSWebStorageExercise($exc_id, $this->ass_id);
111 return $storage->getFiles();
115 public function deliver(
string $full_path,
string $file): void
117 if ($this->repo->hasCollection($this->ass_id)) {
118 $this->repo->deliverFile($this->ass_id, $file);
129 $this->repo->clone($this->ass_id, $to_ass_id);
ilExcInstructionFilesStakeholder $stakeholder
__construct(int $ass_id, InstructionFileRepository $repo, \ilExcInstructionFilesStakeholder $stakeholder)
deliver(string $full_path, string $file)
Class ResourceCollection.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
importFromDirectory(string $dir)
ILIAS FileUpload FileUpload $upload
Interface ResourceStakeholder.
importFromLegacyUpload(array $file_input)
static lookupExerciseId(int $a_ass_id)
InstructionFileRepository $repo