ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAppointmentExerciseFileHandler.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
33 public function getFiles(): array
34 {
35 // see ilExAssignment->handleCalendarEntries $dl parameter
36 $ass_id = $this->appointment['event']->getContextId() / 10;
37 $assignment = new ilExAssignment($ass_id);
38 $ass_files = $assignment->getFiles();
39 $files = [];
40 $state = ilExcAssMemberState::getInstanceByIds($assignment->getId(), $this->user->getId());
41 if (count($ass_files) && $state->areInstructionsVisible()) {
42 foreach ($ass_files as $ass_file) {
43 $file_property = new ilFileProperty();
44 $file_property->setAbsolutePath($ass_file['fullpath']);
45 $file_property->setFileName($ass_file['name']);
46 $file_property->setFileRId($ass_file['rid']);
47 $files[] = $file_property;
48 }
49 }
50 return $files;
51 }
52}
Base file handler class for appointment classes.
Exercise assignment.
static getInstanceByIds(int $a_ass_id, int $a_user_id=0)
Appointment file handler interface.