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()))
165 global $tree, $rbacreview;
167 $id = $object->getId();
168 if ($object->getType() ==
"role" && $rbacreview->isRoleDeleted($id))
173 $attrs = array(
'type' => $object->getType(),
181 if($this->mode == self::MODE_SEARCH_RESULT)
183 $title = $object->getTitle();
184 if($this->highlighter->getTitle($object->getId(),0))
186 $title = $this->highlighter->getTitle($object->getId(),0);
188 $description = $object->getDescription();
189 if($this->highlighter->getDescription($object->getId(),0))
191 $description = $this->highlighter->getDescription($object->getId(),0);
195 #$this->xmlElement('Title', null, $title);
196 #$this->xmlElement('Description',null,$description);
197 #$this->xmlElement('SearchResultContent', null, $this->highlighter->getContent($object->getId(),0));
199 $this->
xmlElement(
'Title',null,$object->getTitle());
200 $this->
xmlElement(
'Description',null,$object->getDescription());
204 $this->
xmlElement(
'Title',null,$object->getTitle());
205 $this->
xmlElement(
'Description',null,$object->getDescription());
209 $this->
xmlElement(
'Owner',null,$object->getOwner());
210 $this->
xmlElement(
'CreateDate',null,$object->getCreateDate());
211 $this->
xmlElement(
'LastUpdate',null,$object->getLastUpdateDate());
212 $this->
xmlElement(
'ImportId',null,$object->getImportId());
223 $refs = array($object->getRefId());
229 if (!$tree->isInTree($ref_id))
232 $attr = array(
'ref_id' => $ref_id,
'parent_id'=> $tree->getParentId(intval($ref_id)));
252 if(!$tree->checkForParentType($a_ref_id,
'crs')) {
255 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
258 switch($time_targets[
'timing_type'])
274 $this->
xmlStartTag(
'TimeTarget',array(
'type' => $type));
276 # if($type == self::TIMING_TEMPORARILY_AVAILABLE)
280 array(
'starting_time' => $time_targets[
'timing_start'],
281 'ending_time' => $time_targets[
'timing_end'],
282 'visibility' => $vis));
285 # if($type == self::TIMING_PRESETTING)
287 if($time_targets[
'changeable'] or 1)
290 array(
'starting_time' => $time_targets[
'suggestion_start'],
291 'ending_time' => $time_targets[
'suggestion_end'],
292 'changeable' => $time_targets[
'changeable'],
293 'earliest_start' => $time_targets[
'earliest_start'],
294 'latest_end' => $time_targets[
'latest_end']));
299 array(
'starting_time' => $time_targets[
'suggestion_start'],
300 'ending_time' => $time_targets[
'suggestion_end'],
301 'changeable' => $time_targets[
'changeable']));
318 include_once
'./Modules/File/classes/class.ilObjFileAccess.php';
323 $this->
xmlElement(
"Property",array(
'name' =>
'fileExtension'),(
string) $extension);
336 global $ilAccess,$rbacreview,$objDefinition;
340 $ops = $rbacreview->getOperationsOnTypeString($a_type);
343 foreach($ops as $ops_id)
345 $operation = $rbacreview->getOperation($ops_id);
347 if(count ($operation) && $ilAccess->checkAccessOfUser($this->getUserId(),$operation[
'operation'],
'view',$a_ref_id))
349 $this->
xmlElement(
'Operation',null,$operation[
'operation']);
356 $objects = $objDefinition->getCreatableSubObjects($a_type);
358 $creation_operations = array();
361 $ops_id = $ops_ids[$type];
368 $operation = $rbacreview->getOperation($ops_id);
370 if(count ($operation) && $ilAccess->checkAccessOfUser($this->getUserId(),$operation[
'operation'],
'view',$a_ref_id))
372 $this->
xmlElement(
'Operation',null,$operation[
'operation']);
386 $this->
xmlSetDtdDef(
"<!DOCTYPE Objects PUBLIC \"-//ILIAS//DTD ILIAS Repositoryobjects//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_object_4_0.dtd\">");
402 include_once
'Services/AccessControl/classes/class.ilAccessHandler.php';
404 $ilAccess->checkAccessOfUser($this->
getUserId(),
'read',
'view',
$ref_id,$object->getType(),$object->getId());
406 if(!$info = $ilAccess->getInfo())
412 return $info[0][
'type'];
419 $items = $tree->getPathFull($refid);
420 $writer->xmlStartTag(
"Path");
421 foreach ($items as $item) {
422 if ($item[
"ref_id"] == $refid)
424 if ($item[
"type"] ==
"root")
426 $item[
"title"] = $lng->txt(
"repository");
428 $writer->xmlElement(
"Element", array(
"ref_id" => $item[
"ref_id"],
"type" => $item[
"type"]), $item[
"title"]);
430 $writer->xmlEndTag(
"Path");