ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSOAPStructureObjectAdministration Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilSOAPStructureObjectAdministration:
+ Collaboration diagram for ilSOAPStructureObjectAdministration:

Public Member Functions

 getStructureObjects (string $sid, int $ref_id)
 
- Public Member Functions inherited from ilSoapAdministration
 __construct (bool $use_nusoap=true)
 
 getMessage ()
 
 appendMessage (string $a_str)
 
 setMessageCode (string $a_code)
 
 getMessageCode ()
 
 reInitUser ()
 
 isFault ($object)
 
 getInstallationInfoXML ()
 
 getClientInfoXML (string $clientid)
 

Additional Inherited Members

- Data Fields inherited from ilSoapAdministration
const NUSOAP = 1
 
const PHP5 = 2
 
int $error_method
 Defines type of error handling (PHP5 || NUSOAP) More...
 
- Protected Member Functions inherited from ilSoapAdministration
 checkSession (string $sid)
 
 explodeSid (string $sid)
 
 setMessage (string $a_str)
 
 initAuth (string $sid)
 
 initIlias ()
 
 initAuthenticationObject ()
 
 raiseError (string $a_message, $a_code)
 
 checkObjectAccess (int $ref_id, array $expected_type, string $permission, bool $returnObject=false)
 check access for ref id: expected type, permission, return object instance if returnobject is true More...
 
- Protected Attributes inherited from ilSoapAdministration
bool $soap_check = true
 
string $message = ''
 
string $message_code = ''
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning administration for structure objects

Author
Roland Kuestermann (rku@a.nosp@m.ifb..nosp@m.uni-k.nosp@m.arls.nosp@m.ruhe..nosp@m.de)

Definition at line 22 of file class.ilSoapStructureObjectAdministration.php.

Member Function Documentation

◆ getStructureObjects()

ilSOAPStructureObjectAdministration::getStructureObjects ( string  $sid,
int  $ref_id 
)
Returns
soap_fault|SoapFault|string|null

Definition at line 27 of file class.ilSoapStructureObjectAdministration.php.

28 {
29 $this->initAuth($sid);
30 $this->initIlias();
31
32 if (!$this->checkSession($sid)) {
33 return $this->raiseError($this->getMessage(), $this->getMessageCode());
34 }
35
36 if (!$target_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
37 return $this->raiseError('No valid reference id given.', 'Client');
38 }
39
40 $structureReaderClassname = "ilSoap" . strtoupper($target_obj->getType()) . "StructureReader";
41 $filename = "./components/ILIAS/soap/classes/class." . $structureReaderClassname . ".php";
42
43 if (!file_exists($filename)) {
44 return $this->raiseError("Object type '" . $target_obj->getType() . "'is not supported.", 'Client');
45 }
46
47 include_once $filename;
48 $structureReader = new $structureReaderClassname($target_obj);
49 $xml_writer = new ilSoapStructureObjectXMLWriter();
50 $structureObject = &$structureReader->getStructureObject();
51 $xml_writer->setStructureObject($structureObject);
52 if (!$xml_writer->start()) {
53 return $this->raiseError('Cannot create object xml !', 'Server');
54 }
55 return $xml_writer->getXML();
56 }
$filename
Definition: buildRTE.php:78
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
raiseError(string $a_message, $a_code)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:66

References $filename, $ref_id, ilSoapAdministration\checkSession(), ilObjectFactory\getInstanceByRefId(), ilSoapAdministration\getMessage(), ilSoapAdministration\getMessageCode(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilSoapAdministration\raiseError().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: