ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSoapAdministration Class Reference
+ Inheritance diagram for ilSoapAdministration:
+ Collaboration diagram for ilSoapAdministration:

Public Member Functions

 __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)
 

Static Public Member Functions

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

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.

Constructor & Destructor Documentation

◆ __construct()

ilSoapAdministration::__construct (   $use_nusoap = true)

Constructor.

Parameters
bool$use_nusoap

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

References $client, $GLOBALS, $ilUser, __explodeSid(), __initAuthenticationObject(), __setMessage(), __setMessageCode(), defined, IL_SOAPMODE, and IL_SOAPMODE_NUSOAP.

64  {
65  define('USER_FOLDER_ID', 7);
66  define('NUSOAP', 1);
67  define('PHP5', 2);
68 
69  if (
70  defined('IL_SOAPMODE') && defined('IL_SOAPMODE_NUSOAP') &&
72  ) {
73  $this->error_method = NUSOAP;
74  } else {
75  $this->error_method = PHP5;
76  }
77 
79  }
const IL_SOAPMODE_NUSOAP
Definition: server.php:15
__initAuthenticationObject($a_auth_mode=AUTH_LOCAL)
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
const IL_SOAPMODE
Definition: server.php:19
+ Here is the call graph for this function:

Member Function Documentation

◆ __appendMessage()

ilSoapAdministration::__appendMessage (   $a_str)

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

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

◆ __explodeSid()

ilSoapAdministration::__explodeSid (   $sid)

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

References array.

Referenced by __construct(), initAuth(), and ilSoapUserAdministration\loginStudipUser().

140  {
141  $exploded = explode('::', $sid);
142 
143  return is_array($exploded) ? $exploded : array('sid' => '','client' => '');
144  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ __getMessage()

ilSoapAdministration::__getMessage ( )

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

References $message.

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapUtils\disableSOAPCheck(), ilSoapUtils\distributeMails(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapDataCollectionAdministration\exportDataCollectionContent(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapLearningProgressAdministration\getLearningProgressChanges(), 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(), ilAbstractSoapMethod\initIliasAndCheckSession(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), ilSoapRBACAdministration\revokePermissions(), ilSoapBackgroundTasksAdministration\runAsync(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), and ilSoapWebLinkAdministration\updateWebLink().

152  {
153  return $this->message;
154  }
catch(Exception $e) $message
+ Here is the caller graph for this function:

◆ __getMessageCode()

ilSoapAdministration::__getMessageCode ( )

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapUtils\disableSOAPCheck(), ilSoapUtils\distributeMails(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapDataCollectionAdministration\exportDataCollectionContent(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapLearningProgressAdministration\getLearningProgressChanges(), 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\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), ilSoapRBACAdministration\revokePermissions(), ilSoapBackgroundTasksAdministration\runAsync(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), and ilSoapWebLinkAdministration\updateWebLink().

167  {
168  return $this->message_code;
169  }
+ Here is the caller graph for this function:

◆ __initAuthenticationObject()

ilSoapAdministration::__initAuthenticationObject (   $a_auth_mode = AUTH_LOCAL)

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

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

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

198  {
199  include_once './Services/Authentication/classes/class.ilAuthFactory.php';
201  }
static setContext($a_context)
set context
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __raiseError()

ilSoapAdministration::__raiseError (   $a_message,
  $a_code 
)

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

Referenced by ilSoapUserAdministration\__getImportProtocolAsXML(), ilSoapUserAdministration\__getUserMappingAsXML(), ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\canAddType(), checkObjectAccess(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapUtils\disableSOAPCheck(), ilSoapUtils\distributeMails(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapDataCollectionAdministration\exportDataCollectionContent(), getClientInfoXML(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapLearningProgressAdministration\getLearningProgressChanges(), 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\ilCloneDependencies(), ilSoapUserAdministration\importUsers(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\loginCAS(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapRBACAdministration\parseUserID(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), ilSoapRBACAdministration\revokePermissions(), ilSoapBackgroundTasksAdministration\runAsync(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapWebLinkAdministration\updateWebLink(), and ilSoapObjectAdministration\validateReferences().

205  {
206  #echo $a_message, $a_code;
207  switch ($this->error_method) {
208  case NUSOAP:
209  return new soap_fault($a_code, '', $a_message);
210  case PHP5:
211  return new SoapFault($a_code, $a_message);
212  }
213  }
soap_fault class, allows for creation of faults mainly used for returning faults from deployed functi...
Definition: nusoap.php:669
+ Here is the caller graph for this function:

◆ __setMessage()

ilSoapAdministration::__setMessage (   $a_str)

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

Referenced by __construct().

148  {
149  $this->message = $a_str;
150  }
+ Here is the caller graph for this function:

◆ __setMessageCode()

ilSoapAdministration::__setMessageCode (   $a_code)

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

Referenced by __construct().

162  {
163  $this->message_code = $a_code;
164  }
+ Here is the caller graph for this function:

◆ checkObjectAccess()

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 338 of file class.ilSoapAdministration.php.

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

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

339  {
340  global $rbacsystem;
341  if (!is_numeric($ref_id)) {
342  return $this->__raiseError(
343  'No valid id given.',
344  'Client'
345  );
346  }
347  if (!ilObject::_exists($ref_id, true)) {
348  return $this->__raiseError(
349  'No object for id.',
350  'CLIENT_OBJECT_NOT_FOUND'
351  );
352  }
353 
354  if (ilObject::_isInTrash($ref_id)) {
355  return $this->__raiseError(
356  'Object is already trashed.',
357  'CLIENT_OBJECT_DELETED'
358  );
359  }
360 
362  if ((is_array($expected_type) && !in_array($type, $expected_type))
363  ||
364  (!is_array($expected_type) && $type != $expected_type)
365  ) {
366  return $this->__raiseError("Wrong type $type for id. Expected: " . (is_array($expected_type) ? join(",", $expected_type) : $expected_type), 'CLIENT_OBJECT_WRONG_TYPE');
367  }
368 
369  if (!$rbacsystem->checkAccess($permission, $ref_id, $type)) {
370  return $this->__raiseError('Missing permission $permission for type $type.', 'CLIENT_OBJECT_WRONG_PERMISSION');
371  }
372 
373  if ($returnObject) {
374  return ilObjectFactory::getInstanceByRefId($ref_id);
375  }
376 
377  return $type;
378  }
$type
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
static _isInTrash($a_ref_id)
checks wether object is in trash
__raiseError($a_message, $a_code)
static getTypeByRefId($a_ref_id, $stop_on_error=true)
get object type by reference id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClientInfo()

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

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

References $client_id, $DIC, $ilDB, and $style.

Referenced by getClientInfoXML(), and getInstallationInfoXML().

428  {
429  global $DIC;
430 
431  $ini_file = "./" . $client_dir . "/client.ini.php";
432 
433  // get settings from ini file
434  require_once("./Services/Init/classes/class.ilIniFile.php");
435 
436  $ilClientIniFile = new ilIniFile($ini_file);
437  $ilClientIniFile->read();
438  if ($ilClientIniFile->ERROR != "") {
439  return false;
440  }
441  $client_id = $ilClientIniFile->readVariable('client', 'name');
442  if ($ilClientIniFile->variableExists('client', 'expose')) {
443  $client_expose = $ilClientIniFile->readVariable('client', 'expose');
444  if ($client_expose == "0") {
445  return false;
446  }
447  }
448 
449  // build dsn of database connection and connect
450  require_once("./Services/Database/classes/class.ilDBWrapperFactory.php");
451  $ilDB = ilDBWrapperFactory::getWrapper(
452  $ilClientIniFile->readVariable("db", "type"),
453  $ilClientIniFile->readVariable("db", "inactive_mysqli")
454  );
455  $ilDB->initFromIniFile($ilClientIniFile);
456  if ($ilDB->connect(true)) {
457  unset($DIC['ilDB']);
458  $DIC['ilDB'] = $ilDB;
459 
460  require_once("Services/Administration/classes/class.ilSetting.php");
461 
462  $settings = new ilSetting();
463  unset($DIC["ilSetting"]);
464  $DIC["ilSetting"] = $settings;
465  // workaround to determine http path of client
466  define("IL_INST_ID", $settings->get("inst_id", 0));
467  $settings->access = $ilClientIniFile->readVariable("client", "access");
468  $settings->description = $ilClientIniFile->readVariable("client", "description");
469  $settings->session = min((int) ini_get("session.gc_maxlifetime"), (int) $ilClientIniFile->readVariable("session", "expire"));
470  $settings->language = $ilClientIniFile->readVariable("language", "default");
471  $settings->clientid = basename($client_dir); //pathinfo($client_dir, PATHINFO_FILENAME);
472  $settings->default_show_users_online = $settings->get("show_users_online");
473  $settings->default_hits_per_page = $settings->get("hits_per_page");
474  $skin = $ilClientIniFile->readVariable("layout", "skin");
475  $style = $ilClientIniFile->readVariable("layout", "style");
476  $settings->default_skin_style = $skin . ":" . $style;
477  return $settings;
478  }
479  return null;
480  }
$style
Definition: example_012.php:70
global $DIC
Definition: saml.php:7
global $ilDB
$client_id
INIFile Parser.
+ Here is the caller graph for this function:

◆ getClientInfoXML()

ilSoapAdministration::getClientInfoXML (   $clientid)

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

References $client, __raiseError(), ilContext\CONTEXT_SOAP_WITHOUT_CLIENT, getClientInfo(), ilContext\init(), and ilInitialisation\initILIAS().

405  {
406  include_once "Services/Context/classes/class.ilContext.php";
408 
409  require_once("Services/Init/classes/class.ilInitialisation.php");
411 
412  $clientdir = ILIAS_WEB_DIR . "/" . $clientid;
413  require_once("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
414  $writer = new ilSoapInstallationInfoXMLWriter();
415  $writer->setExportAdvancedMetaDataDefinitions(true);
416  $writer->setExportUDFDefinitions(true);
417  $writer->start();
418  if (is_object($client = $this->getClientInfo(null, $clientdir))) {
419  $writer->addClient($client);
420  } else {
421  return $this->__raiseError("Client ID $clientid does not exist!", 'Client');
422  }
423  $writer->end();
424  return $writer->getXML();
425  }
$client
Definition: resume.php:9
static initILIAS()
ilias initialisation
__raiseError($a_message, $a_code)
const CONTEXT_SOAP_WITHOUT_CLIENT
static init($a_type)
Init context by type.
+ Here is the call graph for this function:

◆ getInstallationInfoXML()

ilSoapAdministration::getInstallationInfoXML ( )

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

References ilContext\CONTEXT_SOAP_WITHOUT_CLIENT, getClientInfo(), ilContext\init(), and ilInitialisation\initILIAS().

381  {
382  include_once "Services/Context/classes/class.ilContext.php";
384 
385  require_once("Services/Init/classes/class.ilInitialisation.php");
387 
388  $clientdirs = glob(ILIAS_WEB_DIR . "/*", GLOB_ONLYDIR);
389  require_once("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
390  $writer = new ilSoapInstallationInfoXMLWriter();
391  $writer->start();
392  if (is_array($clientdirs)) {
393  foreach ($clientdirs as $clientdir) {
394  if (is_object($clientInfo= $this->getClientInfo(null, $clientdir))) {
395  $writer->addClient($clientInfo);
396  }
397  }
398  }
399  $writer->end();
400 
401  return $writer->getXML();
402  }
static initILIAS()
ilias initialisation
const CONTEXT_SOAP_WITHOUT_CLIENT
static init($a_type)
Init context by type.
+ Here is the call graph for this function:

◆ getNIC()

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 222 of file class.ilSoapAdministration.php.

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

223  {
224  $this->initAuth($sid);
225  $this->initIlias();
226 
227  if (!$this->__checkSession($sid)) {
228  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
229  }
230 
231  global $rbacsystem, $rbacreview, $ilLog, $rbacadmin,$ilSetting, $ilClientIniFile;
232 
233  if (!is_object($ilClientIniFile)) {
234  return $this->__raiseError("Client ini is not initialized", "Server");
235  }
236  $auth_modes = ilAuthUtils::_getActiveAuthModes();
237  $auth_mode_default = strtoupper(ilAuthUtils::_getAuthModeName(array_shift($auth_modes)));
238  $auth_mode_names = array();
239  foreach ($auth_modes as $mode) {
240  $auth_mode_names[] = strtoupper(ilAuthUtils::_getAuthModeName($mode));
241  }
242 
243  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
244  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordXMLWriter.php';
245 
246  // create advanced meta data record xml
247  $record_ids = array();
249  foreach ($record_types as $type_info) {
250  $type = $type_info['obj_type'];
252  foreach ($records as $record) {
253  $record_ids [] = $record->getRecordId();
254  }
255  }
256  $record_ids = array_unique($record_ids);
257  $advmwriter = new ilAdvancedMDRecordXMLWriter($record_ids);
258  $advmwriter->write();
259 
260  // create user defined fields record xml, simulate empty user records
261  include_once("./Services/User/classes/class.ilUserXMLWriter.php");
262  $udfWriter = new ilUserXMLWriter();
263  $users = array();
264  $udfWriter->setObjects($users);
265  $udfWriter->start();
266 
267  // todo: get information from client id, read from ini file specificied
268  $client_details[] = array("installation_id" => IL_INST_ID,
269  "installation_version" => ILIAS_VERSION,
270  "installation_url" => ILIAS_HTTP_PATH,
271  "installation_description" => $ilClientIniFile->readVariable("client", "description"),
272  "installation_language_default" => $ilClientIniFile->readVariable("language", "default"),
273  "installation_session_expire" => $ilClientIniFile->readVariable("session", "expire"),
274  "installation_php_postmaxsize" => $this->return_bytes(ini_get("post_max_size")),
275  "authentication_methods" => join(",", $auth_mode_names),
276  "authentication_default_method" => $auth_mode_default,
277  "installation_udf_xml" => $udfWriter ->getXML(),
278  "installation_advmd_xml" => $advmwriter->xmlDumpMem(false)
279 
280  );
281 
282  // store into xml result set
283  include_once './webservice/soap/classes/class.ilXMLResultSet.php';
284 
285 
286  $xmlResult = new ilXMLResultSet();
287  $xmlResult->addArray($client_details, true);
288 
289  // create writer and return xml
290  include_once './webservice/soap/classes/class.ilXMLResultSetWriter.php';
291  $xmlResultWriter = new ilXMLResultSetWriter($xmlResult);
292  $xmlResultWriter->start();
293  return $xmlResultWriter->getXML();
294  }
XML Writer for XMLResultSet.
const ILIAS_VERSION
$type
static _getActiveAuthModes()
$records
Definition: simple_test.php:22
static _getAuthModeName($a_auth_key)
XML writer class.
__raiseError($a_message, $a_code)
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
static _getActivatedRecordsByObjectType($a_obj_type, $a_sub_type="", $a_only_optional=false)
Get activated records by object type.
static _getAssignableObjectTypes($a_include_text=false)
Get assignable object type.
global $ilSetting
Definition: privfeed.php:17
initAuth($sid)
Init authentication.
static return_bytes($val)
calculate bytes from K,M,G modifiers e.g: 8M = 8 * 1024 * 1024 bytes
+ Here is the call graph for this function:

◆ initAuth()

ilSoapAdministration::initAuth (   $sid)

Init authentication.

Parameters
string$sid

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

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapUtils\deleteExpiredDualOptInUserObjects(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapUtils\disableSOAPCheck(), ilSoapUtils\distributeMails(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapDataCollectionAdministration\exportDataCollectionContent(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapLearningProgressAdministration\getLearningProgressChanges(), 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(), ilAbstractSoapMethod\initIliasAndCheckSession(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), ilSoapRBACAdministration\revokePermissions(), ilSoapBackgroundTasksAdministration\runAsync(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), and ilSoapWebLinkAdministration\updateWebLink().

176  {
177  list($sid, $client) = $this->__explodeSid($sid);
178  define('CLIENT_ID', $client);
179  $_COOKIE['ilClientId'] = $client;
180  $_COOKIE['PHPSESSID'] = $sid;
181  }
$_COOKIE['client_id']
Definition: server.php:9
$client
Definition: resume.php:9
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initErrorWriter()

ilSoapAdministration::initErrorWriter ( )

Overwrite error handler.

public

Parameters

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

References array.

132  {
133  include_once('./Services/Init/classes/class.ilErrorHandling.php');
134 
135  set_error_handler(array('ilErrorHandling','_ilErrorWriter'), E_ALL);
136  }
Create styles array
The data for the language used.

◆ initIlias()

ilSoapAdministration::initIlias ( )

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

References ilContext\CONTEXT_SOAP, ilContext\getType(), and ilInitialisation\reinitILIAS().

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addReference(), ilSoapRBACAdministration\addRole(), ilSoapRBACAdministration\addRoleFromTemplate(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapUtils\deleteExpiredDualOptInUserObjects(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), ilSoapUtils\disableSOAPCheck(), ilSoapUtils\distributeMails(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilSoapDataCollectionAdministration\exportDataCollectionContent(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapCourseAdministration\getCourseXML(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilSoapGroupAdministration\getGroup(), ilSoapGroupAdministration\getGroupsForUser(), ilSoapSCORMAdministration\getIMSManifestXML(), ilSoapLearningProgressAdministration\getLearningProgressChanges(), 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(), ilAbstractSoapMethod\initIliasAndCheckSession(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), ilSoapRBACAdministration\revokePermissions(), ilSoapBackgroundTasksAdministration\runAsync(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), and ilSoapWebLinkAdministration\updateWebLink().

184  {
186  try {
187  require_once("Services/Init/classes/class.ilInitialisation.php");
189  } catch (Exception $e) {
190  // #10608
191  // no need to do anything here, see __checkSession() below
192  }
193  }
194  }
static getType()
Get context type.
const CONTEXT_SOAP
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFault()

ilSoapAdministration::isFault (   $object)

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

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

319  {
320  switch ($this->error_method) {
321  case NUSOAP:
322  return $object instanceof soap_fault;
323  case PHP5:
324  return $object instanceof SoapFault;
325  }
326  return true;
327  }
soap_fault class, allows for creation of faults mainly used for returning faults from deployed functi...
Definition: nusoap.php:669
+ Here is the caller graph for this function:

◆ return_bytes()

static ilSoapAdministration::return_bytes (   $val)
static

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

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

Referenced by getNIC().

301  {
302  $val = trim($val);
303  $last = strtolower($val{strlen($val)-1});
304  switch ($last) {
305  // The 'G' modifier is available since PHP 5.1.0
306  case 'g':
307  $val *= 1024;
308  // no break
309  case 'm':
310  $val *= 1024;
311  // no break
312  case 'k':
313  $val *= 1024;
314  }
315  return $val;
316  }
+ Here is the caller graph for this function:

Field Documentation

◆ $error_method

ilSoapAdministration::$error_method = null

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

◆ $sauth

ilSoapAdministration::$sauth = null

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

◆ $soap_check

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: