34 include_once
'./webservice/soap/classes/class.ilSoapAdministration.php';
43 if(!$this->__checkSession($sid))
56 $ilLog->write(
"SOAP getObjIdByImportId(): import_id = ".$import_id.
' obj_id = '.$obj_id);
58 return $obj_id ? $obj_id :
"0";
66 if(!$this->__checkSession($sid))
86 if ($tree->isInTree($ref_id))
91 return $new_refs ? $new_refs :
array();
99 if(!$this->__checkSession($sid))
114 return $new_refs ? $new_refs :
array();
130 if(!$this->__checkSession($sid))
136 if(!count($ref_ids) || !is_array ($ref_ids))
138 return $this->
__raiseError(
'No reference id(s) given.',
'Client');
142 if (count($ref_ids)) {
145 $ref_id = trim($ref_id);
146 if (!is_numeric($ref_id)){
147 return $this->
__raiseError(
'Reference ID has to be numeric. Value: '.$ref_id,
'Client');
152 return $this->
__raiseError(
'No object found for reference ID. Value: '.$ref_id,
'Client');
155 return $this->
__raiseError(
'No untrashed reference found for reference ID. Value: '.$ref_id,
'Client');
157 $obj_ids[] = $obj_id;
170 if(!$this->__checkSession($sid))
174 if(!is_numeric($a_ref_id))
176 return $this->
__raiseError(
'No valid reference id given. Please choose an existing reference id of an ILIAS object',
182 return $this->
__raiseError(
'Cannot create object instance!',
'Server');
188 return $this->
__raiseError(
"Object with ID $a_ref_id has been deleted.",
'Client');
191 include_once
'./webservice/soap/classes/class.ilObjectXMLWriter.php';
194 $xml_writer->enablePermissionCheck(
true);
197 $xml_writer->setUserId($user_id);
198 $xml_writer->enableOperations(
true);
200 $xml_writer->setObjects(
array($tmp_obj));
201 if($xml_writer->start())
203 return $xml_writer->getXML();
206 return $this->
__raiseError(
'Cannot create object xml !',
'Server');
214 if(!$this->__checkSession($sid))
218 if(!strlen($a_title))
220 return $this->
__raiseError(
'No valid query string given.',
224 include_once
'./Services/Search/classes/class.ilQueryParser.php';
227 $query_parser->setMinWordLength(0,
true);
229 $query_parser->parse();
230 if(!$query_parser->validate())
236 include_once
'./Services/Search/classes/class.ilObjectSearchFactory.php';
238 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
241 #$object_search =& ilObjectSearchFactory::_getObjectSearchInstance($query_parser); 242 $object_search->setFields(
array(
'title'));
243 $object_search->appendToFilter(
'role');
244 $object_search->appendToFilter(
'rolt');
245 $res =& $object_search->performSearch();
248 $res->setUserId($user_id);
251 $res->filter(ROOT_FOLDER_ID,
true);
254 foreach(
$res->getUniqueResults() as $entry)
256 if($entry[
'type'] ==
'role' or $entry[
'type'] ==
'rolt')
274 include_once
'./webservice/soap/classes/class.ilObjectXMLWriter.php';
277 $xml_writer->enablePermissionCheck(
true);
280 $xml_writer->setUserId($user_id);
281 $xml_writer->enableOperations(
true);
283 $xml_writer->setObjects($objs);
284 if($xml_writer->start())
286 return $xml_writer->getXML();
289 return $this->
__raiseError(
'Cannot create object xml !',
'Server');
297 if(!$this->__checkSession($sid))
301 if(!is_array($types))
303 return $this->
__raiseError(
'Types must be an array of object types.',
306 if($combination !=
'and' and $combination !=
'or')
308 return $this->
__raiseError(
'No valid combination given. Must be "and" or "or".',
313 include_once
'./Services/Search/classes/class.ilSearchSettings.php';
318 include_once
'./Services/Search/classes/Lucene/class.ilLuceneQueryParser.php';
320 $query_parser->parse();
322 include_once
'./Services/Search/classes/Lucene/class.ilLuceneSearcher.php';
326 include_once
'./Services/Search/classes/Lucene/class.ilLuceneSearchResultFilter.php';
327 include_once
'./Services/Search/classes/Lucene/class.ilLucenePathFilter.php';
329 $filter->setCandidates($searcher->getResult());
332 $result_ids = $filter->getResults();
343 include_once
'./Services/Search/classes/Lucene/class.ilLuceneHighlighterResultParser.php';
345 if($filter->getResultObjIds())
347 $highlighter = $searcher->highlight($filter->getResultObjIds());
353 include_once
'./Services/Search/classes/class.ilQueryParser.php';
356 #$query_parser->setMinWordLength(3); 358 $query_parser->parse();
359 if(!$query_parser->validate())
365 #include_once './Services/Search/classes/class.ilObjectSearchFactory.php'; 366 #$object_search =& ilObjectSearchFactory::_getObjectSearchInstance($query_parser); 368 include_once
'./Services/Search/classes/Like/class.ilLikeObjectSearch.php';
371 $object_search->setFilter($types);
373 $res =& $object_search->performSearch();
376 $res->setUserId($user_id);
379 $res->setMaxHits(100);
381 $res->filter(ROOT_FOLDER_ID,$combination ==
'and' ?
true :
false);
385 foreach(
$res->getUniqueResults() as $entry)
400 include_once
'./webservice/soap/classes/class.ilObjectXMLWriter.php';
407 $xml_writer->enableReferences(
false);
408 $xml_writer->setMode(ilObjectXmlWriter::MODE_SEARCH_RESULT);
409 $xml_writer->setHighlighter($highlighter);
412 $xml_writer->enablePermissionCheck(
true);
416 $xml_writer->setUserId($user_id);
417 $xml_writer->enableOperations(
true);
420 $xml_writer->setObjects($objs);
421 if($xml_writer->start())
423 #$GLOBALS['ilLog']->write(__METHOD__.': '.$xml_writer->xmlDumpMem(true)); 424 return $xml_writer->getXML();
427 return $this->
__raiseError(
'Cannot create object xml !',
'Server');
435 if(!$this->__checkSession($sid))
446 return $this->
__raiseError(
'No valid reference id given.',
449 if (intval(
$ref_id) == SYSTEM_FOLDER_ID) {
450 return $this->
__raiseError(
'No valid reference id given.',
462 include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php';
463 if(in_array(
'parent', (
array) $types))
465 $objs[] = $target_obj;
469 foreach($tree->getChilds(
$ref_id,
'title') as $child)
471 if($all
or in_array($child[
'type'],$types))
480 include_once
'./webservice/soap/classes/class.ilObjectXMLWriter.php';
486 $xml_writer->enableReferences(
false);
489 $xml_writer->enablePermissionCheck(
true);
490 $xml_writer->setObjects($objs);
491 $xml_writer->enableOperations(
true);
494 $xml_writer->setUserId($user_id);
497 if ($xml_writer->start())
499 #$GLOBALS['ilLog']->write(__METHOD__.': '.$xml_writer->getXML()); 500 return $xml_writer->getXML();
503 return $this->
__raiseError(
'Cannot create object xml !',
'Server');
511 if(!$this->__checkSession($sid))
518 $nodedata = $tree->getNodeData(
$ref_id);
519 $nodearray = $tree->getSubTree($nodedata);
522 $filter = (
array) $types;
524 global $objDefinition;
525 foreach($nodearray as $node)
527 if(!$objDefinition->isAdministrationObject($node[
'type']) && !$objDefinition->isSystemObject($node[
'type']))
529 if(!in_array($node[
'type'], $filter))
540 include_once
'./webservice/soap/classes/class.ilObjectXMLWriter.php';
543 $xml_writer->enablePermissionCheck(
true);
544 $xml_writer->setObjects($nodes);
545 $xml_writer->enableOperations(
false);
549 $xml_writer->setUserId($user_id);
552 if($xml_writer->start())
554 return $xml_writer->getXML();
557 return $this->
__raiseError(
'Cannot create object xml !',
'Server');
565 if(!$this->__checkSession($sid))
571 return $this->
__raiseError(
'No valid xml string given.',
575 global $rbacsystem, $objDefinition,
$ilUser,
$lng, $ilObjDataCache;
585 return $this->
__raiseError(
"Parent with ID $a_target_id has been deleted.",
'Client');
588 $allowed_types =
array(
'root',
'cat',
'grp',
'crs',
'fold');
589 if(!in_array($target_obj->getType(),$allowed_types))
591 return $this->
__raiseError(
'No valid target type. Target must be reference id of "course, group, category or folder"',
595 $allowed_subtypes = $target_obj->getPossibleSubObjects();
597 foreach($allowed_subtypes as
$row)
599 if($row[
'name'] !=
'rolf')
601 $allowed[] = $row[
'name'];
605 include_once
'./webservice/soap/classes/class.ilObjectXMLParser.php';
609 $xml_parser->startParsing();
618 foreach($xml_parser->getObjectData() as $object_data)
627 if(!in_array($object_data[
'type'],$allowed))
629 return $this->
__raiseError(
'Objects of type: '.$object_data[
'type'].
' are not allowed to be subobjects of type '.
630 $target_obj->getType().
'!',
633 if(!$rbacsystem->checkAccess(
'create',$a_target_id,$object_data[
'type']))
635 return $this->
__raiseError(
'No permission to create objects of type '.$object_data[
'type'].
'!',
651 return $this->
__raiseError(
'An object with import id '.$object_data[
'import_id'].
' already exists!',
656 $class_name = $objDefinition->getClassName($object_data[
'type']);
657 $location = $objDefinition->getLocation($object_data[
'type']);
659 $class_constr =
"ilObj".$class_name;
660 require_once(
$location.
"/class.ilObj".$class_name.
".php");
662 $newObj =
new $class_constr();
664 if(isset($object_data[
'owner']) && strlen($object_data[
'owner']))
666 if((
int)$object_data[
'owner'])
669 $ilObjDataCache->lookupType((
int)$object_data[
'owner']) ==
'usr')
671 $newObj->setOwner((
int)$object_data[
'owner']);
679 $newObj->setOwner((
int)$usr_id);
684 $newObj->setType($object_data[
'type']);
685 if(strlen($object_data[
'import_id']))
687 $newObj->setImportId($object_data[
'import_id']);
689 $newObj->setTitle($object_data[
'title']);
690 $newObj->setDescription($object_data[
'description']);
692 $newObj->createReference();
693 $newObj->putInTree($a_target_id);
694 $newObj->setPermissions($a_target_id);
696 switch($object_data[
'type'])
700 $newObj->addMember($object_data[
'owner'] ? $object_data[
'owner'] : $ilUser->getId(),
701 $newObj->getDefaultAdminRole());
706 $newObj->getMemberObject()->add($ilUser->getId(),
IL_CRS_ADMIN);
710 $newObj->createLMTree();
713 $newObj->addTranslation($object_data[
"title"],$object_data[
"description"], $lng->getLangKey(), $lng->getLangKey());
729 if(!$this->__checkSession($sid))
733 if(!is_numeric($a_source_id))
738 if(!is_numeric($a_target_id))
744 global $objDefinition, $rbacsystem, $tree;
757 if(!$objDefinition->allowLink($source_obj->getType())
and 758 $source_obj->getType() !=
'cat' and 759 $source_obj->getType() !=
'crs')
761 return $this->
__raiseError(
'Linking of object type: '.$source_obj->getType().
' is not allowed',
765 $allowed_subtypes = $target_obj->getPossibleSubObjects();
766 foreach($allowed_subtypes as
$row)
768 if($row[
'name'] !=
'rolf')
770 $allowed[] = $row[
'name'];
773 if(!in_array($source_obj->getType(),$allowed))
775 return $this->
__raiseError(
'Objects of type: '.$source_obj->getType().
' are not allowed to be subobjects of type '.
776 $target_obj->getType().
'!',
781 if(!$rbacsystem->checkAccess(
'create',$target_obj->getRefId(),$source_obj->getType()))
783 return $this->
__raiseError(
'No permission to create objects of type '.$source_obj->getType().
'!',
786 if(!$rbacsystem->checkAccess(
'delete',$source_obj->getRefId()))
788 return $this->
__raiseError(
'No permission to link object with id: '.$source_obj->getRefId().
'!',
793 if($source_obj->getType() !=
'cat' and $source_obj->getType() !=
'crs')
796 $possibleChilds = $tree->getChildsByType($target_obj->getRefId(), $source_obj->getType());
797 foreach ($possibleChilds as $child)
799 if ($child[
"obj_id"] == $source_obj->getId())
800 return $this->
__raiseError(
"Object already linked to target.",
"Client");
805 $new_ref_id = $source_obj->createReference();
806 $source_obj->putInTree($target_obj->getRefId());
807 $source_obj->setPermissions($target_obj->getRefId());
809 return $new_ref_id ? $new_ref_id :
"0";
813 switch($source_obj->getType())
816 include_once(
'./Modules/CategoryReference/classes/class.ilObjCategoryReference.php');
821 include_once(
'./Modules/CourseReference/classes/class.ilObjCourseReference.php');
825 include_once(
'./Modules/GroupReference/classes/class.ilObjGroupReference.php');
830 $new_ref_id = $new_ref->createReference();
832 $new_ref->putInTree($target_obj->getRefId());
833 $new_ref->setPermissions($target_obj->getRefId());
835 $new_ref->setTargetId($source_obj->getId());
838 return $new_ref_id ? $new_ref_id : 0;
847 if(!$this->__checkSession($sid))
851 if(!is_numeric($reference_id))
856 global $tree, $rbacsystem, $rbacadmin;
860 return $this->
__raiseError(
'No valid reference id given.',
863 if(!$rbacsystem->checkAccess(
'delete',$del_obj->getRefId()))
865 return $this->
__raiseError(
'No permission to delete object with id: '.$del_obj->getRefId().
'!',
870 if($tree->isDeleted($reference_id))
872 return $this->
__raiseError(
'Node already deleted',
'Server');
875 if($del_obj->getType() ==
'rolf')
877 return $this->
__raiseError(
'Delete is not available for role folders.',
'Client');
880 $subnodes = $tree->getSubtree($tree->getNodeData($reference_id));
881 foreach($subnodes as $subnode)
883 $rbacadmin->revokePermission($subnode[
"child"]);
887 if(!$tree->saveSubTree($reference_id,
true))
889 return $this->
__raiseError(
'Node already deleted',
'Client');
900 if(!$this->__checkSession($sid))
904 if(!strlen($import_id))
906 return $this->
__raiseError(
'No import id given. Aborting!',
909 global $rbacsystem, $tree,
$ilLog;
914 return $this->
__raiseError(
'No object found with import id: '.$import_id,
919 $permission_ok =
false;
922 if($rbacsystem->checkAccess(
'delete',$ref_id))
924 $permission_ok =
true;
930 return $this->
__raiseError(
'No permission to delete the object with import id: '.$import_id,
935 foreach($ref_ids as $ref_id)
938 $node_data = $tree->getNodeData($ref_id);
939 $subtree_nodes = $tree->getSubtree($node_data);
941 foreach($subtree_nodes as $node)
943 $ilLog->write(
'Soap: removeFromSystemByImportId(). Deleting object with title id: '.$node[
'title']);
945 if(!is_object($tmp_obj))
947 return $this->
__raiseError(
'Cannot create instance of reference id: '.$node[
'ref_id'],
953 $tree->deleteTree($node_data);
966 if(!$this->__checkSession($sid))
972 return $this->
__raiseError(
'No valid xml string given.',
976 global $rbacreview, $rbacsystem,
$lng,$ilAccess;
978 include_once
'./webservice/soap/classes/class.ilObjectXMLParser.php';
982 $xml_parser->startParsing();
993 $object_datas = $xml_parser->getObjectData();
994 foreach($object_datas as & $object_data)
1003 if(!$object_data[
"obj_id"])
1005 return $this->
__raiseError(
'No obj_id in xml found.',
'Client');
1007 elseif ((
int) $object_data[
"obj_id"] == -1 && count($object_data[
"references"])>0)
1011 foreach ($object_data[
"references"] as $refid)
1021 if (!$obj_id_from_refid)
1023 return $this->
__raiseError(
'No obj_id found for reference id '.$object_data[
"references"][0],
'CLIENT_OBJECT_NOT_FOUND');
1027 $object_data[
"obj_id"] = $obj_id_from_refid;
1032 if ($tmp_obj == null)
1034 return $this->
__raiseError(
'No object for id '.$object_data[
'obj_id'].
'!',
'CLIENT_OBJECT_NOT_FOUND');
1038 $object_data[
"instance"] = $tmp_obj;
1041 if($object_data[
'type'] ==
'role')
1043 $rolf_ids = $rbacreview->getFoldersAssignedToRole($object_data[
'obj_id'],
true);
1044 $rolf_id = $rolf_ids[0];
1046 if(!$rbacsystem->checkAccess(
'write',$rolf_id))
1048 return $this->
__raiseError(
'No write permission for object with id '.$object_data[
'obj_id'].
'!',
'Client');
1053 $permission_ok =
false;
1056 if($ilAccess->checkAccess(
'write',
'',$ref_id))
1058 $permission_ok =
true;
1064 return $this->
__raiseError(
'No write permission for object with id '.$object_data[
'obj_id'].
'!',
'Client');
1069 if (count ($object_datas) > 0)
1071 foreach($object_datas as $object_data)
1075 $tmp_obj = $object_data[
"instance"];
1076 $tmp_obj->setTitle($object_data[
'title']);
1077 $tmp_obj->setDescription($object_data[
'description']);
1079 #$GLOBALS['ilLog']->write(__METHOD__.': type is '. $object_data['type']); 1080 #$GLOBALS['ilLog']->write(__METHOD__.': type is '. $a_xml); 1083 switch ($object_data[
'type'])
1086 $tmp_obj->updateTranslation($object_data[
"title"],$object_data[
"description"], $lng->getLangKey(), $lng->getLangKey());
1090 if(strlen($object_data[
'owner']) && is_numeric($object_data[
'owner']))
1092 $tmp_obj->setOwner($object_data[
'owner']);
1093 $tmp_obj->updateOwner();
1107 if(!$this->__checkSession($sid))
1112 include_once
'./webservice/soap/classes/class.ilSoapUtils.php';
1113 global $rbacreview, $rbacadmin, $objDefinition, $rbacsystem,
$lng,
$ilUser, $tree;
1118 return $this->
__raiseError(
'No valid source given.',
'Client');
1124 return $this->
__raiseError(
'No valid target given.',
'Client');
1130 return $this->
__raiseError(
'Object is trashed.',
'Client');
1135 return $this->
__raiseError(
'Object is trashed.',
'Client');
1139 if ($this->
isFault($canAddType))
1146 foreach ($possibleChilds as $child)
1148 if ($child[
"obj_id"] ==
$ref_id)
1149 return $this->
__raiseError(
"Object already exists in target.",
"Client");
1155 return $this->
__raiseError(
"Cannot move object into itself.",
"Client");
1158 $old_parent = $tree->getParentId(
$ref_id);
1160 $rbacadmin->adjustMovedObjectPermissions(
$ref_id,$old_parent);
1162 include_once(
'./Services/AccessControl/classes/class.ilConditionHandler.php');
1177 if(!$this->__checkSession($sid))
1183 include_once
'./webservice/soap/classes/class.ilSoapUtils.php';
1184 global $rbacreview, $objDefinition, $rbacsystem,
$lng,
$ilUser;
1186 include_once
'./webservice/soap/classes/class.ilCopyWizardSettingsXMLParser.php';
1189 $xml_parser->startParsing();
1191 return $this->
__raiseError($se->getMessage(),
"Client");
1195 if(!$rbacsystem->checkAccess(
'copy',$xml_parser->getSourceId()))
1197 return $this->
__raiseError(
"Missing copy permissions for object with reference id ".$xml_parser->getSourceId(),
'Client');
1201 $source_id = $xml_parser->getSourceId();
1208 return $this->
__raiseError(
'No valid source given.',
'Client');
1214 return $this->
__raiseError(
'No valid target given.',
'Client');
1219 if ($this->
isFault($canAddType))
1225 $options = $xml_parser->getOptions();
1230 $clientid = substr($sid, strpos($sid,
"::") + 2);
1231 $sessionid = str_replace(
"::".$clientid,
"", $sid);
1233 $ret = $source_object->cloneAllObject($sessionid, $clientid,
1234 $source_object_type,
1239 return $ret[
'ref_id'];
1245 $wizard_options->saveOwner($ilUser->getId());
1246 $wizard_options->saveRoot($source_id);
1248 foreach(
$options as $source_id => $option)
1250 $wizard_options->addEntry($source_id,$option);
1252 $wizard_options->read();
1255 $newObject = $source_object->cloneObject($xml_parser->getTargetId(), $copy_id);
1256 return is_object($newObject) ? $newObject->getRefId() : -1;
1265 if(!$this->__checkSession($sid))
1270 global $ilAccess, $objDefinition, $rbacsystem,
$lng,
$ilUser;
1272 if(!$rbacsystem->checkAccess(
'read',
$ref_id))
1274 return $this->
__raiseError(
"Missing read permissions for object with reference id ".
$ref_id,
'Client');
1279 return $this->
__raiseError(
"Object is in Trash",
'Client');
1282 $items = $tree->getPathFull(
$ref_id);
1284 include_once
'webservice/soap/classes/class.ilXMLResultSet.php';
1285 include_once
'webservice/soap/classes/class.ilXMLResultSetWriter.php';
1286 include_once
'Modules/Course/classes/class.ilCourseXMLWriter.php';
1289 $xmlResultSet->addColumn(
"ref_id");
1290 $xmlResultSet->addColumn(
"type");
1291 $xmlResultSet->addColumn(
"title");
1294 foreach ($items as $item) {
1295 if ($item[
"ref_id"] ==
$ref_id)
1297 if ($item[
"title"] ==
"ILIAS" && $item[
"type"] ==
"root")
1299 $item[
"title"] = $lng->txt(
"repository");
1303 $xmlResultSet->addRow(
$row);
1304 $row->setValue(
"ref_id", $item[
"ref_id"]);
1305 $row->setValue(
"type", $item[
"type"]);
1306 $row->setValue(
"title", $item[
"title"]);
1309 return $writer->getXML();
1316 global $objDefinition, $rbacsystem;
1318 $allowed_types =
array(
'root',
'cat',
'grp',
'crs',
'fold');
1321 return $this->
__raiseError(
'No valid target type. Target must be reference id of "course, group, category or folder"',
'Client');
1324 $allowed_subtypes = $objDefinition->getSubObjects(
$target_type);
1327 foreach($allowed_subtypes as
$row)
1329 if($row[
'name'] !=
'rolf')
1331 $allowed[] = $row[
'name'];
1335 if(!in_array($type, $allowed))
1337 return $this->
__raiseError(
'Objects of type: '.$type.
' are not allowed to be subobjects of type '.
$target_type.
'!',
'Client');
1339 if(!$rbacsystem->checkAccess(
'create',
$target_id, $type))
1341 return $this->
__raiseError(
'No permission to create objects of type '.$type.
'!',
'Client');
1351 if(!isset($a_object_data[
'references'])
or !count($a_object_data[
'references']))
1355 if($a_action ==
'create')
1357 if(count($a_object_data[
'references']) > 1)
1359 if(in_array($a_object_data[
'type'],
array(
'cat',
'crs',
'grp',
'fold')))
1361 return $this->
__raiseError(
"Cannot create references for type ".$a_object_data[
'type'],
1365 if(count($a_object_data[
'references']) == 1)
1367 if($a_target_id != $a_object_data[
'references'][0][
'parent_id'])
1369 return $this->
__raiseError(
"Cannot create references for type ".$a_object_data[
'type'],
1374 foreach($a_object_data[
'references'] as $ref_data)
1376 if(!$ref_data[
'parent_id'])
1378 return $this->
__raiseError(
'Element References: No parent Id given!',
'Client');
1383 if($this->
isFault($can_add_type))
1385 return $can_add_type;
1391 if($a_action ==
'update')
1393 foreach($a_object_data[
'references'] as $ref_data)
1395 if(!$ref_data[
'ref_id'])
1397 return $this->
__raiseError(
'Element References: No reference id given!',
'Client');
1400 if(!$ilAccess->checkAccess(
'write',
'',$ref_data[
'ref_id']))
1402 return $this->
__raiseError(
'No write permission for object with reference id '.$ref_data[
'ref_id'].
'!',
'Client');
1414 if(!isset($a_object_data[
'references'])
or !count($a_object_data[
'references']))
1419 foreach($a_object_data[
'references'] as $ref_data)
1421 if(isset($ref_data[
'time_target']) )
1423 include_once(
'./webservice/soap/classes/class.ilObjectXMLWriter.php');
1424 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
1428 $items->toggleChangeable(isset($ref_data[
'time_target'][
'changeable']) ? $ref_data[
'time_target'][
'changeable'] :
$old[
'changeable']);
1429 $items->setTimingStart(isset($ref_data[
'time_target'][
'starting_time']) ? $ref_data[
'time_target'][
'starting_time'] : $old[
'timing_start']);
1430 $items->setTimingEnd(isset($ref_data[
'time_target'][
'ending_time']) ? $ref_data[
'time_target'][
'ending_time'] : $old[
'timing_end']);
1431 $items->toggleVisible(isset($ref_data[
'time_target'][
'timing_visibility']) ? $ref_data[
'time_target'][
'timing_visibility'] : $old[
'visible']);
1432 $items->setSuggestionStart(isset($ref_data[
'time_target'][
'suggestion_start']) ? $ref_data[
'time_target'][
'suggestion_start'] : $old[
'suggestion_start']);
1433 $items->setSuggestionEnd(isset($ref_data[
'time_target'][
'suggestion_end']) ? $ref_data[
'time_target'][
'suggestion_end'] : $old[
'suggestion_end']);
1434 $items->setEarliestStart(isset($ref_data[
'time_target'][
'earliest_start']) ? $ref_data[
'time_target'][
'earliest_start'] : $old[
'earliest_start']);
1435 $items->setLatestEnd(isset($ref_data[
'time_target'][
'latest_end']) ? $ref_data[
'time_target'][
'latest_end'] : $old[
'latest_end']);
1437 switch($ref_data[
'time_target'][
'timing_type'])
1440 $ilLog->write(__METHOD__.ilObjectActivation::TIMINGS_DEACTIVATED.
' '.$ref_data[
'time_target'][
'timing_type']);
1445 $ilLog->write(__METHOD__.ilObjectActivation::TIMINGS_ACTIVATION.
' '.$ref_data[
'time_target'][
'timing_type']);
1450 $ilLog->write(__METHOD__.ilObjectActivation::TIMINGS_PRESETTING.
' '.$ref_data[
'time_target'][
'timing_type']);
1454 $items->update($ref_data[
'ref_id']);
1465 if(!isset($a_object_data[
'references'])
or !count($a_object_data[
'references']))
1470 $original_id = $source->getRefId();
1472 foreach($a_object_data[
'references'] as $ref_data)
1474 $new_ref_id =
$ref_id = $original_id;
1475 if($tree->getParentId($original_id) != $ref_data[
'parent_id'])
1478 $new_ref_id = $source->createReference();
1479 $source->putInTree($ref_data[
'parent_id']);
1480 $source->setPermissions($ref_data[
'parent_id']);
1482 if(isset($ref_data[
'time_target']) )
1484 include_once(
'./webservice/soap/classes/class.ilObjectXMLWriter.php');
1485 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
1487 if(!isset($ref_data[
'time_target'][
'starting_time']))
1489 $ref_data[
'time_target'][
'starting_time'] =
time();
1491 if(!isset($ref_data[
'time_target'][
'ending_time']))
1493 $ref_data[
'time_target'][
'ending_time'] =
time();
1497 $items->toggleChangeable($ref_data[
'time_target'][
'changeable']);
1498 $items->setTimingStart($ref_data[
'time_target'][
'starting_time']);
1499 $items->setTimingEnd($ref_data[
'time_target'][
'ending_time']);
1500 $items->toggleVisible($ref_data[
'time_target'][
'timing_visibility']);
1501 $items->setSuggestionStart($ref_data[
'time_target'][
'suggestion_start']);
1502 $items->setSuggestionEnd($ref_data[
'time_target'][
'suggestion_end']);
1503 $items->setEarliestStart($ref_data[
'time_target'][
'earliest_start']);
1504 $items->setLatestEnd($ref_data[
'time_target'][
'latest_end']);
1506 switch($ref_data[
'time_target'][
'timing_type'])
1509 $ilLog->write(__METHOD__.ilObjectActivation::TIMINGS_DEACTIVATED.
' '.$ref_data[
'time_target'][
'timing_type']);
1514 $ilLog->write(__METHOD__.ilObjectActivation::TIMINGS_ACTIVATION.
' '.$ref_data[
'time_target'][
'timing_type']);
1519 $ilLog->write(__METHOD__.ilObjectActivation::TIMINGS_PRESETTING.
' '.$ref_data[
'time_target'][
'timing_type']);
1523 $items->update($new_ref_id);
static removeItemFromDesktops($a_id)
removes object from all user's desktops public
updateObjects($sid, $a_xml)
XML Writer for XMLResultSet.
Parses result XML from lucene search highlight.
static _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
getRefIdsByObjId($sid, $obj_id)
addObject($sid, $a_target_id, $a_xml)
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
searchObjects($sid, $types, $key, $combination, $user_id)
getRefIdsByImportId($sid, $import_id)
deleteObject($sid, $reference_id)
Class ilObject Basic functions for all objects.
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance.
static getItem($a_ref_id)
Get item data.
const TIMINGS_DEACTIVATED
static _isInTrash($a_ref_id)
checks wether object is in trash
static _lookupId($a_user_str)
Lookup id by login.
getObjectByReference($sid, $a_ref_id, $user_id)
SaxParserException thrown by ilSaxParser if property throwException is set.
moveObject($sid, $ref_id, $target_id)
Exception class for ObjectXMLWriter and ObjectXMLParser.
updateReferences($a_object_data)
static _getAllReferences($a_id)
get all reference ids of object
getXMLTree($sid, $ref_id, $types, $user_id)
static _lookupObjectId($a_ref_id)
lookup object id
static _getInstance($a_copy_id)
Get instance of copy wizard options.
const TIMING_TEMPORARILY_AVAILABLE
static getInstance($a_user_id)
if(!is_array($argv)) $options
static _lookupObjId($a_id)
__raiseError($a_message, $a_code)
static _allocateCopyId()
Allocate a copy for further entries.
const IL_CRS_ADMIN
Base class for course and group participants.
static getTypeByRefId($a_ref_id, $stop_on_error=true)
get object type by reference id
addReference($sid, $a_source_id, $a_target_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstance()
Get singleton instance.
getPathForRefId($sid, $ref_id)
getTreeChilds($sid, $ref_id, $types, $user_id)
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
getObjIdsByRefIds($sid, $ref_ids)
Returns a array of object ids which match the references id, given by a comma seperated string...
initAuth($sid)
Init authentication.
getObjectsByTitle($sid, $a_title, $user_id)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
getObjIdByImportId($sid, $import_id)
copyObject($sid, $copy_settings_xml)
copy object in repository $sid session id $settings_xml contains copy wizard settings following ilias...
addReferences($source, $a_object_data)
Class ilObjectActivation.
canAddType($type, $target_type, $target_id)
validateReferences($a_action, $a_object_data, $a_target_id=0)
static _lookupObjIdByImportId($a_import_id)
removeFromSystemByImportId($sid, $import_id)