ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAppointmentExerciseFileHandler.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Calendar/interfaces/interface.ilAppointmentFileHandler.php");
6 include_once("./Services/Calendar/classes/FileHandler/class.ilAppointmentBaseFileHandler.php");
7 
15 {
22  public function getFiles()
23  {
24  global $DIC;
25 
26  $user_id = $DIC->user()->getId();
27 
28  $ass_id = $this->appointment['event']->getContextId() / 10; // see ilExAssignment->handleCalendarEntries $dl parameter
29  $assignment = new ilExAssignment($ass_id);
30  $ass_files = $assignment->getFiles();
31  $files = array();
32  $state = ilExcAssMemberState::getInstanceByIds($assignment->getId(), $user_id);
33  if (count($ass_files) && $state->areInstructionsVisible()) {
34  foreach ($ass_files as $ass_file) {
35  $files[] = $ass_file['fullpath'];
36  }
37  }
38  return $files;
39  }
40 }
Exercise assignment.
$files
Definition: metarefresh.php:49
Appointemtn file handler interface.
global $DIC
Definition: saml.php:7
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
Base file handler class for appointment classes.