ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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(), IL_SOAPMODE, and IL_SOAPMODE_NUSOAP.

64  {
65  define('USER_FOLDER_ID',7);
66  define('NUSOAP',1);
67  define('PHP5',2);
68 
70  {
71  $this->error_method = NUSOAP;
72  }
73  else
74  {
75  $this->error_method = PHP5;
76  }
77  #echo ("SOAP: using soap mode ".IL_SOAPMODE == IL_SOAPMODE_NUSOAP ? "NUSOAP": "PHP5");
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 160 of file class.ilSoapAdministration.php.

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

◆ __explodeSid()

ilSoapAdministration::__explodeSid (   $sid)

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

References array.

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

145  {
146  $exploded = explode('::',$sid);
147 
148  return is_array($exploded) ? $exploded : array('sid' => '','client' => '');
149  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ __getMessage()

ilSoapAdministration::__getMessage ( )

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), 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\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(), ilSoapLearningProgressAdministration\getProgressInfo(), 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\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

157  {
158  return $this->message;
159  }
+ Here is the caller graph for this function:

◆ __getMessageCode()

ilSoapAdministration::__getMessageCode ( )

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), 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\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(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), and ilSoapWebLinkAdministration\updateWebLink().

172  {
173  return $this->message_code;
174  }
+ Here is the caller graph for this function:

◆ __initAuthenticationObject()

ilSoapAdministration::__initAuthenticationObject (   $a_auth_mode = AUTH_LOCAL)

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

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

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

207  {
208  include_once './Services/Authentication/classes/class.ilAuthFactory.php';
210  }
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 213 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(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\canAddType(), checkObjectAccess(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), 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(), ilSoapLearningProgressAdministration\getProgressInfo(), 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(), ilSoapTestAdministration\saveQuestion(), ilSoapTestAdministration\saveQuestionSolution(), ilSoapUtils\saveTempFileAsMediaObject(), ilSoapObjectAdministration\searchObjects(), ilSoapRBACAdministration\searchRoles(), ilSoapUserAdministration\searchUser(), ilSoapUtils\sendMail(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), ilSoapGroupAdministration\updateGroup(), ilSoapObjectAdministration\updateObjects(), ilSoapWebLinkAdministration\updateWebLink(), and ilSoapObjectAdministration\validateReferences().

214  {
215  #echo $a_message, $a_code;
216  switch($this->error_method)
217  {
218  case NUSOAP:
219  return new soap_fault($a_code,'',$a_message);
220  case PHP5:
221  return new SoapFault($a_code, $a_message);
222  }
223  }
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 152 of file class.ilSoapAdministration.php.

Referenced by __construct().

153  {
154  $this->message = $a_str;
155  }
+ Here is the caller graph for this function:

◆ __setMessageCode()

ilSoapAdministration::__setMessageCode (   $a_code)

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

Referenced by __construct().

167  {
168  $this->message_code = $a_code;
169  }
+ 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 346 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().

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

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

Referenced by getClientInfoXML(), and getInstallationInfoXML().

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

◆ getClientInfoXML()

ilSoapAdministration::getClientInfoXML (   $clientid)

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

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

412  {
413  include_once "Services/Context/classes/class.ilContext.php";
415 
416  require_once("Services/Init/classes/class.ilInitialisation.php");
418 
419  $clientdir = ILIAS_WEB_DIR."/".$clientid;
420  require_once ("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
421  $writer = new ilSoapInstallationInfoXMLWriter ();
422  $writer->setExportAdvancedMetaDataDefinitions (true);
423  $writer->setExportUDFDefinitions (true);
424  $writer->start();
425  if (is_object($client = $this->getClientInfo($init, $clientdir)))
426  {
427  $writer->addClient($client);
428  }
429  else
430  return $this->__raiseError("Client ID $clientid does not exist!", 'Client');
431  $writer->end();
432  return $writer->getXML();
433  }
$client
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 384 of file class.ilSoapAdministration.php.

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

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

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

233  {
234  $this->initAuth($sid);
235  $this->initIlias();
236 
237  if(!$this->__checkSession($sid))
238  {
239  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
240  }
241 
242  global $rbacsystem, $rbacreview, $ilLog, $rbacadmin,$ilSetting, $ilClientIniFile;
243 
244  if (!is_object($ilClientIniFile)) {
245  return $this->__raiseError("Client ini is not initialized","Server");
246  }
247  $auth_modes = ilAuthUtils::_getActiveAuthModes();
248  $auth_mode_default = strtoupper(ilAuthUtils::_getAuthModeName(array_shift($auth_modes)));
249  $auth_mode_names = array();
250  foreach ($auth_modes as $mode) {
251  $auth_mode_names[] = strtoupper(ilAuthUtils::_getAuthModeName($mode));
252  }
253 
254  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
255  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordXMLWriter.php';
256 
257  // create advanced meta data record xml
258  $record_ids = array();
260  foreach($record_types as $type_info) {
261  $type = $type_info['obj_type'];
263  foreach ($records as $record){
264  $record_ids [] = $record->getRecordId();
265  }
266  }
267  $record_ids = array_unique($record_ids);
268  $advmwriter = new ilAdvancedMDRecordXMLWriter($record_ids);
269  $advmwriter->write();
270 
271  // create user defined fields record xml, simulate empty user records
272  include_once ("./Services/User/classes/class.ilUserXMLWriter.php");
273  $udfWriter = new ilUserXMLWriter();
274  $users = array();
275  $udfWriter->setObjects($users);
276  $udfWriter->start();
277 
278  // todo: get information from client id, read from ini file specificied
279  $client_details[] = array ("installation_id" => IL_INST_ID,
280  "installation_version" => ILIAS_VERSION,
281  "installation_url" => ILIAS_HTTP_PATH,
282  "installation_description" => $ilClientIniFile->readVariable("client","description"),
283  "installation_language_default" => $ilClientIniFile->readVariable("language","default"),
284  "installation_session_expire" => $ilClientIniFile->readVariable("session","expire"),
285  "installation_php_postmaxsize" => $this->return_bytes(ini_get("post_max_size")),
286  "authentication_methods" => join(",", $auth_mode_names),
287  "authentication_default_method" => $auth_mode_default,
288  "installation_udf_xml" => $udfWriter ->getXML(),
289  "installation_advmd_xml" => $advmwriter->xmlDumpMem(false)
290 
291  );
292 
293  // store into xml result set
294  include_once './webservice/soap/classes/class.ilXMLResultSet.php';
295 
296 
297  $xmlResult = new ilXMLResultSet();
298  $xmlResult->addArray($client_details, true);
299 
300  // create writer and return xml
301  include_once './webservice/soap/classes/class.ilXMLResultSetWriter.php';
302  $xmlResultWriter = new ilXMLResultSetWriter($xmlResult);
303  $xmlResultWriter->start();
304  return $xmlResultWriter->getXML();
305  }
XML Writer for XMLResultSet.
const ILIAS_VERSION
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.
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 180 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(), ilSoapRBACAdministration\addUserRoleEntry(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilSoapObjectAdministration\copyObject(), ilSoapWebLinkAdministration\createWebLink(), ilSoapCourseAdministration\deleteCourse(), ilSoapUtils\deleteExpiredDualOptInUserObjects(), ilSoapObjectAdministration\deleteObject(), ilSoapRBACAdministration\deleteRole(), ilSoapUserAdministration\deleteUser(), ilSoapRBACAdministration\deleteUserRoleEntry(), 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(), ilSoapLearningProgressAdministration\getProgressInfo(), 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\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

181  {
182  list($sid,$client) = $this->__explodeSid($sid);
183  define('CLIENT_ID',$client);
184  $_COOKIE['ilClientId'] = $client;
185  $_COOKIE['PHPSESSID'] = $sid;
186  }
$client
$_COOKIE['ilClientId']
Definition: BPMN2Parser.php:15
+ 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 136 of file class.ilSoapAdministration.php.

References array.

137  {
138  include_once('./Services/Init/classes/class.ilErrorHandling.php');
139 
140  set_error_handler(array('ilErrorHandling','_ilErrorWriter'),E_ALL);
141  }
Create styles array
The data for the language used.

◆ initIlias()

ilSoapAdministration::initIlias ( )

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

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

Referenced by ilSoapCourseAdministration\addCourse(), ilSoapExerciseAdministration\addExercise(), ilSoapFileAdministration\addFile(), ilSoapGroupAdministration\addGroup(), ilSoapObjectAdministration\addObject(), 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\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(), ilSoapLearningProgressAdministration\getProgressInfo(), 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\loginStudipUser(), ilSoapUserAdministration\logout(), ilSoapUserAdministration\lookupUser(), ilSoapObjectAdministration\moveObject(), ilSoapBackgroundTaskAdministration\processBackgroundTask(), ilSoapWebLinkAdministration\readWebLink(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilSoapTestAdministration\removeTestResults(), 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(), and ilSoapWebLinkAdministration\updateWebLink().

189  {
191  {
192  try
193  {
194  require_once("Services/Init/classes/class.ilInitialisation.php");
196  }
197  catch(Exception $e)
198  {
199  // #10608
200  // no need to do anything here, see __checkSession() below
201  }
202  }
203  }
static initILIAS()
ilias initialisation
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 326 of file class.ilSoapAdministration.php.

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

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

Referenced by getNIC().

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