ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAppointmentExerciseFileHandler.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
6 
8 
15 {
19  public function getFiles(): array
20  {
21  // see ilExAssignment->handleCalendarEntries $dl parameter
22  $ass_id = $this->appointment['event']->getContextId() / 10;
23  $assignment = new ilExAssignment($ass_id);
24  $ass_files = $assignment->getFiles();
25  $files = [];
26  $state = ilExcAssMemberState::getInstanceByIds($assignment->getId(), $this->user->getId());
27  if (count($ass_files) && $state->areInstructionsVisible()) {
28  foreach ($ass_files as $ass_file) {
29  $file_property = new ilFileProperty();
30  $file_property->setAbsolutePath($ass_file['fullpath']);
31  $file_property->setFileName($ass_file['name']);
32 
33  $files[] = $file_property;
34  }
35  }
36  return $files;
37  }
38 }
Exercise assignment.
Appointment file handler interface.
static getInstanceByIds(int $a_ass_id, int $a_user_id=0)
Base file handler class for appointment classes.