4 include_once
'./webservice/soap/classes/class.ilSoapAdministration.php';
43 global $rbacsystem, $tree,
$ilLog;
54 return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.",
'Client');
58 $permission_ok =
false;
59 $write_permission_ok =
false;
62 if($rbacsystem->checkAccess(
'edit',$ref_id))
64 $write_permission_ok =
true;
67 if($rbacsystem->checkAccess(
'read',$ref_id))
69 $permission_ok =
true;
75 if(!$permission_ok && !$write_permission_ok)
77 return $this->
__raiseError(
'No permission to edit the object with id: '.$ref_id,
83 include_once
'./Modules/WebResource/classes/class.ilWebLinkXmlWriter.php';
85 $writer->setObjId($obj_id);
88 return $writer->xmlDumpMem(
true);
90 catch(UnexpectedValueException $e)
114 global $rbacsystem, $tree,
$ilLog;
118 return $this->
__raiseError(
'No valid target given.',
'Client');
123 return $this->
__raiseError(
"Parent with ID $target_id has been deleted.",
'CLIENT_OBJECT_DELETED');
128 $allowed_types = array(
'cat',
'grp',
'crs',
'fold',
'root');
129 if(!in_array($target_obj->getType(), $allowed_types))
131 return $this->
__raiseError(
'No valid target type. Target must be reference id of "course, group, root, category or folder"',
'Client');
134 if(!$rbacsystem->checkAccess(
'create',
$target_id,
"webr"))
141 include_once
'./Modules/WebResource/classes/class.ilObjLinkResource.php';
142 include_once
'./Modules/WebResource/classes/class.ilWebLinkXmlParser.php';
145 $webl->setTitle(
'XML Import');
147 $webl->createReference();
161 catch(ilWebLinkXMLParserException $e)
167 return $webl->getRefId();
188 global $rbacsystem, $tree,
$ilLog;
192 return $this->
__raiseError(
'Cannot perform update since weblink has been deleted.',
'CLIENT_OBJECT_DELETED');
198 'CLIENT_OBJECT_NOT_FOUND');
202 $permission_ok =
false;
205 if($rbacsystem->checkAccess(
'edit',$ref_id))
207 $permission_ok =
true;
214 return $this->
__raiseError(
'No permission to edit the weblink with id: '.$ref_id,
219 if(!is_object($webl) or $webl->getType()!=
"webr")
221 return $this->
__raiseError(
'Wrong obj id or type for weblink with id '.$ref_id,
227 include_once
'./Modules/WebResource/classes/class.ilWebLinkXmlParser.php';
236 catch(ilWebLinkXMLParserException $e)