ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSoapAdministration Class Reference
+ Inheritance diagram for ilSoapAdministration:
+ Collaboration diagram for ilSoapAdministration:

Public Member Functions

 ilSoapAdministration ($use_nusoap=true)
 __checkSession ($sid)
 initErrorWriter ()
 Overwrite error handler.
 __explodeSid ($sid)
 __setMessage ($a_str)
 __getMessage ()
 __appendMessage ($a_str)
 __setMessageCode ($a_code)
 __getMessageCode ()
 initAuth ($sid)
 initIlias ()
 __initAuthenticationObject ($a_auth_mode=AUTH_LOCAL)
 __raiseError ($a_message, $a_code)
 getNIC ($sid)
 get client information from current as xml result set
 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
 getInstallationInfoXML ()
 getClientInfoXML ($clientid)

Static Public Member Functions

static return_bytes ($val)
 calculate bytes from K,M,G modifiers e.g: 8M = 8 * 1024 * 1024 bytes

Data Fields

 $sauth = null
 $error_method = null

Protected Attributes

 $soap_check = true

Private Member Functions

 getClientInfo ($init, $client_dir)

Detailed Description

Definition at line 41 of file class.ilSoapAdministration.php.

Member Function Documentation

ilSoapAdministration::__appendMessage (   $a_str)

Definition at line 175 of file class.ilSoapAdministration.php.

Referenced by ilSoapUserAdministration\__validateUserData().

{
$this->message .= isset($this->message) ? ' ' : '';
$this->message .= $a_str;
}

+ Here is the caller graph for this function:

ilSoapAdministration::__checkSession (   $sid)

Definition at line 78 of file class.ilSoapAdministration.php.

References $client, $ilAuth, $ilSetting, __explodeSid(), __setMessage(), __setMessageCode(), AUTH_EXPIRED, AUTH_IDLED, and AUTH_WRONG_LOGIN.

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapUserAdministration\addUser(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapRBACAdministration\getLocalRoles(), ilSoapUtils\getMobsOfObject(), getNIC(), ilSoapTestAdministration\getNrOfQuestionsInPass(), ilSoapObjectAdministration\getObjectByReference(), ilSoapObjectAdministration\getObjectsByTitle(), ilSoapRBACAdministration\getObjectTreeOperations(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilSoapRBACAdministration\getOperations(), ilSoapObjectAdministration\getPathForRefId(), ilSoapTestAdministration\getPositionOfQuestion(), ilSoapTestAdministration\getPreviousReachedPoints(), ilSoapTestAdministration\getQuestionSolution(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapRBACAdministration\getRoles(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilSOAPStructureObjectAdministration\getStructureObjects(), ilSoapTestAdministration\getTestResults(), ilSoapTestAdministration\getTestUserData(), ilSoapObjectAdministration\getTreeChilds(), ilSoapUserAdministration\getUser(), ilSoapUserAdministration\getUserForRole(), ilSoapUserAdministration\getUserIdBySid(), ilSoapRBACAdministration\getUserRoles(), ilSoapUserAdministration\getUsersForContainer(), ilSoapUserAdministration\getUserXML(), ilSoapObjectAdministration\getXMLTree(), ilSoapRBACAdministration\grantPermissions(), ilSoapGroupAdministration\groupExists(), ilSoapUtils\handleECSTasks(), ilSoapUserAdministration\hasNewMail(), ilSoapSCORMAdministration\hasSCORMCertificate(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapRBACAdministration\revokePermissions(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapUserAdministration\updatePassword(), ilSoapUserAdministration\updateUser(), and ilSoapWebLinkAdministration\updateWebLink().

{
global $ilAuth;
list($sid,$client) = $this->__explodeSid($sid);
if(!strlen($sid))
{
$this->__setMessage('No session id given');
$this->__setMessageCode('Client');
return false;
}
if(!$client)
{
$this->__setMessage('No client given');
$this->__setMessageCode('Client');
return false;
}
if(!$ilAuth->getAuth())
{
switch($ilAuth->getStatus())
{
$this->__setMessage('Session expired');
$this->__setMessageCode('Server');
return false;
case AUTH_IDLED:
$this->__setMessage('Session idled');
$this->__setMessageCode('Server');
return false;
$this->__setMessage('Wrong Login or Password');
$this->__setMessageCode('Client');
return false;
default:
$this->__setMessage('Session invalid');
$this->__setMessageCode('Client');
return false;
}
}
global $ilUser;
if(!$ilUser->hasAcceptedUserAgreement() and $ilUser->getId() != ANONYMOUS_USER_ID)
{
$this->__setMessage('User agreement no accepted.');
$this->__setMessageCode('Server');
return false;
}
global $ilSetting;
if($this->soap_check)
{
$set = new ilSetting();
$this->__setMessage('SOAP is not enabled in ILIAS administration for this client');
$this->__setMessageCode('Server');
return ($set->get("soap_user_administration") == 1);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapAdministration::__explodeSid (   $sid)

Definition at line 159 of file class.ilSoapAdministration.php.

Referenced by __checkSession(), and initAuth().

{
$exploded = explode('::',$sid);
return is_array($exploded) ? $exploded : array('sid' => '','client' => '');
}

+ Here is the caller graph for this function:

ilSoapAdministration::__getMessage ( )

Definition at line 171 of file class.ilSoapAdministration.php.

Referenced by ilSoapUserAdministration\__validateUserData(), ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapUserAdministration\addUser(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapRBACAdministration\getLocalRoles(), ilSoapUtils\getMobsOfObject(), getNIC(), ilSoapTestAdministration\getNrOfQuestionsInPass(), ilSoapObjectAdministration\getObjectByReference(), ilSoapObjectAdministration\getObjectsByTitle(), ilSoapRBACAdministration\getObjectTreeOperations(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilSoapRBACAdministration\getOperations(), ilSoapObjectAdministration\getPathForRefId(), ilSoapTestAdministration\getPositionOfQuestion(), ilSoapTestAdministration\getPreviousReachedPoints(), ilSoapTestAdministration\getQuestionSolution(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapRBACAdministration\getRoles(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilSOAPStructureObjectAdministration\getStructureObjects(), ilSoapTestAdministration\getTestResults(), ilSoapTestAdministration\getTestUserData(), ilSoapObjectAdministration\getTreeChilds(), ilSoapUserAdministration\getUser(), ilSoapUserAdministration\getUserForRole(), ilSoapUserAdministration\getUserIdBySid(), ilSoapRBACAdministration\getUserRoles(), ilSoapUserAdministration\getUsersForContainer(), ilSoapUserAdministration\getUserXML(), ilSoapObjectAdministration\getXMLTree(), ilSoapRBACAdministration\grantPermissions(), ilSoapGroupAdministration\groupExists(), ilSoapUtils\handleECSTasks(), ilSoapUserAdministration\hasNewMail(), ilSoapSCORMAdministration\hasSCORMCertificate(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapRBACAdministration\revokePermissions(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapUserAdministration\updatePassword(), ilSoapUserAdministration\updateUser(), and ilSoapWebLinkAdministration\updateWebLink().

{
return $this->message;
}

+ Here is the caller graph for this function:

ilSoapAdministration::__getMessageCode ( )

Definition at line 186 of file class.ilSoapAdministration.php.

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapUserAdministration\addUser(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapRBACAdministration\getLocalRoles(), ilSoapUtils\getMobsOfObject(), getNIC(), ilSoapTestAdministration\getNrOfQuestionsInPass(), ilSoapObjectAdministration\getObjectByReference(), ilSoapObjectAdministration\getObjectsByTitle(), ilSoapRBACAdministration\getObjectTreeOperations(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilSoapRBACAdministration\getOperations(), ilSoapObjectAdministration\getPathForRefId(), ilSoapTestAdministration\getPositionOfQuestion(), ilSoapTestAdministration\getPreviousReachedPoints(), ilSoapTestAdministration\getQuestionSolution(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapRBACAdministration\getRoles(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilSOAPStructureObjectAdministration\getStructureObjects(), ilSoapTestAdministration\getTestResults(), ilSoapTestAdministration\getTestUserData(), ilSoapObjectAdministration\getTreeChilds(), ilSoapUserAdministration\getUser(), ilSoapUserAdministration\getUserForRole(), ilSoapUserAdministration\getUserIdBySid(), ilSoapRBACAdministration\getUserRoles(), ilSoapUserAdministration\getUsersForContainer(), ilSoapUserAdministration\getUserXML(), ilSoapObjectAdministration\getXMLTree(), ilSoapRBACAdministration\grantPermissions(), ilSoapGroupAdministration\groupExists(), ilSoapUtils\handleECSTasks(), ilSoapUserAdministration\hasNewMail(), ilSoapSCORMAdministration\hasSCORMCertificate(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapRBACAdministration\revokePermissions(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapUserAdministration\updatePassword(), ilSoapUserAdministration\updateUser(), and ilSoapWebLinkAdministration\updateWebLink().

{
return $this->message_code;
}

+ Here is the caller graph for this function:

ilSoapAdministration::__initAuthenticationObject (   $a_auth_mode = AUTH_LOCAL)

Definition at line 209 of file class.ilSoapAdministration.php.

References ilAuthFactory\CONTEXT_SOAP, and ilAuthFactory\setContext().

Referenced by ilSoapAdministration(), and ilSoapUserAdministration\loginCAS().

{
include_once './Services/Authentication/classes/class.ilAuthFactory.php';
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapAdministration::__raiseError (   $a_message,
  $a_code 
)

Definition at line 216 of file class.ilSoapAdministration.php.

Referenced by ilSoapUserAdministration\__getImportProtocolAsXML(), ilSoapUserAdministration\__getUserMappingAsXML(), ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapUserAdministration\addUser(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\canAddType(), checkObjectAccess(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), getClientInfoXML(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapRBACAdministration\getLocalRoles(), ilSoapUtils\getMobsOfObject(), getNIC(), ilSoapTestAdministration\getNrOfQuestionsInPass(), ilSoapObjectAdministration\getObjectByReference(), ilSoapObjectAdministration\getObjectsByTitle(), ilSoapRBACAdministration\getObjectTreeOperations(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilSoapRBACAdministration\getOperations(), ilSoapObjectAdministration\getPathForRefId(), ilSoapTestAdministration\getPositionOfQuestion(), ilSoapTestAdministration\getPreviousReachedPoints(), ilSoapTestAdministration\getQuestionSolution(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapRBACAdministration\getRoles(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilSOAPStructureObjectAdministration\getStructureObjects(), ilSoapTestAdministration\getTestResults(), ilSoapTestAdministration\getTestUserData(), ilSoapObjectAdministration\getTreeChilds(), ilSoapUserAdministration\getUser(), ilSoapUserAdministration\getUserForRole(), ilSoapUserAdministration\getUserIdBySid(), ilSoapRBACAdministration\getUserRoles(), ilSoapUserAdministration\getUsersForContainer(), ilSoapUserAdministration\getUserXML(), ilSoapObjectAdministration\getXMLTree(), ilSoapRBACAdministration\grantPermissions(), ilSoapGroupAdministration\groupExists(), ilSoapUtils\handleECSTasks(), ilSoapUserAdministration\hasNewMail(), ilSoapSCORMAdministration\hasSCORMCertificate(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\login(), ilSoapUserAdministration\loginCAS(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapRBACAdministration\parseUserID(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapRBACAdministration\revokePermissions(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapUserAdministration\updatePassword(), ilSoapUserAdministration\updateUser(), ilSoapWebLinkAdministration\updateWebLink(), and ilSoapObjectAdministration\validateReferences().

{
#echo $a_message, $a_code;
switch($this->error_method)
{
case NUSOAP:
return new soap_fault($a_code,'',$a_message);
case PHP5:
return new SoapFault($a_code, $a_message);
}
}

+ Here is the caller graph for this function:

ilSoapAdministration::__setMessage (   $a_str)

Definition at line 167 of file class.ilSoapAdministration.php.

Referenced by __checkSession(), and ilSoapUserAdministration\__validateUserData().

{
$this->message = $a_str;
}

+ Here is the caller graph for this function:

ilSoapAdministration::__setMessageCode (   $a_code)

Definition at line 181 of file class.ilSoapAdministration.php.

Referenced by __checkSession().

{
$this->message_code = $a_code;
}

+ Here is the caller graph for this function:

ilSoapAdministration::checkObjectAccess (   $ref_id,
  $expected_type,
  $permission,
  $returnObject = false 
)

check access for ref id: expected type, permission, return object instance if returnobject is true

Parameters
int$ref_id
stringor array $expected_type
string$permission
boolean$returnObject
Returns
Object or type

Definition at line 349 of file class.ilSoapAdministration.php.

References $ref_id, __raiseError(), ilObject\_exists(), ilObject\_isInTrash(), ilObjectFactory\getInstanceByRefId(), and ilObjectFactory\getTypeByRefId().

Referenced by ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapGroupAdministration\getGroupsForUser(), and ilSoapUserAdministration\getUsersForContainer().

{
global $rbacsystem;
if(!is_numeric($ref_id))
{
return $this->__raiseError('No valid id given.',
'Client');
}
if (!ilObject::_exists($ref_id, true)) {
return $this->__raiseError('No object for id.',
'CLIENT_OBJECT_NOT_FOUND');
}
return $this->__raiseError('Object is already trashed.',
'CLIENT_OBJECT_DELETED');
}
if ((is_array($expected_type) && !in_array($type, $expected_type))
||
(!is_array($expected_type) && $type != $expected_type)
)
{
return $this->__raiseError("Wrong type $type for id. Expected: ".(is_array($expected_type) ? join (",",$expected_type) : $expected_type), 'CLIENT_OBJECT_WRONG_TYPE');
}
if (!$rbacsystem->checkAccess($permission, $ref_id, $type))
{
return $this->__raiseError('Missing permission $permission for type $type.', 'CLIENT_OBJECT_WRONG_PERMISSION');
}
if ($returnObject) {
}
return $type;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapAdministration::getClientInfo (   $init,
  $client_dir 
)
private

Definition at line 448 of file class.ilSoapAdministration.php.

References $client_id, $GLOBALS, $ilDB, and ilDBWrapperFactory\getWrapper().

Referenced by getClientInfoXML(), and getInstallationInfoXML().

{
global $ilDB;
$ini_file = "./".$client_dir."/client.ini.php";
// get settings from ini file
require_once("classes/class.ilIniFile.php");
$ilClientIniFile = new ilIniFile($ini_file);
$ilClientIniFile->read();
if ($ilClientIniFile->ERROR != "")
{
return false;
}
$client_id = $ilClientIniFile->readVariable('client','name');
if ($ilClientIniFile->variableExists('client', 'expose'))
{
$client_expose = $ilClientIniFile->readVariable('client','expose');
if ($client_expose == "0")
return false;
}
// build dsn of database connection and connect
require_once("./Services/Database/classes/class.ilDBWrapperFactory.php");
$ilDB = ilDBWrapperFactory::getWrapper($ilClientIniFile->readVariable("db","type"));
$ilDB->initFromIniFile($ilClientIniFile);
if ($ilDB->connect(true))
{
$GLOBALS['ilDB'] = $ilDB;
require_once("Services/Administration/classes/class.ilSetting.php");
$settings = new ilSetting();
$GLOBALS["ilSetting"] = $settings;
// workaround to determine http path of client
define ("IL_INST_ID", $settings->get("inst_id",0));
$settings->access = $ilClientIniFile->readVariable("client", "access");
$settings->description = $ilClientIniFile->readVariable("client","description");
$settings->session = min((int) ini_get("session.gc_maxlifetime"), (int) $ilClientIniFile->readVariable("session","expire"));
$settings->language = $ilClientIniFile->readVariable("language","default");
$settings->clientid = basename($client_dir); //pathinfo($client_dir, PATHINFO_FILENAME);
$settings->default_show_users_online = $settings->get("show_users_online");
$settings->default_hits_per_page = $settings->get("hits_per_page");
$skin = $ilClientIniFile->readVariable("layout","skin");
$style = $ilClientIniFile->readVariable("layout","style");
$settings->default_skin_style = $skin.":".$style;
return $settings;
}
return null;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapAdministration::getClientInfoXML (   $clientid)

Definition at line 419 of file class.ilSoapAdministration.php.

References $client, $GLOBALS, __raiseError(), getClientInfo(), and ILIAS_WEB_DIR.

{
require_once("Services/Init/classes/class.ilInitialisation.php");
$init = new ilInitialisation();
$init->requireCommonIncludes();
$init->initIliasIniFile();
$ilias = & new ILIAS();
$GLOBALS['ilias'] =& $ilias;
$settings = array();
$clientdir = ILIAS_WEB_DIR."/".$clientid;
require_once ("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
$writer->setExportAdvancedMetaDataDefinitions (true);
$writer->setExportUDFDefinitions (true);
$writer->start();
if (is_object($client = $this->getClientInfo($init, $clientdir)))
{
$writer->addClient($client);
}
else
return $this->__raiseError("Client ID $clientid does not exist!", 'Client');
$writer->end();
return $writer->getXML();
}

+ Here is the call graph for this function:

ilSoapAdministration::getInstallationInfoXML ( )

Definition at line 387 of file class.ilSoapAdministration.php.

References $GLOBALS, getClientInfo(), and ILIAS_WEB_DIR.

{
require_once("Services/Init/classes/class.ilInitialisation.php");
$init = new ilInitialisation();
$init->requireCommonIncludes();
$init->initIliasIniFile();
$ilias = & new ILIAS();
$GLOBALS['ilias'] =& $ilias;
$settings = array();
$clientdirs = glob(ILIAS_WEB_DIR."/*",GLOB_ONLYDIR);
require_once ("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
$writer->start();
if (is_array($clientdirs))
{
foreach ($clientdirs as $clientdir)
{
if (is_object($clientInfo= $this->getClientInfo($init, $clientdir)))
{
$writer->addClient ($clientInfo);
}
}
}
$writer->end();
return $writer->getXML();
}

+ Here is the call graph for this function:

ilSoapAdministration::getNIC (   $sid)

get client information from current as xml result set

Parameters
string$sidcurrent session id
Returns
XMLResultSet containing columns installation_id, installation_version, installation_url, installation_description, installation_default_language

Definition at line 235 of file class.ilSoapAdministration.php.

References $ilLog, $ilSetting, __checkSession(), __getMessage(), __getMessageCode(), __raiseError(), ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAuthUtils\_getActiveAuthModes(), ilAdvancedMDRecord\_getAssignableObjectTypes(), ilAuthUtils\_getAuthModeName(), ILIAS_VERSION, initAuth(), initIlias(), and return_bytes().

{
$this->initAuth($sid);
$this->initIlias();
if(!$this->__checkSession($sid))
{
return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
}
global $rbacsystem, $rbacreview, $ilLog, $rbacadmin,$ilSetting, $ilClientIniFile;
if (!is_object($ilClientIniFile)) {
return $this->__raiseError("Client ini is not initialized","Server");
}
$auth_mode_default = strtoupper(ilAuthUtils::_getAuthModeName(array_shift($auth_modes)));
$auth_mode_names = array();
foreach ($auth_modes as $mode) {
$auth_mode_names[] = strtoupper(ilAuthUtils::_getAuthModeName($mode));
}
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordXMLWriter.php';
// create advanced meta data record xml
$record_ids = array();
foreach($record_types as $type) {
foreach ($records as $record){
$record_ids [] = $record->getRecordId();
}
}
$record_ids = array_unique($record_ids);
$advmwriter = new ilAdvancedMDRecordXMLWriter($record_ids);
$advmwriter->write();
// create user defined fields record xml, simulate empty user records
include_once ("./Services/User/classes/class.ilUserXMLWriter.php");
$udfWriter = new ilUserXMLWriter();
$users = array();
$udfWriter->setObjects($users);
$udfWriter->start();
// todo: get information from client id, read from ini file specificied
$client_details[] = array ("installation_id" => IL_INST_ID,
"installation_version" => ILIAS_VERSION,
"installation_url" => ILIAS_HTTP_PATH,
"installation_description" => $ilClientIniFile->readVariable("client","description"),
"installation_language_default" => $ilClientIniFile->readVariable("language","default"),
"installation_session_expire" => $ilClientIniFile->readVariable("session","expire"),
"installation_php_postmaxsize" => $this->return_bytes(ini_get("post_max_size")),
"authentication_methods" => join(",", $auth_mode_names),
"authentication_default_method" => $auth_mode_default,
"installation_udf_xml" => $udfWriter ->getXML(),
"installation_advmd_xml" => $advmwriter->xmlDumpMem(false)
);
// store into xml result set
include_once './webservice/soap/classes/class.ilXMLResultSet.php';
$xmlResult = new ilXMLResultSet();
$xmlResult->addArray($client_details, true);
// create writer and return xml
include_once './webservice/soap/classes/class.ilXMLResultSetWriter.php';
$xmlResultWriter = new ilXMLResultSetWriter($xmlResult);
$xmlResultWriter->start();
return $xmlResultWriter->getXML();
}

+ Here is the call graph for this function:

ilSoapAdministration::ilSoapAdministration (   $use_nusoap = true)
ilSoapAdministration::initAuth (   $sid)

Definition at line 191 of file class.ilSoapAdministration.php.

References $_COOKIE, $client, and __explodeSid().

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapUserAdministration\addUser(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapUtils\deleteExpiredDualOptInUserObjects(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapRBACAdministration\getLocalRoles(), ilSoapUtils\getMobsOfObject(), getNIC(), ilSoapTestAdministration\getNrOfQuestionsInPass(), ilSoapObjectAdministration\getObjectByReference(), ilSoapObjectAdministration\getObjectsByTitle(), ilSoapRBACAdministration\getObjectTreeOperations(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilSoapRBACAdministration\getOperations(), ilSoapObjectAdministration\getPathForRefId(), ilSoapTestAdministration\getPositionOfQuestion(), ilSoapTestAdministration\getPreviousReachedPoints(), ilSoapTestAdministration\getQuestionSolution(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapRBACAdministration\getRoles(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilSOAPStructureObjectAdministration\getStructureObjects(), ilSoapTestAdministration\getTestResults(), ilSoapTestAdministration\getTestUserData(), ilSoapObjectAdministration\getTreeChilds(), ilSoapUserAdministration\getUser(), ilSoapUserAdministration\getUserForRole(), ilSoapUserAdministration\getUserIdBySid(), ilSoapRBACAdministration\getUserRoles(), ilSoapUserAdministration\getUsersForContainer(), ilSoapUserAdministration\getUserXML(), ilSoapObjectAdministration\getXMLTree(), ilSoapRBACAdministration\grantPermissions(), ilSoapGroupAdministration\groupExists(), ilSoapUtils\handleECSTasks(), ilSoapUserAdministration\hasNewMail(), ilSoapSCORMAdministration\hasSCORMCertificate(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapRBACAdministration\revokePermissions(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapUserAdministration\updatePassword(), ilSoapUserAdministration\updateUser(), and ilSoapWebLinkAdministration\updateWebLink().

{
list($sid,$client) = $this->__explodeSid($sid);
define('CLIENT_ID',$client);
$_COOKIE['ilClientId'] = $client;
$_COOKIE['PHPSESSID'] = $sid;
#$_SESSION['_authhttp'.md5(CLIENT_ID)] = true;
#$_SESSION['PHPSESSID'] = $sid;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapAdministration::initErrorWriter ( )

Overwrite error handler.

public

Parameters

Definition at line 151 of file class.ilSoapAdministration.php.

{
include_once('classes/class.ilErrorHandling.php');
set_error_handler(array('ilErrorHandling','_ilErrorWriter'),E_ALL);
}
ilSoapAdministration::initIlias ( )

Definition at line 201 of file class.ilSoapAdministration.php.

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapUserAdministration\addUser(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapUtils\deleteExpiredDualOptInUserObjects(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapRBACAdministration\getLocalRoles(), ilSoapUtils\getMobsOfObject(), getNIC(), ilSoapTestAdministration\getNrOfQuestionsInPass(), ilSoapObjectAdministration\getObjectByReference(), ilSoapObjectAdministration\getObjectsByTitle(), ilSoapRBACAdministration\getObjectTreeOperations(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilSoapRBACAdministration\getOperations(), ilSoapObjectAdministration\getPathForRefId(), ilSoapTestAdministration\getPositionOfQuestion(), ilSoapTestAdministration\getPreviousReachedPoints(), ilSoapTestAdministration\getQuestionSolution(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapRBACAdministration\getRoles(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilSOAPStructureObjectAdministration\getStructureObjects(), ilSoapTestAdministration\getTestResults(), ilSoapTestAdministration\getTestUserData(), ilSoapObjectAdministration\getTreeChilds(), ilSoapUserAdministration\getUser(), ilSoapUserAdministration\getUserForRole(), ilSoapUserAdministration\getUserIdBySid(), ilSoapRBACAdministration\getUserRoles(), ilSoapUserAdministration\getUsersForContainer(), ilSoapUserAdministration\getUserXML(), ilSoapObjectAdministration\getXMLTree(), ilSoapRBACAdministration\grantPermissions(), ilSoapGroupAdministration\groupExists(), ilSoapUtils\handleECSTasks(), ilSoapUserAdministration\hasNewMail(), ilSoapSCORMAdministration\hasSCORMCertificate(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapRBACAdministration\revokePermissions(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapUserAdministration\updatePassword(), ilSoapUserAdministration\updateUser(), and ilSoapWebLinkAdministration\updateWebLink().

{
include_once("./Services/Init/classes/class.ilInitialisation.php");
$init = new ilInitialisation();
return $init->initILIAS("soap");
}

+ Here is the caller graph for this function:

ilSoapAdministration::isFault (   $object)

Definition at line 329 of file class.ilSoapAdministration.php.

Referenced by ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\copyObject(), ilSoapCourseAdministration\getCourseXML(), ilSoapUserAdministration\getUsersForContainer(), ilSoapObjectAdministration\moveObject(), ilSoapObjectAdministration\updateObjects(), and ilSoapObjectAdministration\validateReferences().

{
switch($this->error_method)
{
case NUSOAP:
return $object instanceof soap_fault;
case PHP5:
return $object instanceof SoapFault;
}
return true;
}

+ Here is the caller graph for this function:

static ilSoapAdministration::return_bytes (   $val)
static

calculate bytes from K,M,G modifiers e.g: 8M = 8 * 1024 * 1024 bytes

Definition at line 314 of file class.ilSoapAdministration.php.

Referenced by ilSoapInstallationInfoXMLWriter\__buildInstallationInfo(), and getNIC().

{
$val = trim($val);
$last = strtolower($val{strlen($val)-1});
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}

+ Here is the caller graph for this function:

Field Documentation

ilSoapAdministration::$error_method = null

Definition at line 56 of file class.ilSoapAdministration.php.

ilSoapAdministration::$sauth = null

Definition at line 50 of file class.ilSoapAdministration.php.

ilSoapAdministration::$soap_check = true
protected

Definition at line 43 of file class.ilSoapAdministration.php.


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