19declare(strict_types=1);
43 'No import id given.',
50 $ilLog =
$DIC[
'ilLog'];
52 $ilLog->write(
"SOAP getObjIdByImportId(): import_id = " . $import_id .
' obj_id = ' . $obj_id);
53 return $obj_id ?:
"0";
69 'No import id given.',
76 $tree =
$DIC->repositoryTree();
102 'No object id given.',
109 foreach ($ref_ids as
$ref_id) {
127 if (!count($ref_ids)) {
128 return $this->
raiseError(
'No reference id(s) given.',
'Client');
132 foreach ($ref_ids as
$ref_id) {
135 return $this->
raiseError(
'Reference ID has to be numeric. Value: ' . $ref_id,
'Client');
140 return $this->
raiseError(
'No object found for reference ID. Value: ' . $ref_id,
'Client');
144 'No untrashed reference found for reference ID. Value: ' . $ref_id,
148 $obj_ids[] = $obj_id;
167 return $this->
raiseError(
'Cannot create object instance!',
'Server');
170 return $this->
raiseError(
"Object with ID $a_ref_id has been deleted.",
'Client');
174 $xml_writer->enablePermissionCheck(
true);
177 $xml_writer->enableOperations(
true);
179 $xml_writer->setObjects(array($tmp_obj));
180 if ($xml_writer->start()) {
181 return $xml_writer->getXML();
183 return $this->
raiseError(
'Cannot create object xml !',
'Server');
197 if ($a_title ===
'') {
199 'No valid query string given.',
204 $query_parser->setMinWordLength(0);
206 $query_parser->parse();
207 if (!$query_parser->validate()) {
209 $query_parser->getMessage(),
215 $object_search->setFields(array(
'title'));
216 $object_search->appendToFilter(
'role');
217 $object_search->appendToFilter(
'rolt');
218 $res = $object_search->performSearch();
226 foreach (
$res->getUniqueResults() as $entry) {
227 if ($entry[
'type'] ===
'role' || $entry[
'type'] ===
'rolt') {
242 $xml_writer->enablePermissionCheck(
true);
245 $xml_writer->enableOperations(
true);
247 $xml_writer->setObjects($objs);
248 if ($xml_writer->start()) {
249 return $xml_writer->getXML();
251 return $this->
raiseError(
'Cannot create object xml !',
'Server');
266 if ($combination !==
'and' && $combination !==
'or') {
268 'No valid combination given. Must be "and" or "or".',
277 $typeFilterQuery =
'';
278 if (is_array($types)) {
279 foreach ($types as $objectType) {
280 if ($typeFilterQuery ===
'') {
281 $typeFilterQuery .=
'+( ';
283 $typeFilterQuery .=
'OR';
285 $typeFilterQuery .= (
' type:' . $objectType .
' ');
287 $typeFilterQuery .=
') ';
291 $query_parser->parse();
297 $filter->setCandidates($searcher->getResult());
300 $result_ids = $filter->getResults();
303 foreach ($result_ids as
$ref_id => $obj_id) {
310 if ($filter->getResultObjIds()) {
311 $highlighter = $searcher->highlight($filter->getResultObjIds());
317 $query_parser->parse();
318 if (!$query_parser->validate()) {
320 $query_parser->getMessage(),
326 $object_search->setFilter($types);
327 $res = $object_search->performSearch();
331 $res->setMaxHits(100);
335 foreach (
$res->getUniqueResults() as $entry) {
349 $xml_writer->enableReferences(
false);
351 $xml_writer->setHighlighter($highlighter);
354 $xml_writer->enablePermissionCheck(
true);
358 $xml_writer->enableOperations(
true);
361 $xml_writer->setObjects($objs);
362 if ($xml_writer->start()) {
363 return $xml_writer->getXML();
366 return $this->
raiseError(
'Cannot create object xml !',
'Server');
385 $tree =
$DIC[
'tree'];
389 'No valid reference id given.',
395 'No valid reference id given.',
400 if (!is_array($types) || empty($types)) {
406 foreach ($tree->getChilds(
$ref_id,
'title') as $child) {
407 if ($all || in_array($child[
'type'], $types,
true)) {
415 $xml_writer->enablePermissionCheck(
true);
416 $xml_writer->setObjects($objs);
417 $xml_writer->enableOperations(
true);
422 if ($xml_writer->start()) {
423 return $xml_writer->getXML();
425 return $this->
raiseError(
'Cannot create object xml !',
'Server');
442 $tree =
$DIC[
'tree'];
443 $access =
$DIC[
'ilAccess'];
445 $nodedata = $tree->getNodeData(
$ref_id);
446 $nodearray = $tree->getSubTree($nodedata);
449 if (!is_array($types) || empty($types)) {
457 $objDefinition =
$DIC[
'objDefinition'];
459 foreach ($nodearray as $node) {
461 !$objDefinition->isAdministrationObject($node[
'type']) &&
462 !$objDefinition->isSystemObject($node[
'type']) &&
463 ($all || !in_array($node[
'type'], $filter,
true)) &&
464 $access->checkAccess(
"read",
"", (
int) $node[
'ref_id']) &&
472 $xml_writer->enablePermissionCheck(
true);
473 $xml_writer->setObjects($nodes);
474 $xml_writer->enableOperations(
false);
480 if ($xml_writer->start()) {
481 return $xml_writer->getXML();
484 return $this->
raiseError(
'Cannot create object xml !',
'Server');
490 public function addObject(
string $sid,
int $a_target_id,
string $a_xml)
500 'No valid xml string given.',
507 $rbacsystem =
$DIC[
'rbacsystem'];
508 $objDefinition =
$DIC[
'objDefinition'];
509 $ilUser =
$DIC[
'ilUser'];
511 $ilObjDataCache =
$DIC[
'ilObjDataCache'];
515 'No valid target given.',
521 return $this->
raiseError(
"Parent with ID $a_target_id has been deleted.",
'Client');
524 $allowed_types = array(
'root',
'cat',
'grp',
'crs',
'fold');
525 if (!in_array($target_obj->getType(), $allowed_types)) {
527 'No valid target type. Target must be reference id of "course, group, category or folder"',
532 $allowed_subtypes = $target_obj->getPossibleSubObjects();
534 foreach ($allowed_subtypes as $row) {
535 if ($row[
'name'] !==
'rolf') {
536 $allowed[] = $row[
'name'];
543 $xml_parser->startParsing();
545 return $this->
raiseError($se->getMessage(),
'Client');
547 return $this->
raiseError($e->getMessage(),
'Client');
551 foreach ($xml_parser->getObjectData() as $object_data) {
558 if (!in_array($object_data[
'type'], $allowed,
true)) {
560 'Objects of type: ' . $object_data[
'type'] .
' are not allowed to be subobjects of type ' .
561 $target_obj->getType() .
'!',
565 if (!$rbacsystem->checkAccess(
'create', $a_target_id, $object_data[
'type'])) {
567 'No permission to create objects of type ' . $object_data[
'type'] .
'!',
575 'An object with import id ' . $object_data[
'import_id'] .
' already exists!',
581 $class_name = $objDefinition->getClassName($object_data[
'type']);
582 $location = $objDefinition->getLocation($object_data[
'type']);
584 $class_constr =
"ilObj" . $class_name;
586 $newObj =
new $class_constr();
587 if (isset($object_data[
'owner']) && $object_data[
'owner'] !=
'') {
588 if ((
int) $object_data[
'owner']) {
591 $ilObjDataCache->lookupType((
int) $object_data[
'owner']) ===
'usr'
593 $newObj->setOwner((
int) $object_data[
'owner']);
598 $newObj->setOwner((
int) $usr_id);
603 $newObj->setType($object_data[
'type']);
604 if ($object_data[
'import_id'] !=
'') {
605 $newObj->setImportId($object_data[
'import_id']);
608 $newObj->setTitle($object_data[
'title']);
609 $newObj->setDescription($object_data[
'description']);
611 if ($objDefinition->supportsOfflineHandling($newObj->getType()) && isset($object_data[
'offline'])) {
612 $newObj->setOfflineStatus((
bool) $object_data[
'offline']);
615 $newObj->createReference();
616 $newObj->putInTree($a_target_id);
617 $newObj->setPermissions($a_target_id);
619 switch ($object_data[
'type']) {
623 $object_data[
'owner'] ?: $ilUser->getId(),
624 $newObj->getDefaultAdminRole()
632 $newObj->createLMTree();
636 $newObj->addTranslation(
637 $object_data[
"title"],
638 $object_data[
"description"],
657 public function addReference(
string $sid,
int $a_source_id,
int $a_target_id)
668 $objDefinition =
$DIC[
'objDefinition'];
669 $rbacsystem =
$DIC[
'rbacsystem'];
670 $tree =
$DIC[
'tree'];
674 'No valid source id given.',
680 'No valid target id given.',
686 !$objDefinition->allowLink($source_obj->getType()) and
687 $source_obj->getType() !==
'cat' and
688 $source_obj->getType() !==
'crs'
691 'Linking of object type: ' . $source_obj->getType() .
' is not allowed',
696 $allowed_subtypes = $target_obj->getPossibleSubObjects();
698 foreach ($allowed_subtypes as $row) {
699 if ($row[
'name'] !==
'rolf') {
700 $allowed[] = $row[
'name'];
703 if (!in_array($source_obj->getType(), $allowed,
true)) {
705 'Objects of type: ' . $source_obj->getType() .
' are not allowed to be subobjects of type ' .
706 $target_obj->getType() .
'!',
712 if (!$rbacsystem->checkAccess(
'create', $target_obj->getRefId(), $source_obj->getType())) {
714 'No permission to create objects of type ' . $source_obj->getType() .
'!',
718 if (!$rbacsystem->checkAccess(
'delete', $source_obj->getRefId())) {
720 'No permission to link object with id: ' . $source_obj->getRefId() .
'!',
725 if ($source_obj->getType() !==
'cat' and $source_obj->getType() !==
'crs') {
727 $possibleChilds = $tree->getChildsByType($target_obj->getRefId(), $source_obj->getType());
728 foreach ($possibleChilds as $child) {
729 if ((
int) $child[
"obj_id"] === $source_obj->getId()) {
730 return $this->
raiseError(
"Object already linked to target.",
"Client");
736 $new_ref_id = $source_obj->createReference();
737 $source_obj->putInTree($target_obj->getRefId());
738 $source_obj->setPermissions($target_obj->getRefId());
740 return $new_ref_id ?:
"0";
744 switch ($source_obj->getType()) {
757 $new_ref_id = $new_ref->createReference();
759 $new_ref->putInTree($target_obj->getRefId());
760 $new_ref->setPermissions($target_obj->getRefId());
762 $new_ref->setTargetId($source_obj->getId());
765 if (!$new_ref instanceof
ilObject) {
769 return $new_ref_id ?: 0;
786 $tree =
$DIC->repositoryTree();
787 $rbacsystem =
$DIC[
'rbacsystem'];
788 $rbacadmin =
$DIC[
'rbacadmin'];
789 $user =
$DIC->user();
793 'No valid reference id given.',
797 if (!$rbacsystem->checkAccess(
'delete', $del_obj->getRefId())) {
799 'No permission to delete object with id: ' . $del_obj->getRefId() .
'!',
804 if ($tree->isDeleted($reference_id)) {
805 return $this->
raiseError(
'Node already deleted',
'Server');
808 if ($del_obj->getType() ===
'rolf') {
809 return $this->
raiseError(
'Delete is not available for role folders.',
'Client');
812 $subnodes = $tree->getSubTree($tree->getNodeData($reference_id));
813 foreach ($subnodes as $subnode) {
814 $rbacadmin->revokePermission($subnode[
"child"]);
816 if (!$tree->moveToTrash($reference_id,
true, $user->getId())) {
817 return $this->
raiseError(
'Node already deleted',
'Client');
833 if ($import_id ===
'') {
835 'No import id given. Aborting!',
841 $rbacsystem =
$DIC[
'rbacsystem'];
842 $tree =
$DIC[
'tree'];
843 $ilLog =
$DIC[
'ilLog'];
848 'No object found with import id: ' . $import_id,
854 $permission_ok =
false;
856 if ($rbacsystem->checkAccess(
'delete',
$ref_id)) {
857 $permission_ok =
true;
861 if (!$permission_ok) {
863 'No permission to delete the object with import id: ' . $import_id,
869 foreach ($ref_ids as
$ref_id) {
871 $node_data = $tree->getNodeData(
$ref_id);
872 $subtree_nodes = $tree->getSubtree($node_data);
874 foreach ($subtree_nodes as $node) {
875 $ilLog->write(
'Soap: removeFromSystemByImportId(). Deleting object with title id: ' . $node[
'title']);
877 if (!is_object($tmp_obj)) {
879 'Cannot create instance of reference id: ' . $node[
'ref_id'],
886 $tree->deleteTree($node_data);
894 public function updateObjects(
string $sid,
string $a_xml)
904 'No valid xml string given.',
911 $rbacreview =
$DIC[
'rbacreview'];
912 $rbacsystem =
$DIC[
'rbacsystem'];
914 $ilAccess =
$DIC[
'ilAccess'];
915 $objDefinition =
$DIC[
'objDefinition'];
919 $xml_parser->startParsing();
921 return $this->
raiseError($se->getMessage(),
'Client');
923 return $this->
raiseError($e->getMessage(),
'Client');
927 $object_datas = $xml_parser->getObjectData();
928 foreach ($object_datas as &$object_data) {
934 if (!$object_data[
"obj_id"]) {
935 return $this->
raiseError(
'No obj_id in xml found.',
'Client');
936 } elseif ((
int) $object_data[
"obj_id"] === -1 && count($object_data[
"references"]) > 0) {
939 foreach ($object_data[
"references"] as $refid) {
947 if (!$obj_id_from_refid) {
949 'No obj_id found for reference id ' . $object_data[
"references"][0],
950 'CLIENT_OBJECT_NOT_FOUND'
955 $object_data[
"obj_id"] = $obj_id_from_refid;
959 if ($tmp_obj ===
null) {
961 'No object for id ' . $object_data[
'obj_id'] .
'!',
962 'CLIENT_OBJECT_NOT_FOUND'
966 $object_data[
"instance"] = $tmp_obj;
968 if ($object_data[
'type'] ===
'role') {
969 $rolf_ids = $rbacreview->getFoldersAssignedToRole($object_data[
'obj_id'],
true);
970 $rolf_id = $rolf_ids[0];
972 if (!$rbacsystem->checkAccess(
'write', $rolf_id)) {
974 'No write permission for object with id ' . $object_data[
'obj_id'] .
'!',
979 $permission_ok =
false;
981 if ($ilAccess->checkAccess(
'write',
'',
$ref_id)) {
982 $permission_ok =
true;
986 if (!$permission_ok) {
988 'No write permission for object with id ' . $object_data[
'obj_id'] .
'!',
997 if (count($object_datas) > 0) {
998 foreach ($object_datas as $object_data) {
1003 $tmp_obj = $object_data[
"instance"];
1004 $tmp_obj->setTitle($object_data[
'title']);
1005 $tmp_obj->setDescription($object_data[
'description']);
1007 if ($objDefinition->supportsOfflineHandling($tmp_obj->getType())) {
1008 $tmp_obj->setOfflineStatus($object_data[
'offline']);
1012 if ($object_data[
'owner'] !=
'' && is_numeric($object_data[
'owner'])) {
1013 $tmp_obj->setOwner($object_data[
'owner']);
1014 $tmp_obj->updateOwner();
1036 $rbacreview =
$DIC[
'rbacreview'];
1037 $rbacadmin =
$DIC[
'rbacadmin'];
1038 $objDefinition =
$DIC[
'objDefinition'];
1039 $rbacsystem =
$DIC[
'rbacsystem'];
1041 $ilUser =
$DIC[
'ilUser'];
1042 $tree =
$DIC[
'tree'];
1046 return $this->
raiseError(
'No valid source given.',
'Client');
1051 return $this->
raiseError(
'No valid target given.',
'Client');
1056 return $this->
raiseError(
'Object is trashed.',
'Client');
1060 return $this->
raiseError(
'Object is trashed.',
'Client');
1063 $canAddType = $this->
canAddType($source_object_type, $target_object_type, $target_id);
1064 if ($this->
isFault($canAddType)) {
1069 $possibleChilds = $tree->getChildsByType($target_id,
$ref_id);
1070 foreach ($possibleChilds as $child) {
1071 if ((
int) $child[
"obj_id"] ===
$ref_id) {
1072 return $this->
raiseError(
"Object already exists in target.",
"Client");
1077 if ($tree->isGrandChild(
$ref_id, $target_id)) {
1078 return $this->
raiseError(
"Cannot move object into itself.",
"Client");
1081 $old_parent = $tree->getParentId(
$ref_id);
1082 $tree->moveTree(
$ref_id, $target_id);
1083 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1092 public function copyObject(
string $sid,
string $copy_settings_xml)
1103 $rbacreview =
$DIC[
'rbacreview'];
1104 $objDefinition =
$DIC[
'objDefinition'];
1105 $rbacsystem =
$DIC[
'rbacsystem'];
1107 $ilUser =
$DIC[
'ilUser'];
1111 $xml_parser->startParsing();
1113 return $this->
raiseError($se->getMessage(),
"Client");
1117 if (!$rbacsystem->checkAccess(
'copy', $xml_parser->getSourceId())) {
1119 "Missing copy permissions for object with reference id " . $xml_parser->getSourceId(),
1125 $source_id = $xml_parser->getSourceId();
1126 $target_id = $xml_parser->getTargetId();
1130 return $this->
raiseError(
'No valid source given.',
'Client');
1135 return $this->
raiseError(
'No valid target given.',
'Client');
1138 $canAddType = $this->
canAddType($source_object_type, $target_object_type, $target_id);
1139 if ($this->
isFault($canAddType)) {
1144 $options = $xml_parser->getOptions();
1149 $clientid = substr($sid, strpos($sid,
"::") + 2);
1150 $sessionid = str_replace(
"::" . $clientid,
"", $sid);
1152 $ret = $source_object->cloneAllObject(
1155 $source_object_type,
1162 return $ret[
'ref_id'];
1168 $wizard_options->saveOwner($ilUser->getId());
1169 $wizard_options->saveRoot($source_id);
1171 foreach (
$options as $source_id => $option) {
1172 $wizard_options->addEntry($source_id, $option);
1174 $wizard_options->read();
1177 $newObject = $source_object->cloneObject($xml_parser->getTargetId(), $copy_id);
1178 return is_object($newObject) ? $newObject->getRefId() : -1;
1195 $ilAccess =
$DIC[
'ilAccess'];
1196 $objDefinition =
$DIC[
'objDefinition'];
1197 $rbacsystem =
$DIC[
'rbacsystem'];
1199 $ilUser =
$DIC[
'ilUser'];
1201 if (!$rbacsystem->checkAccess(
'read',
$ref_id)) {
1202 return $this->
raiseError(
"Missing read permissions for object with reference id " . $ref_id,
'Client');
1206 return $this->
raiseError(
"Object is in Trash",
'Client');
1210 $tree =
$DIC[
'tree'];
1212 $items = $tree->getPathFull(
$ref_id);
1215 $xmlResultSet->addColumn(
"ref_id");
1216 $xmlResultSet->addColumn(
"type");
1217 $xmlResultSet->addColumn(
"title");
1220 foreach ($items as $item) {
1221 if ((
int) $item[
"ref_id"] ===
$ref_id) {
1224 if ($item[
"title"] ===
"ILIAS" && $item[
"type"] ===
"root") {
1225 $item[
"title"] =
$lng->txt(
"repository");
1229 $xmlResultSet->addRow($row);
1230 $row->setValue(
"ref_id", $item[
"ref_id"]);
1231 $row->setValue(
"type", $item[
"type"]);
1232 $row->setValue(
"title", $item[
"title"]);
1235 return $writer->getXML();
1238 private function canAddType(
string $type,
string $target_type,
int $target_id)
1243 $objDefinition =
$DIC[
'objDefinition'];
1244 $rbacsystem =
$DIC[
'rbacsystem'];
1246 $allowed_types = array(
'root',
'cat',
'grp',
'crs',
'fold');
1247 if (!in_array($target_type, $allowed_types,
true)) {
1249 'No valid target type. Target must be reference id of "course, group, category or folder"',
1254 $allowed_subtypes = $objDefinition->getSubObjects($target_type);
1257 foreach ($allowed_subtypes as $row) {
1258 if ($row[
'name'] !==
'rolf') {
1259 $allowed[] = $row[
'name'];
1263 if (!in_array($type, $allowed,
true)) {
1265 'Objects of type: ' . $type .
' are not allowed to be subobjects of type ' . $target_type .
'!',
1269 if (!$rbacsystem->checkAccess(
'create', $target_id, $type)) {
1270 return $this->
raiseError(
'No permission to create objects of type ' . $type .
'!',
'Client');
1280 $ilAccess =
$DIC[
'ilAccess'];
1282 if (!isset($a_object_data[
'references']) || !count($a_object_data[
'references'])) {
1285 if ($a_action ===
'create') {
1287 count($a_object_data[
'references']) > 1 && in_array(
1288 $a_object_data[
'type'],
1289 [
'cat',
'crs',
'grp',
'fold'],
1294 "Cannot create references for type " . $a_object_data[
'type'],
1298 if (count($a_object_data[
'references']) === 1 && $a_target_id != $a_object_data[
'references'][0][
'parent_id']) {
1300 "Cannot create references for type " . $a_object_data[
'type'],
1305 foreach ($a_object_data[
'references'] as $ref_data) {
1306 if (!$ref_data[
'parent_id']) {
1307 return $this->
raiseError(
'Element References: No parent Id given!',
'Client');
1311 $can_add_type = $this->
canAddType($a_object_data[
'type'], $target_type, $ref_data[
'parent_id']);
1312 if ($this->
isFault($can_add_type)) {
1313 return $can_add_type;
1319 if ($a_action ===
'update') {
1320 foreach ($a_object_data[
'references'] as $ref_data) {
1321 if (!$ref_data[
'ref_id']) {
1322 return $this->
raiseError(
'Element References: No reference id given!',
'Client');
1325 if (!$ilAccess->checkAccess(
'write',
'', $ref_data[
'ref_id'])) {
1327 'No write permission for object with reference id ' . $ref_data[
'ref_id'] .
'!',
1342 $tree =
$DIC[
'tree'];
1343 $ilLog =
$DIC[
'ilLog'];
1345 if (!isset($a_object_data[
'references']) || !count($a_object_data[
'references'])) {
1349 foreach ($a_object_data[
'references'] as $ref_data) {
1350 if (isset($ref_data[
'time_target'])) {
1354 $items->toggleChangeable($ref_data[
'time_target'][
'changeable'] ?? $old[
'changeable']);
1355 $items->setTimingStart($ref_data[
'time_target'][
'starting_time'] ?? $old[
'timing_start']);
1356 $items->setTimingEnd($ref_data[
'time_target'][
'ending_time'] ?? $old[
'timing_end']);
1357 $items->toggleVisible($ref_data[
'time_target'][
'timing_visibility'] ?? $old[
'visible']);
1358 $items->setSuggestionStart($ref_data[
'time_target'][
'suggestion_start'] ?? $old[
'suggestion_start']);
1359 $items->setSuggestionEnd($ref_data[
'time_target'][
'suggestion_end'] ?? $old[
'suggestion_end']);
1361 switch ($ref_data[
'time_target'][
'timing_type']) {
1377 $items->update($ref_data[
'ref_id']);
1386 $tree =
$DIC->repositoryTree();
1387 $ilLog =
$DIC[
'ilLog'];
1389 if (!isset($a_object_data[
'references']) || !count($a_object_data[
'references'])) {
1393 $original_id = $source->
getRefId();
1395 foreach ($a_object_data[
'references'] as $ref_data) {
1396 $new_ref_id = $original_id;
1397 if ($tree->getParentId($original_id) !== (
int) $ref_data[
'parent_id']) {
1400 $source->
putInTree($ref_data[
'parent_id']);
1403 if (isset($ref_data[
'time_target']) ) {
1404 if (!isset($ref_data[
'time_target'][
'starting_time'])) {
1405 $ref_data[
'time_target'][
'starting_time'] = time();
1407 if (!isset($ref_data[
'time_target'][
'ending_time'])) {
1408 $ref_data[
'time_target'][
'ending_time'] = time();
1412 $items->toggleChangeable($ref_data[
'time_target'][
'changeable']);
1413 $items->setTimingStart($ref_data[
'time_target'][
'starting_time']);
1414 $items->setTimingEnd($ref_data[
'time_target'][
'ending_time']);
1415 $items->toggleVisible($ref_data[
'time_target'][
'timing_visibility']);
1416 $items->setSuggestionStart($ref_data[
'time_target'][
'suggestion_start']);
1417 $items->setSuggestionEnd($ref_data[
'time_target'][
'suggestion_end']);
1419 switch ($ref_data[
'time_target'][
'timing_type']) {
1435 $items->update($new_ref_id);
static _adjustMovedObjectConditions(int $a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
static _allocateCopyId()
Allocate a copy for further entries.
static _getInstance(int $a_copy_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Parses result XML from lucene search highlight.
static getInstance(int $a_user_id)
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupId(string|array $a_user_str)
Class ilObjectActivation.
const TIMINGS_DEACTIVATED
static getItem(int $ref_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static getTypeByRefId(int $ref_id, bool $stop_on_error=true)
get object type by reference id
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TIMING_TEMPORARILY_AVAILABLE
Class ilObject Basic functions for all objects.
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
setPermissions(int $parent_ref_id)
createReference()
creates reference for object
putInTree(int $parent_ref_id)
maybe this method should be in tree object!?
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
static _getAllReferences(int $id)
get all reference ids for object ID
static _isInTrash(int $ref_id)
static _lookupObjIdByImportId(string $import_id)
Get (latest) object id for an import id.
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
raiseError(string $a_message, $a_code)
checkSession(string $sid)
addReferences(ilObject $source, array $a_object_data)
getObjectsByTitle(string $sid, string $a_title, ?int $user_id=null)
addReference(string $sid, int $a_source_id, int $a_target_id)
validateReferences(string $a_action, array $a_object_data, int $a_target_id=0)
copyObject(string $sid, string $copy_settings_xml)
getRefIdsByObjId(string $sid, int $obj_id)
removeFromSystemByImportId(string $sid, string $import_id)
getRefIdsByImportId(string $sid, string $import_id)
deleteObject(string $sid, int $reference_id)
updateReferences(array $a_object_data)
getPathForRefId(string $sid, int $ref_id)
moveObject(string $sid, int $ref_id, int $target_id)
canAddType(string $type, string $target_type, int $target_id)
getObjIdByImportId(string $sid, string $import_id)
searchObjects(string $sid, ?array $types, string $key, string $combination, ?int $user_id=null)
getTreeChilds(string $sid, int $ref_id, ?array $types=null, ?int $user_id=null)
getXMLTree(string $sid, int $ref_id, ?array $types=null, ?int $user_id=null)
getObjIdsByRefIds(string $sid, array $ref_ids)
getObjectByReference(string $sid, int $a_ref_id, ?int $user_id=null)
Row Class for XMLResultSet.
XML Writer for XMLResultSet.