5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
63 parent::__construct();
66 $this->user_id =
$ilUser->getId();
72 $this->mode = $a_mode;
77 $this->highlighter = $a_highlighter;
84 $this->check_permission = $a_status;
94 $this->user_id = $a_id;
103 $this->enable_operations = $a_status;
116 $this->enable_references = $a_stat;
133 return $this->objects ? $this->objects : array();
140 $ilAccess = $DIC[
'ilAccess'];
141 $objDefinition = $DIC[
'objDefinition'];
146 if (method_exists($object,
'getType')
and $objDefinition->isRBACObject($object->getType())) {
151 $this->__appendObject($object);
165 public function __appendObject(
ilObject $object)
169 $tree = $DIC[
'tree'];
170 $rbacreview = $DIC[
'rbacreview'];
175 $objectDefinition = $DIC[
'objDefinition'];
178 if ($object->
getType() ==
"role" && $rbacreview->isRoleDeleted(
$id)) {
187 if ($objectDefinition->supportsOfflineHandling($object->
getType())) {
196 if ($this->mode == self::MODE_SEARCH_RESULT) {
198 if ($this->highlighter->getTitle($object->
getId(), 0)) {
199 $title = $this->highlighter->getTitle($object->
getId(), 0);
202 if ($this->highlighter->getDescription($object->
getId(), 0)) {
207 #$this->xmlElement('Title', null, $title); 208 #$this->xmlElement('Description',null,$description); 209 #$this->xmlElement('SearchResultContent', null, $this->highlighter->getContent($object->getId(),0)); 233 foreach ($refs as $ref_id) {
235 if (!
$tree->isInTree($ref_id)) {
241 'parent_id'=>
$tree->getParentId(intval($ref_id))
262 $tree = $DIC[
'tree'];
264 if (!
$tree->checkForParentType($a_ref_id,
'crs')) {
267 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
270 switch ($time_targets[
'timing_type']) {
272 $type = self::TIMING_DEACTIVATED;
275 $type = self::TIMING_TEMPORARILY_AVAILABLE;
278 $type = self::TIMING_PRESETTING;
281 $type = self::TIMING_DEACTIVATED;
287 # if($type == self::TIMING_TEMPORARILY_AVAILABLE) 289 $vis = $time_targets[
'visible'] == 0 ? self::TIMING_VISIBILITY_OFF : self::TIMING_VISIBILITY_ON;
292 array(
'starting_time' => $time_targets[
'timing_start'],
293 'ending_time' => $time_targets[
'timing_end'],
294 'visibility' => $vis)
298 # if($type == self::TIMING_PRESETTING) 303 'starting_time' => $time_targets[
'suggestion_start'],
304 'ending_time' => $time_targets[
'suggestion_end'],
305 'changeable' => $time_targets[
'changeable'])
322 include_once
'./Modules/File/classes/class.ilObjFileAccess.php';
326 $this->
xmlElement(
"Property", array(
'name' =>
'fileSize'), (
int)
$size);
327 $this->
xmlElement(
"Property", array(
'name' =>
'fileExtension'), (
string) $extension);
341 $ilAccess = $DIC[
'ilAccess'];
342 $rbacreview = $DIC[
'rbacreview'];
343 $objDefinition = $DIC[
'objDefinition'];
346 $ops = $rbacreview->getOperationsOnTypeString(
$a_type);
347 if (is_array($ops)) {
348 foreach ($ops as $ops_id) {
349 $operation = $rbacreview->getOperation($ops_id);
351 if (count($operation) && $ilAccess->checkAccessOfUser($this->getUserId(), $operation[
'operation'],
'view', $a_ref_id)) {
352 $this->
xmlElement(
'Operation', null, $operation[
'operation']);
361 $creation_operations = array();
363 $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)) {
372 $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 $ilAccess = $DIC[
'ilAccess'];
405 include_once
'Services/AccessControl/classes/class.ilAccess.php';
407 $ilAccess->checkAccessOfUser($this->
getUserId(),
'read',
'view', $ref_id, $object->
getType(), $object->
getId());
409 if (!
$info = $ilAccess->getInfo()) {
412 return $info[0][
'type'];
421 $tree = $DIC[
'tree'];
423 $items =
$tree->getPathFull($refid);
424 $writer->xmlStartTag(
"Path");
425 foreach ($items as $item) {
426 if ($item[
"ref_id"] == $refid) {
429 if ($item[
"type"] ==
"root") {
430 $item[
"title"] =
$lng->txt(
"repository");
432 $writer->xmlElement(
"Element", array(
"ref_id" => $item[
"ref_id"],
"type" => $item[
"type"]), $item[
"title"]);
434 $writer->xmlEndTag(
"Path");
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlSetGenCmt($genCmt)
Sets generated comment.
isPermissionCheckEnabled()
xmlSetDtdDef($dtdDef)
Sets dtd definition.
__appendTimeTargets($a_ref_id)
Append time target settings for items inside of courses.
const TIMING_VISIBILITY_OFF
xmlDumpMem($format=true)
Returns xml document from memory.
enableOperations($a_status)
static getItem($a_ref_id)
Get item data.
getOfflineStatus()
Get offline status.
if(!array_key_exists('StateId', $_REQUEST)) $id
const TIMINGS_DEACTIVATED
getCreateDate()
get create date public
getOwner()
get object owner
static _getAllReferences($a_id)
get all reference ids of object
xmlEndTag($tag)
Writes an endtag.
static lookupCreateOperationIds($a_type_arr)
Lookup operation ids.
static _lookupFileSize($a_id)
Quickly looks up the file size from the database and returns the number of bytes. ...
enableReferences($a_stat)
const TIMING_TEMPORARILY_AVAILABLE
getId()
get object id public
static appendPathToObject($writer, $refid)
getTitle()
get object title public
getDescription()
get object description
getImportId()
get import id
redirection script todo: (a better solution should control the processing via a xml file) ...
xmlHeader()
Writes xml header public.
const TIMING_VISIBILITY_ON
static _lookupSuffix($a_id)
lookup suffix
getType()
get object type public
__appendOperations($a_ref_id, $a_type)
setHighlighter($a_highlighter)
__appendObjectProperties(ilObject $obj)
Append object properties.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
__getAccessInfo(&$object, $ref_id)
getRefId()
get reference id public
static _lookupVersion($a_id)
lookup version
getLastUpdateDate()
get last update date public
enablePermissionCheck($a_status)