Soap methods for adminstrating web links.
More...
|
| __construct () |
| Constructor. More...
|
|
| readWebLink ($sid, $ref_id) |
| Get Weblink xml. More...
|
|
| createWebLink ($sid, $target_id, $weblink_xml) |
| add an exercise with id. More...
|
|
| updateWebLink ($sid, $ref_id, $weblink_xml) |
| update a weblink with id. More...
|
|
| __construct ($use_nusoap=true) |
| Constructor. More...
|
|
| initErrorWriter () |
| Overwrite error handler. More...
|
|
| __explodeSid ($sid) |
|
| __setMessage ($a_str) |
|
| __getMessage () |
|
| __appendMessage ($a_str) |
|
| __setMessageCode ($a_code) |
|
| __getMessageCode () |
|
| initAuth ($sid) |
| Init authentication. More...
|
|
| initIlias () |
|
| __initAuthenticationObject ($a_auth_mode=AUTH_LOCAL) |
|
| __raiseError ($a_message, $a_code) |
|
| getNIC ($sid) |
| get client information from current as xml result set More...
|
|
| isFault ($object) |
|
| checkObjectAccess ($ref_id, $expected_type, $permission, $returnObject=false) |
| check access for ref id: expected type, permission, return object instance if returnobject is true More...
|
|
| getInstallationInfoXML () |
|
| getClientInfoXML ($clientid) |
|
Soap methods for adminstrating web links.
- Author
- Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 13 of file class.ilSoapWebLinkAdministration.php.
◆ __construct()
ilSoapWebLinkAdministration::__construct |
( |
| ) |
|
◆ createWebLink()
ilSoapWebLinkAdministration::createWebLink |
( |
|
$sid, |
|
|
|
$target_id, |
|
|
|
$weblink_xml |
|
) |
| |
add an exercise with id.
- Parameters
-
string | $session_id | current session |
int | $target_id | refid of parent in repository |
string | $weblink_xml | xml description of weblink |
- Returns
- int reference id in the tree, 0 if not successful
Definition at line 99 of file class.ilSoapWebLinkAdministration.php.
References $ilLog, $parser, $target_id, ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilObject\_isInTrash(), array, ilObjectFactory\getInstanceByRefId(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilWebLinkXmlParser\MODE_CREATE.
104 if (!$this->__checkSession($sid)) {
107 global $rbacsystem, $tree,
$ilLog;
110 return $this->
__raiseError(
'No valid target given.',
'Client');
114 return $this->
__raiseError(
"Parent with ID $target_id has been deleted.",
'CLIENT_OBJECT_DELETED');
119 $allowed_types =
array(
'cat',
'grp',
'crs',
'fold',
'root');
120 if (!in_array($target_obj->getType(), $allowed_types)) {
121 return $this->
__raiseError(
'No valid target type. Target must be reference id of "course, group, root, category or folder"',
'Client');
124 if (!$rbacsystem->checkAccess(
'create',
$target_id,
"webr")) {
130 include_once
'./Modules/WebResource/classes/class.ilObjLinkResource.php';
131 include_once
'./Modules/WebResource/classes/class.ilWebLinkXmlParser.php';
134 $webl->setTitle(
'XML Import');
136 $webl->createReference();
146 }
catch (ilWebLinkXMLParserException $e) {
151 return $webl->getRefId();
XML parser for weblink xml.
static _isInTrash($a_ref_id)
checks wether object is in trash
SaxParserException thrown by ilSaxParser if property throwException is set.
__raiseError($a_message, $a_code)
Create styles array
The data for the language used.
initAuth($sid)
Init authentication.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
◆ readWebLink()
ilSoapWebLinkAdministration::readWebLink |
( |
|
$sid, |
|
|
|
$ref_id |
|
) |
| |
Get Weblink xml.
- Parameters
-
string | $a_sid | |
int | $a_ref_id | |
- Returns
- string
Definition at line 29 of file class.ilSoapWebLinkAdministration.php.
References $ilLog, ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilObject\_getAllReferences(), ilObject\_isInTrash(), ilObject\_lookupObjectId(), ilSoapAdministration\initAuth(), and ilSoapAdministration\initIlias().
34 if (!$this->__checkSession($sid)) {
37 if (!strlen($ref_id)) {
39 'No ref id given. Aborting!',
43 global $rbacsystem, $tree,
$ilLog;
48 'No weblink found for id: ' . $ref_id,
54 return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.",
'Client');
58 $permission_ok =
false;
59 $write_permission_ok =
false;
61 if ($rbacsystem->checkAccess(
'edit', $ref_id)) {
62 $write_permission_ok =
true;
65 if ($rbacsystem->checkAccess(
'read', $ref_id)) {
66 $permission_ok =
true;
71 if (!$permission_ok && !$write_permission_ok) {
73 'No permission to edit the object with id: ' . $ref_id,
79 include_once
'./Modules/WebResource/classes/class.ilWebLinkXmlWriter.php';
81 $writer->setObjId($obj_id);
84 return $writer->xmlDumpMem(
true);
static _isInTrash($a_ref_id)
checks wether object is in trash
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjectId($a_ref_id)
lookup object id
__raiseError($a_message, $a_code)
initAuth($sid)
Init authentication.
◆ updateWebLink()
ilSoapWebLinkAdministration::updateWebLink |
( |
|
$sid, |
|
|
|
$ref_id, |
|
|
|
$weblink_xml |
|
) |
| |
update a weblink with id.
- Parameters
-
string | $session_id | current session |
int | $ref_id | refid id of weblink in repository |
string | $weblink_xml | xml description |
- Returns
- boolean true, if update successful, false otherwise
Definition at line 163 of file class.ilSoapWebLinkAdministration.php.
References $ilLog, $parser, ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilObject\_getAllReferences(), ilObject\_isInTrash(), ilObject\_lookupObjectId(), ilObjectFactory\getInstanceByObjId(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilWebLinkXmlParser\MODE_UPDATE.
168 if (!$this->__checkSession($sid)) {
171 global $rbacsystem, $tree,
$ilLog;
174 return $this->
__raiseError(
'Cannot perform update since weblink has been deleted.',
'CLIENT_OBJECT_DELETED');
179 'No weblink found for id: ' . $ref_id,
180 'CLIENT_OBJECT_NOT_FOUND' 185 $permission_ok =
false;
187 if ($rbacsystem->checkAccess(
'edit', $ref_id)) {
188 $permission_ok =
true;
193 if (!$permission_ok) {
195 'No permission to edit the weblink with id: ' . $ref_id,
201 if (!is_object($webl) or $webl->getType()!=
"webr") {
203 'Wrong obj id or type for weblink with id ' . $ref_id,
209 include_once
'./Modules/WebResource/classes/class.ilWebLinkXmlParser.php';
215 }
catch (ilWebLinkXMLParserException $e) {
XML parser for weblink xml.
static _isInTrash($a_ref_id)
checks wether object is in trash
SaxParserException thrown by ilSaxParser if property throwException is set.
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjectId($a_ref_id)
lookup object id
__raiseError($a_message, $a_code)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
initAuth($sid)
Init authentication.
The documentation for this class was generated from the following file: