47 'No import id given.',
54 $ilLog = $DIC[
'ilLog'];
56 $ilLog->write(
"SOAP getObjIdByImportId(): import_id = " . $import_id .
' obj_id = ' . $obj_id);
57 return $obj_id ?:
"0";
73 'No import id given.',
80 $tree = $DIC->repositoryTree();
86 if ($tree->isInTree($ref_id)) {
106 'No object id given.',
113 foreach ($ref_ids as
$ref_id) {
131 if (!count($ref_ids)) {
132 return $this->
raiseError(
'No reference id(s) given.',
'Client');
136 foreach ($ref_ids as
$ref_id) {
137 $ref_id = trim($ref_id);
138 if (!is_numeric($ref_id)) {
139 return $this->
raiseError(
'Reference ID has to be numeric. Value: ' . $ref_id,
'Client');
144 return $this->
raiseError(
'No object found for reference ID. Value: ' . $ref_id,
'Client');
148 'No untrashed reference found for reference ID. Value: ' . $ref_id,
152 $obj_ids[] = $obj_id;
171 return $this->
raiseError(
'Cannot create object instance!',
'Server');
174 return $this->
raiseError(
"Object with ID $a_ref_id has been deleted.",
'Client');
178 $xml_writer->enablePermissionCheck(
true);
181 $xml_writer->enableOperations(
true);
183 $xml_writer->setObjects(array($tmp_obj));
184 if ($xml_writer->start()) {
185 return $xml_writer->getXML();
187 return $this->
raiseError(
'Cannot create object xml !',
'Server');
201 if ($a_title ===
'') {
203 'No valid query string given.',
208 $query_parser->setMinWordLength(0);
210 $query_parser->parse();
211 if (!$query_parser->validate()) {
213 $query_parser->getMessage(),
219 $object_search->setFields(array(
'title'));
220 $object_search->appendToFilter(
'role');
221 $object_search->appendToFilter(
'rolt');
222 $res = $object_search->performSearch();
230 foreach (
$res->getUniqueResults() as $entry) {
231 if ($entry[
'type'] ===
'role' || $entry[
'type'] ===
'rolt') {
246 $xml_writer->enablePermissionCheck(
true);
249 $xml_writer->enableOperations(
true);
251 $xml_writer->setObjects($objs);
252 if ($xml_writer->start()) {
253 return $xml_writer->getXML();
255 return $this->
raiseError(
'Cannot create object xml !',
'Server');
270 if ($combination !==
'and' && $combination !==
'or') {
272 'No valid combination given. Must be "and" or "or".',
281 $typeFilterQuery =
'';
282 if (is_array($types)) {
283 foreach ($types as $objectType) {
284 if ($typeFilterQuery ===
'') {
285 $typeFilterQuery .=
'+( ';
287 $typeFilterQuery .=
'OR';
289 $typeFilterQuery .= (
' type:' . $objectType .
' ');
291 $typeFilterQuery .=
') ';
295 $query_parser->parse();
301 $filter->setCandidates($searcher->getResult());
304 $result_ids = $filter->getResults();
307 foreach ($result_ids as
$ref_id => $obj_id) {
314 if ($filter->getResultObjIds()) {
315 $highlighter = $searcher->highlight($filter->getResultObjIds());
321 $query_parser->parse();
322 if (!$query_parser->validate()) {
324 $query_parser->getMessage(),
330 $object_search->setFilter($types);
331 $res = $object_search->performSearch();
335 $res->setMaxHits(100);
339 foreach (
$res->getUniqueResults() as $entry) {
353 $xml_writer->enableReferences(
false);
355 $xml_writer->setHighlighter($highlighter);
358 $xml_writer->enablePermissionCheck(
true);
362 $xml_writer->enableOperations(
true);
365 $xml_writer->setObjects($objs);
366 if ($xml_writer->start()) {
367 return $xml_writer->getXML();
370 return $this->
raiseError(
'Cannot create object xml !',
'Server');
389 $tree = $DIC[
'tree'];
393 'No valid reference id given.',
399 'No valid reference id given.',
404 if (!is_array($types) || empty($types)) {
410 foreach ($tree->getChilds($ref_id,
'title') as $child) {
411 if ($all || in_array($child[
'type'], $types,
true)) {
419 $xml_writer->enablePermissionCheck(
true);
420 $xml_writer->setObjects($objs);
421 $xml_writer->enableOperations(
true);
426 if ($xml_writer->start()) {
427 return $xml_writer->getXML();
429 return $this->
raiseError(
'Cannot create object xml !',
'Server');
446 $tree = $DIC[
'tree'];
447 $access = $DIC[
'ilAccess'];
449 $nodedata = $tree->getNodeData($ref_id);
450 $nodearray = $tree->getSubTree($nodedata);
453 if (!is_array($types) || empty($types)) {
461 $objDefinition = $DIC[
'objDefinition'];
463 foreach ($nodearray as $node) {
465 !$objDefinition->isAdministrationObject($node[
'type']) &&
466 !$objDefinition->isSystemObject($node[
'type']) &&
467 ($all || !in_array($node[
'type'], $filter,
true)) &&
468 $access->checkAccess(
"read",
"", (
int) $node[
'ref_id']) &&
475 $xml_writer->enablePermissionCheck(
true);
476 $xml_writer->setObjects($nodes);
477 $xml_writer->enableOperations(
false);
483 if ($xml_writer->start()) {
484 return $xml_writer->getXML();
487 return $this->
raiseError(
'Cannot create object xml !',
'Server');
493 public function addObject(
string $sid,
int $a_target_id,
string $a_xml)
503 'No valid xml string given.',
510 $rbacsystem = $DIC[
'rbacsystem'];
511 $objDefinition = $DIC[
'objDefinition'];
512 $ilUser = $DIC[
'ilUser'];
514 $ilObjDataCache = $DIC[
'ilObjDataCache'];
518 'No valid target given.',
524 return $this->
raiseError(
"Parent with ID $a_target_id has been deleted.",
'Client');
527 $allowed_types = array(
'root',
'cat',
'grp',
'crs',
'fold');
528 if (!in_array($target_obj->getType(), $allowed_types)) {
530 'No valid target type. Target must be reference id of "course, group, category or folder"',
535 $allowed_subtypes = $target_obj->getPossibleSubObjects();
537 foreach ($allowed_subtypes as $row) {
538 if ($row[
'name'] !==
'rolf') {
539 $allowed[] = $row[
'name'];
546 $xml_parser->startParsing();
548 return $this->
raiseError($se->getMessage(),
'Client');
550 return $this->
raiseError($e->getMessage(),
'Client');
554 foreach ($xml_parser->getObjectData() as $object_data) {
561 if (!in_array($object_data[
'type'], $allowed,
true)) {
563 'Objects of type: ' . $object_data[
'type'] .
' are not allowed to be subobjects of type ' .
564 $target_obj->getType() .
'!',
568 if (!$rbacsystem->checkAccess(
'create', $a_target_id, $object_data[
'type'])) {
570 'No permission to create objects of type ' . $object_data[
'type'] .
'!',
578 'An object with import id ' . $object_data[
'import_id'] .
' already exists!',
584 $class_name = $objDefinition->getClassName($object_data[
'type']);
585 $location = $objDefinition->getLocation($object_data[
'type']);
587 $class_constr =
"ilObj" . $class_name;
589 $newObj =
new $class_constr();
590 if (isset($object_data[
'owner']) && $object_data[
'owner'] !=
'') {
591 if ((
int) $object_data[
'owner']) {
593 $ilObjDataCache->lookupType((
int) $object_data[
'owner']) ===
'usr') {
594 $newObj->setOwner((
int) $object_data[
'owner']);
599 $newObj->setOwner((
int) $usr_id);
604 $newObj->setType($object_data[
'type']);
605 if ($object_data[
'import_id'] !=
'') {
606 $newObj->setImportId($object_data[
'import_id']);
609 if ($objDefinition->supportsOfflineHandling($newObj->getType())) {
610 $newObj->setOfflineStatus((
bool) $object_data[
'offline']);
612 $newObj->setTitle($object_data[
'title']);
613 $newObj->setDescription($object_data[
'description']);
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.',
685 if (!$objDefinition->allowLink($source_obj->getType()) and
686 $source_obj->getType() !==
'cat' and
687 $source_obj->getType() !==
'crs') {
689 'Linking of object type: ' . $source_obj->getType() .
' is not allowed',
694 $allowed_subtypes = $target_obj->getPossibleSubObjects();
696 foreach ($allowed_subtypes as $row) {
697 if ($row[
'name'] !==
'rolf') {
698 $allowed[] = $row[
'name'];
701 if (!in_array($source_obj->getType(), $allowed,
true)) {
703 'Objects of type: ' . $source_obj->getType() .
' are not allowed to be subobjects of type ' .
704 $target_obj->getType() .
'!',
710 if (!$rbacsystem->checkAccess(
'create', $target_obj->getRefId(), $source_obj->getType())) {
712 'No permission to create objects of type ' . $source_obj->getType() .
'!',
716 if (!$rbacsystem->checkAccess(
'delete', $source_obj->getRefId())) {
718 'No permission to link object with id: ' . $source_obj->getRefId() .
'!',
723 if ($source_obj->getType() !==
'cat' and $source_obj->getType() !==
'crs') {
725 $possibleChilds = $tree->getChildsByType($target_obj->getRefId(), $source_obj->getType());
726 foreach ($possibleChilds as $child) {
727 if ((
int) $child[
"obj_id"] === $source_obj->getId()) {
728 return $this->
raiseError(
"Object already linked to target.",
"Client");
734 $new_ref_id = $source_obj->createReference();
735 $source_obj->putInTree($target_obj->getRefId());
736 $source_obj->setPermissions($target_obj->getRefId());
738 return $new_ref_id ?:
"0";
742 switch ($source_obj->getType()) {
755 $new_ref_id = $new_ref->createReference();
757 $new_ref->putInTree($target_obj->getRefId());
758 $new_ref->setPermissions($target_obj->getRefId());
760 $new_ref->setTargetId($source_obj->getId());
763 if (!$new_ref instanceof
ilObject) {
767 return $new_ref_id ?: 0;
784 $tree = $DIC->repositoryTree();
785 $rbacsystem = $DIC[
'rbacsystem'];
786 $rbacadmin = $DIC[
'rbacadmin'];
787 $user = $DIC->user();
791 'No valid reference id given.',
795 if (!$rbacsystem->checkAccess(
'delete', $del_obj->getRefId())) {
797 'No permission to delete object with id: ' . $del_obj->getRefId() .
'!',
802 if ($tree->isDeleted($reference_id)) {
803 return $this->
raiseError(
'Node already deleted',
'Server');
806 if ($del_obj->getType() ===
'rolf') {
807 return $this->
raiseError(
'Delete is not available for role folders.',
'Client');
810 $subnodes = $tree->getSubTree($tree->getNodeData($reference_id));
811 foreach ($subnodes as $subnode) {
812 $rbacadmin->revokePermission($subnode[
"child"]);
814 if (!$tree->moveToTrash($reference_id,
true, $user->getId())) {
815 return $this->
raiseError(
'Node already deleted',
'Client');
831 if ($import_id ===
'') {
833 'No import id given. Aborting!',
839 $rbacsystem = $DIC[
'rbacsystem'];
840 $tree = $DIC[
'tree'];
841 $ilLog = $DIC[
'ilLog'];
846 'No object found with import id: ' . $import_id,
852 $permission_ok =
false;
854 if ($rbacsystem->checkAccess(
'delete', $ref_id)) {
855 $permission_ok =
true;
859 if (!$permission_ok) {
861 'No permission to delete the object with import id: ' . $import_id,
867 foreach ($ref_ids as $ref_id) {
869 $node_data = $tree->getNodeData($ref_id);
870 $subtree_nodes = $tree->getSubtree($node_data);
872 foreach ($subtree_nodes as $node) {
873 $ilLog->write(
'Soap: removeFromSystemByImportId(). Deleting object with title id: ' . $node[
'title']);
875 if (!is_object($tmp_obj)) {
877 'Cannot create instance of reference id: ' . $node[
'ref_id'],
884 $tree->deleteTree($node_data);
892 public function updateObjects(
string $sid,
string $a_xml)
902 'No valid xml string given.',
909 $rbacreview = $DIC[
'rbacreview'];
910 $rbacsystem = $DIC[
'rbacsystem'];
912 $ilAccess = $DIC[
'ilAccess'];
913 $objDefinition = $DIC[
'objDefinition'];
917 $xml_parser->startParsing();
919 return $this->
raiseError($se->getMessage(),
'Client');
921 return $this->
raiseError($e->getMessage(),
'Client');
925 $object_datas = $xml_parser->getObjectData();
926 foreach ($object_datas as &$object_data) {
932 if (!$object_data[
"obj_id"]) {
933 return $this->
raiseError(
'No obj_id in xml found.',
'Client');
934 } elseif ((
int) $object_data[
"obj_id"] === -1 && count($object_data[
"references"]) > 0) {
937 foreach ($object_data[
"references"] as $refid) {
945 if (!$obj_id_from_refid) {
947 'No obj_id found for reference id ' . $object_data[
"references"][0],
948 'CLIENT_OBJECT_NOT_FOUND' 953 $object_data[
"obj_id"] = $obj_id_from_refid;
957 if ($tmp_obj === null) {
959 'No object for id ' . $object_data[
'obj_id'] .
'!',
960 'CLIENT_OBJECT_NOT_FOUND' 964 $object_data[
"instance"] = $tmp_obj;
966 if ($object_data[
'type'] ===
'role') {
967 $rolf_ids = $rbacreview->getFoldersAssignedToRole($object_data[
'obj_id'],
true);
968 $rolf_id = $rolf_ids[0];
970 if (!$rbacsystem->checkAccess(
'write', $rolf_id)) {
972 'No write permission for object with id ' . $object_data[
'obj_id'] .
'!',
977 $permission_ok =
false;
979 if ($ilAccess->checkAccess(
'write',
'', $ref_id)) {
980 $permission_ok =
true;
984 if (!$permission_ok) {
986 'No write permission for object with id ' . $object_data[
'obj_id'] .
'!',
995 if (count($object_datas) > 0) {
996 foreach ($object_datas as $object_data) {
1001 $tmp_obj = $object_data[
"instance"];
1002 $tmp_obj->setTitle($object_data[
'title']);
1003 $tmp_obj->setDescription($object_data[
'description']);
1005 if ($objDefinition->supportsOfflineHandling($tmp_obj->getType())) {
1006 $tmp_obj->setOfflineStatus($object_data[
'offline']);
1010 if ($object_data[
'owner'] !=
'' && is_numeric($object_data[
'owner'])) {
1011 $tmp_obj->setOwner($object_data[
'owner']);
1012 $tmp_obj->updateOwner();
1034 $rbacreview = $DIC[
'rbacreview'];
1035 $rbacadmin = $DIC[
'rbacadmin'];
1036 $objDefinition = $DIC[
'objDefinition'];
1037 $rbacsystem = $DIC[
'rbacsystem'];
1039 $ilUser = $DIC[
'ilUser'];
1040 $tree = $DIC[
'tree'];
1044 return $this->
raiseError(
'No valid source given.',
'Client');
1049 return $this->
raiseError(
'No valid target given.',
'Client');
1054 return $this->
raiseError(
'Object is trashed.',
'Client');
1058 return $this->
raiseError(
'Object is trashed.',
'Client');
1061 $canAddType = $this->
canAddType($source_object_type, $target_object_type, $target_id);
1062 if ($this->
isFault($canAddType)) {
1067 $possibleChilds = $tree->getChildsByType($target_id, $ref_id);
1068 foreach ($possibleChilds as $child) {
1069 if ((
int) $child[
"obj_id"] === $ref_id) {
1070 return $this->
raiseError(
"Object already exists in target.",
"Client");
1075 if ($tree->isGrandChild($ref_id, $target_id)) {
1076 return $this->
raiseError(
"Cannot move object into itself.",
"Client");
1079 $old_parent = $tree->getParentId($ref_id);
1080 $tree->moveTree($ref_id, $target_id);
1081 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1090 public function copyObject(
string $sid,
string $copy_settings_xml)
1101 $rbacreview = $DIC[
'rbacreview'];
1102 $objDefinition = $DIC[
'objDefinition'];
1103 $rbacsystem = $DIC[
'rbacsystem'];
1105 $ilUser = $DIC[
'ilUser'];
1109 $xml_parser->startParsing();
1111 return $this->
raiseError($se->getMessage(),
"Client");
1115 if (!$rbacsystem->checkAccess(
'copy', $xml_parser->getSourceId())) {
1117 "Missing copy permissions for object with reference id " . $xml_parser->getSourceId(),
1123 $source_id = $xml_parser->getSourceId();
1124 $target_id = $xml_parser->getTargetId();
1128 return $this->
raiseError(
'No valid source given.',
'Client');
1133 return $this->
raiseError(
'No valid target given.',
'Client');
1136 $canAddType = $this->
canAddType($source_object_type, $target_object_type, $target_id);
1137 if ($this->
isFault($canAddType)) {
1142 $options = $xml_parser->getOptions();
1147 $clientid = substr($sid, strpos($sid,
"::") + 2);
1148 $sessionid = str_replace(
"::" . $clientid,
"", $sid);
1150 $ret = $source_object->cloneAllObject(
1153 $source_object_type,
1160 return $ret[
'ref_id'];
1166 $wizard_options->saveOwner($ilUser->getId());
1167 $wizard_options->saveRoot($source_id);
1169 foreach ($options as $source_id => $option) {
1170 $wizard_options->addEntry($source_id, $option);
1172 $wizard_options->read();
1175 $newObject = $source_object->cloneObject($xml_parser->getTargetId(), $copy_id);
1176 return is_object($newObject) ? $newObject->getRefId() : -1;
1193 $ilAccess = $DIC[
'ilAccess'];
1194 $objDefinition = $DIC[
'objDefinition'];
1195 $rbacsystem = $DIC[
'rbacsystem'];
1197 $ilUser = $DIC[
'ilUser'];
1199 if (!$rbacsystem->checkAccess(
'read', $ref_id)) {
1200 return $this->
raiseError(
"Missing read permissions for object with reference id " . $ref_id,
'Client');
1204 return $this->
raiseError(
"Object is in Trash",
'Client');
1208 $tree = $DIC[
'tree'];
1210 $items = $tree->getPathFull($ref_id);
1213 $xmlResultSet->addColumn(
"ref_id");
1214 $xmlResultSet->addColumn(
"type");
1215 $xmlResultSet->addColumn(
"title");
1218 foreach ($items as $item) {
1219 if ((
int) $item[
"ref_id"] === $ref_id) {
1222 if ($item[
"title"] ===
"ILIAS" && $item[
"type"] ===
"root") {
1223 $item[
"title"] =
$lng->txt(
"repository");
1227 $xmlResultSet->addRow($row);
1228 $row->setValue(
"ref_id", $item[
"ref_id"]);
1229 $row->setValue(
"type", $item[
"type"]);
1230 $row->setValue(
"title", $item[
"title"]);
1233 return $writer->getXML();
1236 private function canAddType(
string $type,
string $target_type,
int $target_id)
1241 $objDefinition = $DIC[
'objDefinition'];
1242 $rbacsystem = $DIC[
'rbacsystem'];
1244 $allowed_types = array(
'root',
'cat',
'grp',
'crs',
'fold');
1245 if (!in_array($target_type, $allowed_types,
true)) {
1247 'No valid target type. Target must be reference id of "course, group, category or folder"',
1252 $allowed_subtypes = $objDefinition->getSubObjects($target_type);
1255 foreach ($allowed_subtypes as $row) {
1256 if ($row[
'name'] !==
'rolf') {
1257 $allowed[] = $row[
'name'];
1261 if (!in_array($type, $allowed,
true)) {
1263 'Objects of type: ' . $type .
' are not allowed to be subobjects of type ' . $target_type .
'!',
1267 if (!$rbacsystem->checkAccess(
'create', $target_id, $type)) {
1268 return $this->
raiseError(
'No permission to create objects of type ' . $type .
'!',
'Client');
1278 $ilAccess = $DIC[
'ilAccess'];
1280 if (!isset($a_object_data[
'references']) || !count($a_object_data[
'references'])) {
1283 if ($a_action ===
'create') {
1284 if (count($a_object_data[
'references']) > 1 && in_array(
1285 $a_object_data[
'type'],
1286 [
'cat',
'crs',
'grp',
'fold'],
1290 "Cannot create references for type " . $a_object_data[
'type'],
1294 if (count($a_object_data[
'references']) === 1 && $a_target_id != $a_object_data[
'references'][0][
'parent_id']) {
1296 "Cannot create references for type " . $a_object_data[
'type'],
1301 foreach ($a_object_data[
'references'] as $ref_data) {
1302 if (!$ref_data[
'parent_id']) {
1303 return $this->
raiseError(
'Element References: No parent Id given!',
'Client');
1307 $can_add_type = $this->
canAddType($a_object_data[
'type'], $target_type, $ref_data[
'parent_id']);
1308 if ($this->
isFault($can_add_type)) {
1309 return $can_add_type;
1315 if ($a_action ===
'update') {
1316 foreach ($a_object_data[
'references'] as $ref_data) {
1317 if (!$ref_data[
'ref_id']) {
1318 return $this->
raiseError(
'Element References: No reference id given!',
'Client');
1321 if (!$ilAccess->checkAccess(
'write',
'', $ref_data[
'ref_id'])) {
1323 'No write permission for object with reference id ' . $ref_data[
'ref_id'] .
'!',
1338 $tree = $DIC[
'tree'];
1339 $ilLog = $DIC[
'ilLog'];
1341 if (!isset($a_object_data[
'references']) || !count($a_object_data[
'references'])) {
1345 foreach ($a_object_data[
'references'] as $ref_data) {
1346 if (isset($ref_data[
'time_target'])) {
1350 $items->toggleChangeable($ref_data[
'time_target'][
'changeable'] ?? $old[
'changeable']);
1351 $items->setTimingStart($ref_data[
'time_target'][
'starting_time'] ?? $old[
'timing_start']);
1352 $items->setTimingEnd($ref_data[
'time_target'][
'ending_time'] ?? $old[
'timing_end']);
1353 $items->toggleVisible($ref_data[
'time_target'][
'timing_visibility'] ?? $old[
'visible']);
1354 $items->setSuggestionStart($ref_data[
'time_target'][
'suggestion_start'] ?? $old[
'suggestion_start']);
1355 $items->setSuggestionEnd($ref_data[
'time_target'][
'suggestion_end'] ?? $old[
'suggestion_end']);
1357 switch ($ref_data[
'time_target'][
'timing_type']) {
1373 $items->update($ref_data[
'ref_id']);
1382 $tree = $DIC->repositoryTree();
1383 $ilLog = $DIC[
'ilLog'];
1385 if (!isset($a_object_data[
'references']) || !count($a_object_data[
'references'])) {
1389 $original_id = $source->
getRefId();
1391 foreach ($a_object_data[
'references'] as $ref_data) {
1392 $new_ref_id = $original_id;
1393 if ($tree->getParentId($original_id) !== (
int) $ref_data[
'parent_id']) {
1396 $source->
putInTree($ref_data[
'parent_id']);
1399 if (isset($ref_data[
'time_target']) ) {
1400 if (!isset($ref_data[
'time_target'][
'starting_time'])) {
1401 $ref_data[
'time_target'][
'starting_time'] = time();
1403 if (!isset($ref_data[
'time_target'][
'ending_time'])) {
1404 $ref_data[
'time_target'][
'ending_time'] = time();
1408 $items->toggleChangeable($ref_data[
'time_target'][
'changeable']);
1409 $items->setTimingStart($ref_data[
'time_target'][
'starting_time']);
1410 $items->setTimingEnd($ref_data[
'time_target'][
'ending_time']);
1411 $items->toggleVisible($ref_data[
'time_target'][
'timing_visibility']);
1412 $items->setSuggestionStart($ref_data[
'time_target'][
'suggestion_start']);
1413 $items->setSuggestionEnd($ref_data[
'time_target'][
'suggestion_end']);
1415 switch ($ref_data[
'time_target'][
'timing_type']) {
1431 $items->update($new_ref_id);
static _lookupObjIdByImportId(string $import_id)
Get (latest) object id for an import id.
XML Writer for XMLResultSet.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAllReferences(int $id)
get all reference ids for object ID
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance.
getRefIdsByImportId(string $sid, string $import_id)
getObjIdByImportId(string $sid, string $import_id)
raiseError(string $a_message, $a_code)
const TIMINGS_DEACTIVATED
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
Row Class for XMLResultSet.
static _lookupId($a_user_str)
SaxParserException thrown by ilSaxParser if property throwException is set.
getXMLTree(string $sid, int $ref_id, ?array $types=null, ?int $user_id=null)
setPermissions(int $parent_ref_id)
Exception class for ObjectXMLWriter and ObjectXMLParser.
updateReferences(array $a_object_data)
getPathForRefId(string $sid, int $ref_id)
static getTypeByRefId(int $ref_id, bool $stop_on_error=true)
get object type by reference id
searchObjects(string $sid, ?array $types, string $key, string $combination, ?int $user_id=null)
static _lookupObjId(int $ref_id)
getObjectsByTitle(string $sid, string $a_title, ?int $user_id=null)
getObjIdsByRefIds(string $sid, array $ref_ids)
createReference()
creates reference for object
getObjectByReference(string $sid, int $a_ref_id, ?int $user_id=null)
deleteObject(string $sid, int $reference_id)
canAddType(string $type, string $target_type, int $target_id)
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
const TIMING_TEMPORARILY_AVAILABLE
getRefIdsByObjId(string $sid, int $obj_id)
static getInstance(int $a_user_id)
checkSession(string $sid)
static _isInTrash(int $ref_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static _lookupObjectId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
copyObject(string $sid, string $copy_settings_xml)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
putInTree(int $parent_ref_id)
maybe this method should be in tree object!?
static getItem(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
moveObject(string $sid, int $ref_id, int $target_id)
static _getInstance(int $a_copy_id)
addReference(string $sid, int $a_source_id, int $a_target_id)
validateReferences(string $a_action, array $a_object_data, int $a_target_id=0)
static _lookupType(int $id, bool $reference=false)
Class ilObjectActivation.
getTreeChilds(string $sid, int $ref_id, ?array $types=null, ?int $user_id=null)
XML writer class Class to simplify manual writing of xml documents.
removeFromSystemByImportId(string $sid, string $import_id)
addReferences(ilObject $source, array $a_object_data)