ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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, $DIC, $GLOBALS, $ilUser, __explodeSid(), __initAuthenticationObject(), __setMessage(), __setMessageCode(), 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)
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 157 of file class.ilSoapAdministration.php.

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

◆ __explodeSid()

ilSoapAdministration::__explodeSid (   $sid)

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

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

142  {
143  $exploded = explode('::', $sid);
144 
145  return is_array($exploded) ? $exploded : array('sid' => '','client' => '');
146  }
+ Here is the caller graph for this function:

◆ __getMessage()

ilSoapAdministration::__getMessage ( )

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

References $message.

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapObjectAdministration\addDesktopItems(), 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\removeDesktopItems(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

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

◆ __getMessageCode()

ilSoapAdministration::__getMessageCode ( )

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapObjectAdministration\addDesktopItems(), 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\removeDesktopItems(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

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

◆ __initAuthenticationObject()

ilSoapAdministration::__initAuthenticationObject (   $a_auth_mode = AUTH_LOCAL)

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

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

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

200  {
201  include_once './Services/Authentication/classes/class.ilAuthFactory.php';
203  }
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 206 of file class.ilSoapAdministration.php.

Referenced by ilSoapUserAdministration\__getImportProtocolAsXML(), ilSoapUserAdministration\__getUserMappingAsXML(), ilSoapCourseAdministration\addCourse(), ilSoapObjectAdministration\addDesktopItems(), 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\login(), ilSoapUserAdministration\loginCAS(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapRBACAdministration\parseUserID(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeDesktopItems(), 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(), ilSoapWebLinkAdministration\updateWebLink(), and ilSoapObjectAdministration\validateReferences().

207  {
208  #echo $a_message, $a_code;
209  switch ($this->error_method) {
210  case NUSOAP:
211  return new soap_fault($a_code, '', $a_message);
212  case PHP5:
213  return new SoapFault($a_code, $a_message);
214  }
215  }
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 149 of file class.ilSoapAdministration.php.

Referenced by __construct().

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

◆ __setMessageCode()

ilSoapAdministration::__setMessageCode (   $a_code)

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

Referenced by __construct().

164  {
165  $this->message_code = $a_code;
166  }
+ 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 347 of file class.ilSoapAdministration.php.

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

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

348  {
349  global $DIC;
350 
351  $rbacsystem = $DIC['rbacsystem'];
352  if (!is_numeric($ref_id)) {
353  return $this->__raiseError(
354  'No valid id given.',
355  'Client'
356  );
357  }
358  if (!ilObject::_exists($ref_id, true)) {
359  return $this->__raiseError(
360  'No object for id.',
361  'CLIENT_OBJECT_NOT_FOUND'
362  );
363  }
364 
365  if (ilObject::_isInTrash($ref_id)) {
366  return $this->__raiseError(
367  'Object is already trashed.',
368  'CLIENT_OBJECT_DELETED'
369  );
370  }
371 
373  if ((is_array($expected_type) && !in_array($type, $expected_type))
374  ||
375  (!is_array($expected_type) && $type != $expected_type)
376  ) {
377  return $this->__raiseError("Wrong type $type for id. Expected: " . (is_array($expected_type) ? join(",", $expected_type) : $expected_type), 'CLIENT_OBJECT_WRONG_TYPE');
378  }
379 
380  if (!$rbacsystem->checkAccess($permission, $ref_id, $type)) {
381  return $this->__raiseError('Missing permission $permission for type $type.', 'CLIENT_OBJECT_WRONG_PERMISSION');
382  }
383 
384  if ($returnObject) {
385  return ilObjectFactory::getInstanceByRefId($ref_id);
386  }
387 
388  return $type;
389  }
$type
global $DIC
Definition: saml.php:7
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 438 of file class.ilSoapAdministration.php.

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

Referenced by getClientInfoXML(), and getInstallationInfoXML().

439  {
440  global $DIC;
441 
442  $ini_file = "./" . $client_dir . "/client.ini.php";
443 
444  // get settings from ini file
445  require_once("./Services/Init/classes/class.ilIniFile.php");
446 
447  $ilClientIniFile = new ilIniFile($ini_file);
448  $ilClientIniFile->read();
449  if ($ilClientIniFile->ERROR != "") {
450  return false;
451  }
452  $client_id = $ilClientIniFile->readVariable('client', 'name');
453  if ($ilClientIniFile->variableExists('client', 'expose')) {
454  $client_expose = $ilClientIniFile->readVariable('client', 'expose');
455  if ($client_expose == "0") {
456  return false;
457  }
458  }
459 
460  // build dsn of database connection and connect
461  require_once("./Services/Database/classes/class.ilDBWrapperFactory.php");
462  $ilDB = ilDBWrapperFactory::getWrapper(
463  $ilClientIniFile->readVariable("db", "type"),
464  $ilClientIniFile->readVariable("db", "inactive_mysqli")
465  );
466  $ilDB->initFromIniFile($ilClientIniFile);
467  if ($ilDB->connect(true)) {
468  unset($DIC['ilDB']);
469  $DIC['ilDB'] = $ilDB;
470 
471  require_once("Services/Administration/classes/class.ilSetting.php");
472 
473  $settings = new ilSetting();
474  unset($DIC["ilSetting"]);
475  $DIC["ilSetting"] = $settings;
476  // workaround to determine http path of client
477  define("IL_INST_ID", $settings->get("inst_id", 0));
478  $settings->access = $ilClientIniFile->readVariable("client", "access");
479  $settings->description = $ilClientIniFile->readVariable("client", "description");
480  $settings->session = min((int) ini_get("session.gc_maxlifetime"), (int) $ilClientIniFile->readVariable("session", "expire"));
481  $settings->language = $ilClientIniFile->readVariable("language", "default");
482  $settings->clientid = basename($client_dir); //pathinfo($client_dir, PATHINFO_FILENAME);
483  $settings->default_show_users_online = $settings->get("show_users_online");
484  $settings->default_hits_per_page = $settings->get("hits_per_page");
485  $skin = $ilClientIniFile->readVariable("layout", "skin");
486  $style = $ilClientIniFile->readVariable("layout", "style");
487  $settings->default_skin_style = $skin . ":" . $style;
488  return $settings;
489  }
490  return null;
491  }
$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 415 of file class.ilSoapAdministration.php.

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

416  {
417  include_once "Services/Context/classes/class.ilContext.php";
419 
420  require_once("Services/Init/classes/class.ilInitialisation.php");
422 
423  $clientdir = ILIAS_WEB_DIR . "/" . $clientid;
424  require_once("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
425  $writer = new ilSoapInstallationInfoXMLWriter();
426  $writer->setExportAdvancedMetaDataDefinitions(true);
427  $writer->setExportUDFDefinitions(true);
428  $writer->start();
429  if (is_object($client = $this->getClientInfo(null, $clientdir))) {
430  $writer->addClient($client);
431  } else {
432  return $this->__raiseError("Client ID $clientid does not exist!", 'Client');
433  }
434  $writer->end();
435  return $writer->getXML();
436  }
if($_SERVER['argc']< 4) $client
Definition: cron.php:12
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 391 of file class.ilSoapAdministration.php.

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

392  {
393  include_once "Services/Context/classes/class.ilContext.php";
395 
396  require_once("Services/Init/classes/class.ilInitialisation.php");
398 
399  $clientdirs = glob(ILIAS_WEB_DIR . "/*", GLOB_ONLYDIR);
400  require_once("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
401  $writer = new ilSoapInstallationInfoXMLWriter();
402  $writer->start();
403  if (is_array($clientdirs)) {
404  foreach ($clientdirs as $clientdir) {
405  if (is_object($clientInfo= $this->getClientInfo(null, $clientdir))) {
406  $writer->addClient($clientInfo);
407  }
408  }
409  }
410  $writer->end();
411 
412  return $writer->getXML();
413  }
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 224 of file class.ilSoapAdministration.php.

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

225  {
226  $this->initAuth($sid);
227  $this->initIlias();
228 
229  if (!$this->__checkSession($sid)) {
230  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
231  }
232 
233  global $DIC;
234 
235  $rbacsystem = $DIC['rbacsystem'];
236  $rbacreview = $DIC['rbacreview'];
237  $ilLog = $DIC['ilLog'];
238  $rbacadmin = $DIC['rbacadmin'];
239  $ilSetting = $DIC['ilSetting'];
240  $ilClientIniFile = $DIC['ilClientIniFile'];
241 
242  if (!is_object($ilClientIniFile)) {
243  return $this->__raiseError("Client ini is not initialized", "Server");
244  }
245  $auth_modes = ilAuthUtils::_getActiveAuthModes();
246  $auth_mode_default = strtoupper(ilAuthUtils::_getAuthModeName(array_shift($auth_modes)));
247  $auth_mode_names = array();
248  foreach ($auth_modes as $mode) {
249  $auth_mode_names[] = strtoupper(ilAuthUtils::_getAuthModeName($mode));
250  }
251 
252  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
253  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordXMLWriter.php';
254 
255  // create advanced meta data record xml
256  $record_ids = array();
258  foreach ($record_types as $type_info) {
259  $type = $type_info['obj_type'];
261  foreach ($records as $record) {
262  $record_ids [] = $record->getRecordId();
263  }
264  }
265  $record_ids = array_unique($record_ids);
266  $advmwriter = new ilAdvancedMDRecordXMLWriter($record_ids);
267  $advmwriter->write();
268 
269  // create user defined fields record xml, simulate empty user records
270  include_once("./Services/User/classes/class.ilUserXMLWriter.php");
271  $udfWriter = new ilUserXMLWriter();
272  $users = array();
273  $udfWriter->setObjects($users);
274  $udfWriter->start();
275 
276  // todo: get information from client id, read from ini file specificied
277  $client_details[] = array("installation_id" => IL_INST_ID,
278  "installation_version" => ILIAS_VERSION,
279  "installation_url" => ILIAS_HTTP_PATH,
280  "installation_description" => $ilClientIniFile->readVariable("client", "description"),
281  "installation_language_default" => $ilClientIniFile->readVariable("language", "default"),
282  "installation_session_expire" => $ilClientIniFile->readVariable("session", "expire"),
283  "installation_php_postmaxsize" => $this->return_bytes(ini_get("post_max_size")),
284  "authentication_methods" => join(",", $auth_mode_names),
285  "authentication_default_method" => $auth_mode_default,
286  "installation_udf_xml" => $udfWriter ->getXML(),
287  "installation_advmd_xml" => $advmwriter->xmlDumpMem(false)
288 
289  );
290 
291  // store into xml result set
292  include_once './webservice/soap/classes/class.ilXMLResultSet.php';
293 
294 
295  $xmlResult = new ilXMLResultSet();
296  $xmlResult->addArray($client_details, true);
297 
298  // create writer and return xml
299  include_once './webservice/soap/classes/class.ilXMLResultSetWriter.php';
300  $xmlResultWriter = new ilXMLResultSetWriter($xmlResult);
301  $xmlResultWriter->start();
302  return $xmlResultWriter->getXML();
303  }
XML Writer for XMLResultSet.
const ILIAS_VERSION
$type
global $DIC
Definition: saml.php:7
static _getActiveAuthModes()
$records
Definition: simple_test.php:22
static _getAuthModeName($a_auth_key)
XML writer class.
__raiseError($a_message, $a_code)
$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 177 of file class.ilSoapAdministration.php.

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapObjectAdministration\addDesktopItems(), 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\removeDesktopItems(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

178  {
179  list($sid, $client) = $this->__explodeSid($sid);
180  define('CLIENT_ID', $client);
181  $_COOKIE['ilClientId'] = $client;
182  $_COOKIE[session_name()] = $sid;
183  }
$_COOKIE['client_id']
Definition: server.php:9
if($_SERVER['argc']< 4) $client
Definition: cron.php:12
+ 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 133 of file class.ilSoapAdministration.php.

134  {
135  include_once('./Services/Init/classes/class.ilErrorHandling.php');
136 
137  set_error_handler(array('ilErrorHandling','_ilErrorWriter'), E_ALL);
138  }

◆ initIlias()

ilSoapAdministration::initIlias ( )

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

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapObjectAdministration\addDesktopItems(), 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\login(), ilSoapUserAdministration\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeDesktopItems(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

186  {
188  try {
189  require_once("Services/Init/classes/class.ilInitialisation.php");
191  } catch (Exception $e) {
192  // #10608
193  // no need to do anything here, see __checkSession() below
194  }
195  }
196  }
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 327 of file class.ilSoapAdministration.php.

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

328  {
329  switch ($this->error_method) {
330  case NUSOAP:
331  return $object instanceof soap_fault;
332  case PHP5:
333  return $object instanceof SoapFault;
334  }
335  return true;
336  }
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 309 of file class.ilSoapAdministration.php.

Referenced by getNIC().

310  {
311  $val = trim($val);
312  $last = strtolower($val[strlen($val)-1]);
313  switch ($last) {
314  // The 'G' modifier is available since PHP 5.1.0
315  case 'g':
316  $val *= 1024;
317  // no break
318  case 'm':
319  $val *= 1024;
320  // no break
321  case 'k':
322  $val *= 1024;
323  }
324  return $val;
325  }
+ 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: