5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
63 $this->user_id = $ilUser->getId();
69 $this->mode = $a_mode;
74 $this->highlighter = $a_highlighter;
81 $this->check_permission = $a_status;
91 $this->user_id = $a_id;
100 $this->enable_operations = $a_status;
113 $this->enable_references = $a_stat;
130 return $this->objects ? $this->objects : array();
135 global $ilAccess,$objDefinition;
141 if(method_exists($object,
'getType') and $objDefinition->isRBACObject($object->getType()))
148 if (is_object($object))
166 global $tree, $rbacreview;
168 $id = $object->getId();
169 if ($object->getType() ==
"role" && $rbacreview->isRoleDeleted($id))
174 $attrs = array(
'type' => $object->getType(),
182 if($this->mode == self::MODE_SEARCH_RESULT)
184 $title = $object->getTitle();
185 if($this->highlighter->getTitle($object->getId(),0))
187 $title = $this->highlighter->getTitle($object->getId(),0);
189 $description = $object->getDescription();
190 if($this->highlighter->getDescription($object->getId(),0))
192 $description = $this->highlighter->getDescription($object->getId(),0);
196 #$this->xmlElement('Title', null, $title);
197 #$this->xmlElement('Description',null,$description);
198 #$this->xmlElement('SearchResultContent', null, $this->highlighter->getContent($object->getId(),0));
200 $this->
xmlElement(
'Title',null,$object->getTitle());
201 $this->
xmlElement(
'Description',null,$object->getDescription());
205 $this->
xmlElement(
'Title',null,$object->getTitle());
206 $this->
xmlElement(
'Description',null,$object->getDescription());
210 $this->
xmlElement(
'Owner',null,$object->getOwner());
211 $this->
xmlElement(
'CreateDate',null,$object->getCreateDate());
212 $this->
xmlElement(
'LastUpdate',null,$object->getLastUpdateDate());
213 $this->
xmlElement(
'ImportId',null,$object->getImportId());
224 $refs = array($object->getRefId());
230 if (!$tree->isInTree($ref_id))
233 $attr = array(
'ref_id' => $ref_id,
'parent_id'=> $tree->getParentId(intval($ref_id)));
253 if(!$tree->checkForParentType($a_ref_id,
'crs')) {
256 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
259 switch($time_targets[
'timing_type'])
275 $this->
xmlStartTag(
'TimeTarget',array(
'type' => $type));
277 # if($type == self::TIMING_TEMPORARILY_AVAILABLE)
281 array(
'starting_time' => $time_targets[
'timing_start'],
282 'ending_time' => $time_targets[
'timing_end'],
283 'visibility' => $vis));
286 # if($type == self::TIMING_PRESETTING)
288 if($time_targets[
'changeable'] or 1)
291 array(
'starting_time' => $time_targets[
'suggestion_start'],
292 'ending_time' => $time_targets[
'suggestion_end'],
293 'changeable' => $time_targets[
'changeable'],
294 'earliest_start' => $time_targets[
'earliest_start'],
295 'latest_end' => $time_targets[
'latest_end']));
300 array(
'starting_time' => $time_targets[
'suggestion_start'],
301 'ending_time' => $time_targets[
'suggestion_end'],
302 'changeable' => $time_targets[
'changeable']));
319 include_once
'./Modules/File/classes/class.ilObjFileAccess.php';
324 $this->
xmlElement(
"Property",array(
'name' =>
'fileExtension'),(
string) $extension);
337 global $ilAccess,$rbacreview,$objDefinition;
341 $ops = $rbacreview->getOperationsOnTypeString($a_type);
344 foreach($ops as $ops_id)
346 $operation = $rbacreview->getOperation($ops_id);
348 if(count ($operation) && $ilAccess->checkAccessOfUser($this->getUserId(),$operation[
'operation'],
'view',$a_ref_id))
350 $this->
xmlElement(
'Operation',null,$operation[
'operation']);
357 $objects = $objDefinition->getCreatableSubObjects($a_type);
359 $creation_operations = array();
362 $ops_id = $ops_ids[$type];
369 $operation = $rbacreview->getOperation($ops_id);
371 if(count ($operation) && $ilAccess->checkAccessOfUser($this->getUserId(),$operation[
'operation'],
'view',$a_ref_id))
373 $this->
xmlElement(
'Operation',null,$operation[
'operation']);
387 $this->
xmlSetDtdDef(
"<!DOCTYPE Objects PUBLIC \"-//ILIAS//DTD ILIAS Repositoryobjects//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_object_4_0.dtd\">");
403 include_once
'Services/AccessControl/classes/class.ilAccessHandler.php';
405 $ilAccess->checkAccessOfUser($this->
getUserId(),
'read',
'view',
$ref_id,$object->getType(),$object->getId());
407 if(!$info = $ilAccess->getInfo())
413 return $info[0][
'type'];
420 $items = $tree->getPathFull($refid);
421 $writer->xmlStartTag(
"Path");
422 foreach ($items as $item) {
423 if ($item[
"ref_id"] == $refid)
425 if ($item[
"type"] ==
"root")
427 $item[
"title"] = $lng->txt(
"repository");
429 $writer->xmlElement(
"Element", array(
"ref_id" => $item[
"ref_id"],
"type" => $item[
"type"]), $item[
"title"]);
431 $writer->xmlEndTag(
"Path");