ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilAppointmentSessionFileHandler.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  $cat_info = $this->getCatInfo();
25 
26  //$session_obj = new ilObjSession($cat_info['obj_id'],false);
27 
28  include_once("./Services/Object/classes/class.ilObjectActivation.php");
29  $eventItems = ilObjectActivation::getItemsByEvent($cat_info['obj_id']);
30  $files = array();
31  if (count($eventItems)) {
32  foreach ($eventItems as $obj) {
33  if ($obj["type"] == "file") {
34  if ($this->access->checkAccessOfUser($this->user->getId(), "read", "", $obj['ref_id'])) {
35  $file = new ilObjFile($obj['ref_id']);
36 
37  // todo: this should be provided by an interface of ilObjFile
38  // currently this is copy/paste code from ilObjFile->sendFile
39  $filename = $file->getDirectory($file->getVersion()) . "/" . $file->getFileName();
40  if (@!is_file($filename)) {
41  $filename = $file->getDirectory() . "/" . $file->getFileName();
42  }
43  $files[] = $filename;
44  }
45  }
46  }
47  }
48  return $files;
49  }
50 }
$files
Definition: add-vimline.php:18
Appointemtn file handler interface.
static getItemsByEvent($a_event_id)
Get session material / event items.
Create styles array
The data for the language used.
Base file handler class for appointment classes.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file