53 $ilUser = $DIC[
'ilUser'];
56 $this->user_id = $ilUser->getId();
59 public function setMode(
int $a_mode): void
61 $this->mode = $a_mode;
71 $this->highlighter = $a_highlighter;
81 $this->check_permission = $a_status;
91 $this->user_id = $a_id;
101 $this->enable_operations = $a_status;
111 $this->enable_references = $a_stat;
133 $ilAccess = $DIC[
'ilAccess'];
134 $objDefinition = $DIC[
'objDefinition'];
138 if (method_exists($object,
'getType') &&
140 $objDefinition->isRBACObject($object->getType()) &&
141 !$ilAccess->checkAccessOfUser(
149 $this->appendObject($object);
160 private function appendObject(
ilObject $object):
void 164 $tree = $DIC[
'tree'];
165 $rbacreview = $DIC[
'rbacreview'];
168 $objectDefinition = $DIC[
'objDefinition'];
171 if ($object->
getType() ===
"role" && $rbacreview->isRoleDeleted(
$id)) {
180 if ($objectDefinition->supportsOfflineHandling($object->
getType())) {
201 if (!$tree->isInTree($ref_id)) {
207 'parent_id' => $tree->getParentId($ref_id)
209 $attr[
'accessInfo'] = $this->
getAccessInfo($object, $ref_id);
228 $tree = $DIC[
'tree'];
230 if (!$tree->checkForParentType($a_ref_id,
'crs')) {
235 switch ($time_targets[
'timing_type']) {
237 $type = self::TIMING_TEMPORARILY_AVAILABLE;
240 $type = self::TIMING_PRESETTING;
244 $type = self::TIMING_DEACTIVATED;
248 $this->
xmlStartTag(
'TimeTarget', array(
'type' => $type));
250 $vis = (
int) $time_targets[
'visible'] === 0 ? self::TIMING_VISIBILITY_OFF : self::TIMING_VISIBILITY_ON;
253 array(
'starting_time' => $time_targets[
'timing_start'],
254 'ending_time' => $time_targets[
'timing_end'],
262 'starting_time' => $time_targets[
'suggestion_start'],
263 'ending_time' => $time_targets[
'suggestion_end'],
264 'changeable' => $time_targets[
'changeable']
277 $size = $obj->getFileSize();
278 $extension = $obj->getFileExtension();
280 $this->
xmlElement(
"Property", array(
'name' =>
'fileSize'), (
string) $size);
281 $this->
xmlElement(
"Property", array(
'name' =>
'fileExtension'), (
string) $extension);
284 array(
'name' =>
'fileVersion'),
285 (
string) $obj->getVersion()
296 $ilAccess = $DIC[
'ilAccess'];
297 $rbacreview = $DIC[
'rbacreview'];
298 $objDefinition = $DIC[
'objDefinition'];
301 $ops = $rbacreview->getOperationsOnTypeString($a_type);
302 if (is_array($ops)) {
303 foreach ($ops as $ops_id) {
304 $operation = $rbacreview->getOperation($ops_id);
306 if (count($operation) && $ilAccess->checkAccessOfUser(
308 $operation[
'operation'],
317 $objects = $objDefinition->getCreatableSubObjects($a_type);
319 $creation_operations = array();
320 foreach ($objects as $type =>
$info) {
321 $ops_id = $ops_ids[$type] ??
null;
327 $operation = $rbacreview->getOperation($ops_id);
329 if (count($operation) && $ilAccess->checkAccessOfUser(
331 $operation[
'operation'],
335 $this->
xmlElement(
'Operation', null, $operation[
'operation']);
343 self::appendPathToObject($this, $refid);
348 $this->
xmlSetDtdDef(
"<!DOCTYPE Objects PUBLIC \"-//ILIAS//DTD ILIAS Repositoryobjects//EN\" \"" . ILIAS_HTTP_PATH .
"/components/ILIAS/Export/xml/ilias_object_4_0.dtd\">");
363 $ilAccess = $DIC[
'ilAccess'];
365 $ilAccess->checkAccessOfUser($this->
getUserId(),
'read',
'view', $ref_id, $object->
getType(), $object->
getId());
367 if (!
$info = $ilAccess->getInfo()) {
371 return $info[0][
'type'];
378 $tree = $DIC[
'tree'];
380 $items = $tree->getPathFull($refid);
382 foreach ($items as $item) {
383 if ((
int) $item[
"ref_id"] === $refid) {
386 if ($item[
"type"] ===
"root") {
387 $item[
"title"] =
$lng->txt(
"repository");
389 $writer->
xmlElement(
"Element", array(
"ref_id" => $item[
"ref_id"],
"type" => $item[
"type"]), $item[
"title"]);
enableOperations(bool $a_status)
isPermissionCheckEnabled()
Parses result XML from lucene search highlight.
setHighlighter(ilLuceneHighlighterResultParser $a_highlighter)
const TIMING_VISIBILITY_OFF
static _getAllReferences(int $id)
get all reference ids for object ID
const TIMINGS_DEACTIVATED
xmlSetGenCmt(string $genCmt)
Sets generated comment.
getCreateDate()
Get create date in YYYY-MM-DD HH-MM-SS format.
getAccessInfo(ilObject $object, int $ref_id)
xmlEndTag(string $tag)
Writes an endtag.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static lookupCreateOperationIds(array $a_type_arr)
Lookup operation ids.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
const TIMING_TEMPORARILY_AVAILABLE
ilLuceneHighlighterResultParser $highlighter
appendOperations(int $a_ref_id, string $a_type)
xmlHeader()
Writes xml header.
const TIMING_VISIBILITY_ON
setObjects(array $objects)
static getItem(int $ref_id)
enablePermissionCheck(bool $a_status)
appendTimeTargets(int $a_ref_id)
Append time target settings for items inside of courses.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
appendObjectProperties(ilObject $obj)
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
getLastUpdateDate()
Get last update date in YYYY-MM-DD HH-MM-SS format.
xmlDumpMem(bool $format=true)
Returns xml document from memory.
static appendPathToObject(ilXmlWriter $writer, int $refid)
enableReferences(bool $a_stat)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...