5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
60 parent::__construct();
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;
140 if (method_exists($object,
'getType') and $objDefinition->isRBACObject($object->getType())) {
161 global $tree, $rbacreview;
163 $id = $object->getId();
164 if ($object->getType() ==
"role" && $rbacreview->isRoleDeleted(
$id)) {
168 $attrs =
array(
'type' => $object->getType(),
176 if ($this->mode == self::MODE_SEARCH_RESULT) {
177 $title = $object->getTitle();
178 if ($this->highlighter->getTitle($object->getId(), 0)) {
179 $title = $this->highlighter->getTitle($object->getId(), 0);
182 if ($this->highlighter->getDescription($object->getId(), 0)) {
183 $description = $this->highlighter->getDescription($object->getId(), 0);
187 #$this->xmlElement('Title', null, $title); 188 #$this->xmlElement('Description',null,$description); 189 #$this->xmlElement('SearchResultContent', null, $this->highlighter->getContent($object->getId(),0)); 191 $this->
xmlElement(
'Title', null, $object->getTitle());
192 $this->
xmlElement(
'Description', null, $object->getDescription());
194 $this->
xmlElement(
'Title', null, $object->getTitle());
195 $this->
xmlElement(
'Description', null, $object->getDescription());
199 $this->
xmlElement(
'Owner', null, $object->getOwner());
200 $this->
xmlElement(
'CreateDate', null, $object->getCreateDate());
201 $this->
xmlElement(
'LastUpdate', null, $object->getLastUpdateDate());
202 $this->
xmlElement(
'ImportId', null, $object->getImportId());
210 $refs =
array($object->getRefId());
213 foreach ($refs as $ref_id) {
215 if (!$tree->isInTree($ref_id)) {
219 $attr =
array(
'ref_id' => $ref_id,
'parent_id'=> $tree->getParentId(intval($ref_id)));
239 if (!$tree->checkForParentType($a_ref_id,
'crs')) {
242 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
245 switch ($time_targets[
'timing_type']) {
247 $type = self::TIMING_DEACTIVATED;
250 $type = self::TIMING_TEMPORARILY_AVAILABLE;
253 $type = self::TIMING_PRESETTING;
256 $type = self::TIMING_DEACTIVATED;
262 # if($type == self::TIMING_TEMPORARILY_AVAILABLE) 264 $vis = $time_targets[
'visible'] == 0 ? self::TIMING_VISIBILITY_OFF : self::TIMING_VISIBILITY_ON;
267 array(
'starting_time' => $time_targets[
'timing_start'],
268 'ending_time' => $time_targets[
'timing_end'],
269 'visibility' => $vis)
273 # if($type == self::TIMING_PRESETTING) 275 if ($time_targets[
'changeable'] or 1) {
278 array(
'starting_time' => $time_targets[
'suggestion_start'],
279 'ending_time' => $time_targets[
'suggestion_end'],
280 'changeable' => $time_targets[
'changeable'],
281 'earliest_start' => $time_targets[
'earliest_start'],
282 'latest_end' => $time_targets[
'latest_end'])
287 array(
'starting_time' => $time_targets[
'suggestion_start'],
288 'ending_time' => $time_targets[
'suggestion_end'],
289 'changeable' => $time_targets[
'changeable'])
307 include_once
'./Modules/File/classes/class.ilObjFileAccess.php';
312 $this->
xmlElement(
"Property",
array(
'name' =>
'fileExtension'), (
string) $extension);
324 global $ilAccess,$rbacreview,$objDefinition;
327 $ops = $rbacreview->getOperationsOnTypeString(
$a_type);
328 if (is_array($ops)) {
329 foreach ($ops as $ops_id) {
330 $operation = $rbacreview->getOperation($ops_id);
332 if (count($operation) && $ilAccess->checkAccessOfUser($this->getUserId(), $operation[
'operation'],
'view', $a_ref_id)) {
333 $this->
xmlElement(
'Operation', null, $operation[
'operation']);
342 $creation_operations =
array();
344 $ops_id = $ops_ids[
$type];
350 $operation = $rbacreview->getOperation($ops_id);
352 if (count($operation) && $ilAccess->checkAccessOfUser($this->getUserId(), $operation[
'operation'],
'view', $a_ref_id)) {
353 $this->
xmlElement(
'Operation', null, $operation[
'operation']);
368 $this->
xmlSetDtdDef(
"<!DOCTYPE Objects PUBLIC \"-//ILIAS//DTD ILIAS Repositoryobjects//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_object_4_0.dtd\">");
384 include_once
'Services/AccessControl/classes/class.ilAccess.php';
386 $ilAccess->checkAccessOfUser($this->
getUserId(),
'read',
'view', $ref_id, $object->getType(), $object->getId());
388 if (!
$info = $ilAccess->getInfo()) {
391 return $info[0][
'type'];
399 $items = $tree->getPathFull($refid);
400 $writer->xmlStartTag(
"Path");
401 foreach ($items as $item) {
402 if ($item[
"ref_id"] == $refid) {
405 if ($item[
"type"] ==
"root") {
406 $item[
"title"] = $lng->txt(
"repository");
408 $writer->xmlElement(
"Element",
array(
"ref_id" => $item[
"ref_id"],
"type" => $item[
"type"]), $item[
"title"]);
410 $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.
if(!array_key_exists('StateId', $_REQUEST)) $id
const TIMINGS_DEACTIVATED
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)
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
Create styles array
The data for the language used.
__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)
static _lookupVersion($a_id)
lookup version
enablePermissionCheck($a_status)