ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
5include_once("./Services/Calendar/interfaces/interface.ilAppointmentFileHandler.php");
6include_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}
An exception for terminatinating execution or to throw for unit testing.
Base file handler class for appointment classes.
Exercise assignment.
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
Appointemtn file handler interface.
$DIC
Definition: xapitoken.php:46