ILIAS  release_7 Revision v7.30-3-g800a261c036
ilAppointmentExerciseFileHandler Class Reference

Exercise appointment file handler. More...

+ Inheritance diagram for ilAppointmentExerciseFileHandler:
+ Collaboration diagram for ilAppointmentExerciseFileHandler:

Public Member Functions

 getFiles ()
 
- Public Member Functions inherited from ilAppointmentBaseFileHandler
 __construct ($a_appointment)
 Constructor. More...
 
 getCatId ($a_entry_id)
 
 getCatInfo ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAppointmentBaseFileHandler
static getInstance ($a_appointment)
 Get instance. More...
 
- Protected Attributes inherited from ilAppointmentBaseFileHandler
 $appointment
 
 $logger
 

Detailed Description

Exercise appointment file handler.

Author
Jesús López Reyes lopez.nosp@m.@lei.nosp@m.fos.d.nosp@m.e

Definition at line 13 of file class.ilAppointmentExerciseFileHandler.php.

Member Function Documentation

◆ getFiles()

ilAppointmentExerciseFileHandler::getFiles ( )

Implements ilAppointmentFileHandler.

Definition at line 18 of file class.ilAppointmentExerciseFileHandler.php.

References $DIC, and ilExcAssMemberState\getInstanceByIds().

18  : array
19  {
20  global $DIC;
21 
22  $user_id = $DIC->user()->getId();
23 
24  $ass_id = $this->appointment['event']->getContextId() / 10; // see ilExAssignment->handleCalendarEntries $dl parameter
25  $assignment = new ilExAssignment($ass_id);
26  $ass_files = $assignment->getFiles();
27  $files = [];
28  $state = ilExcAssMemberState::getInstanceByIds($assignment->getId(), $user_id);
29  if (count($ass_files) && $state->areInstructionsVisible()) {
30  foreach ($ass_files as $ass_file) {
31  $file_property = new ilFileProperty();
32  $file_property->setAbsolutePath($ass_file['fullpath']);
33  $file_property->setFileName($ass_file['name']);
34 
35  $files[] = $file_property;
36  }
37  }
38  return $files;
39  }
Exercise assignment.
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: