ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilNusoapUserAdministrationAdapter.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
34 include_once './webservice/soap/lib/nusoap.php';
35 include_once './webservice/soap/include/inc.soap_functions.php';
36 
38 {
39  /*
40  * @var object Nusoap-Server
41  */
42  var $server = null;
43 
44 
45  function ilNusoapUserAdministrationAdapter($a_use_wsdl = true)
46  {
47  define('SERVICE_NAME','ILIASSoapWebservice');
48  define('SERVICE_NAMESPACE','urn:ilUserAdministration');
49  define('SERVICE_STYLE','rpc');
50  define('SERVICE_USE','encoded');
51  global $debug; $debug = true;
52  $this->server =& new soap_server();
53  $this->server->decode_utf8 = false;
54  $this->server->class = "ilSoapFunctions";
55 
56  if($a_use_wsdl)
57  {
58  $this->__enableWSDL();
59  }
60 
61  $this->__registerMethods();
62 
63 
64  }
65 
66  function start()
67  {
68  global $HTTP_RAW_POST_DATA;
69 
70  $this->server->service($HTTP_RAW_POST_DATA);
71  exit();
72  }
73 
74  // PRIVATE
75  function __enableWSDL()
76  {
77  $this->server->configureWSDL(SERVICE_NAME,SERVICE_NAMESPACE);
78 
79  return true;
80  }
81 
82 
83  function __registerMethods()
84  {
85 
86  // Add useful complex types. E.g. array("a","b") or array(1,2)
87  $this->server->wsdl->addComplexType('intArray',
88  'complexType',
89  'array',
90  '',
91  'SOAP-ENC:Array',
92  array(),
93  array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:int[]')),
94  'xsd:int');
95 
96  $this->server->wsdl->addComplexType('stringArray',
97  'complexType',
98  'array',
99  '',
100  'SOAP-ENC:Array',
101  array(),
102  array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')),
103  'xsd:string');
104 
105  $this->server->wsdl->addComplexType('doubleArray',
106  'complexType',
107  'array',
108  '',
109  'SOAP-ENC:Array',
110  array(),
111  array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:double[]')),
112  'xsd:double');
113 
114  // It's not possible to register classes in nusoap
115 
116  // login()
117  $this->server->register('login',
118  array('client' => 'xsd:string',
119  'username' => 'xsd:string',
120  'password' => 'xsd:string'),
121  array('sid' => 'xsd:string'),
122  SERVICE_NAMESPACE,
123  SERVICE_NAMESPACE.'#login',
124  SERVICE_STYLE,
125  SERVICE_USE,
126  'ILIAS login function');
127 
128  // loginCAS()
129  $this->server->register('loginCAS',
130  array('client' => 'xsd:string',
131  'PT' => 'xsd:string',
132  'user' => 'xsd:string'),
133  array('sid' => 'xsd:string'),
134  SERVICE_NAMESPACE,
135  SERVICE_NAMESPACE.'#loginCAS',
136  SERVICE_STYLE,
137  SERVICE_USE,
138  'ILIAS login function via CAS');
139  // loginLDAP()
140  $this->server->register('loginLDAP',
141  array('client' => 'xsd:string',
142  'username' => 'xsd:string',
143  'password' => 'xsd:string'),
144  array('sid' => 'xsd:string'),
145  SERVICE_NAMESPACE,
146  SERVICE_NAMESPACE.'#login',
147  SERVICE_STYLE,
148  SERVICE_USE,
149  'ILIAS login function via LDAP');
150 
151 
152 
153  // logout()
154  $this->server->register('logout',
155  array('sid' => 'xsd:string'),
156  array('success' => 'xsd:boolean'),
157  SERVICE_NAMESPACE,
158  SERVICE_NAMESPACE.'#logout',
159  SERVICE_STYLE,
160  SERVICE_USE,
161  'ILIAS logout function');
162  // user_data definitions
163  $this->server->wsdl->addComplexType('ilUserData',
164  'complexType',
165  'struct',
166  'all',
167  '',
168  array('usr_id' => array('name' => 'usr_id','type' => 'xsd:int'),
169  'login' => array('name' => 'login', 'type' => 'xsd:string'),
170  'passwd' => array('name' => 'passwd', 'type' => 'xsd:string'),
171  'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'),
172  'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'),
173  'title' => array('name' => 'title', 'type' => 'xsd:string'),
174  'gender' => array('name' => 'gender', 'type' => 'xsd:string'),
175  'email' => array('name' => 'email', 'type' => 'xsd:string'),
176  'institution' => array('name' => 'institution', 'type' => 'xsd:string'),
177  'street' => array('name' => 'street', 'type' => 'xsd:string'),
178  'city' => array('name' => 'city', 'type' => 'xsd:string'),
179  'zipcode' => array('name' => 'zipcode', 'type' => 'xsd:string'),
180  'country' => array('name' => 'country', 'type' => 'xsd:string'),
181  'phone_office' => array('name' => 'phone_office', 'type' => 'xsd:string'),
182  'last_login' => array('name' => 'last_login', 'type' => 'xsd:string'),
183  'last_update' => array('name' => 'last_update', 'type' => 'xsd:string'),
184  'create_date' => array('name' => 'create_date', 'type' => 'xsd:string'),
185  'hobby' => array('name' => 'hobby', 'type' => 'xsd:string'),
186  'department' => array('name' => 'department', 'type' => 'xsd:string'),
187  'phone_home' => array('name' => 'phone_home', 'type' => 'xsd:string'),
188  'phone_mobile' => array('name' => 'phone_mobile', 'type' => 'xsd:string'),
189  'fax' => array('name' => 'fax', 'type' => 'xsd:string'),
190  'time_limit_owner' => array('name' => 'time_limit_owner', 'type' => 'xsd:int'),
191  'time_limit_unlimited' => array('name' => 'time_limit_unlimited', 'type' => 'xsd:int'),
192  'time_limit_from' => array('name' => 'time_limit_from', 'type' => 'xsd:int'),
193  'time_limit_until' => array('name' => 'time_limit_until', 'type' => 'xsd:int'),
194  'time_limit_message' => array('name' => 'time_limit_message', 'type' => 'xsd:int'),
195  'referral_comment' => array('name' => 'referral_comment', 'type' => 'xsd:string'),
196  'matriculation' => array('name' => 'matriculation', 'type' => 'xsd:string'),
197  'active' => array('name' => 'active', 'type' => 'xsd:int'),
198  'accepted_agreement' => array('name' => 'accepted_agreement','type' => 'xsd:boolean'),
199  'approve_date' => array('name' => 'approve_date', 'type' => 'xsd:string'),
200  'user_skin' => array('name' => 'user_skin', 'type' => 'xsd:string'),
201  'user_style' => array('name' => 'user_style', 'type' => 'xsd:string'),
202  'user_language' => array('name' => 'user_language', 'type' => 'xsd:string'),
203  'import_id' => array('name' => 'import_id', 'type' => 'xsd:string')
204  ));
205 
206 
207  // lookupUser()
208  $this->server->register('lookupUser',
209  array('sid' => 'xsd:string',
210  'user_name' => 'xsd:string'),
211  array('usr_id' => 'xsd:int'),
212  SERVICE_NAMESPACE,
213  SERVICE_NAMESPACE.'#lookupUser',
214  SERVICE_STYLE,
215  SERVICE_USE,
216  'ILIAS lookupUser(): check if username exists. Return usr_id or 0 if lookup fails.');
217 
218 
219  // getUser()
220  $this->server->register('getUser',
221  array('sid' => 'xsd:string',
222  'user_id' => 'xsd:int'),
223  array('user_data' => 'tns:ilUserData'),
224  SERVICE_NAMESPACE,
225  SERVICE_NAMESPACE.'#getUser',
226  SERVICE_STYLE,
227  SERVICE_USE,
228  'ILIAS getUser(): get complete set of user data.');
229  // updateUser()
230  $this->server->register('updateUser',
231  array('sid' => 'xsd:string',
232  'user_data' => 'tns:ilUserData'),
233  array('success' => 'xsd:boolean'),
234  SERVICE_NAMESPACE,
235  SERVICE_NAMESPACE.'#updateUser',
236  SERVICE_STYLE,
237  SERVICE_USE,
238  'ILIAS updateUser(). DEPRECATED: Use importUsers() for modifications of user data. Updates all user data. '.
239  'Use getUser(), then modify desired fields and finally start the updateUser() call.');
240  // Update password
241  $this->server->register('updatePassword',
242  array('sid' => 'xsd:string',
243  'user_id' => 'xsd:int',
244  'new_password' => 'xsd:string'),
245  array('success' => 'xsd:boolean'),
246  SERVICE_NAMESPACE,
247  SERVICE_NAMESPACE.'#updatePassword',
248  SERVICE_STYLE,
249  SERVICE_USE,
250  'ILIAS updatePassword(). Updates password of given user. Password must be MD5 hash');
251 
252 
253  // addUser()
254  $this->server->register('addUser',
255  array('sid' => 'xsd:string',
256  'user_data' => 'tns:ilUserData',
257  'global_role_id' => 'xsd:int'),
258  array('user_id' => 'xsd:int'),
259  SERVICE_NAMESPACE,
260  SERVICE_NAMESPACE.'#addUser',
261  SERVICE_STYLE,
262  SERVICE_USE,
263  'ILIAS addUser() user. DEPRECATED: Since it is not possible to add new user data fields '.
264  'without breaking the backward compatability, this method is deprecated. Please use importUser() instead. '.
265  'Add new ILIAS user. Requires complete or subset of user_data structure');
266 
267  // deleteUser()
268  $this->server->register('deleteUser',
269  array('sid' => 'xsd:string',
270  'user_id' => 'xsd:int'),
271  array('success' => 'xsd:boolean'),
272  SERVICE_NAMESPACE,
273  SERVICE_NAMESPACE.'#deleteUser',
274  SERVICE_STYLE,
275  SERVICE_USE,
276  'ILIAS deleteUser(). Deletes all user related data (Bookmarks, Mails ...)');
277 
278  // addCourse()
279  $this->server->register('addCourse',
280  array('sid' => 'xsd:string',
281  'target_id' => 'xsd:int',
282  'crs_xml' => 'xsd:string'),
283  array('course_id' => 'xsd:int'),
284  SERVICE_NAMESPACE,
285  SERVICE_NAMESPACE.'#addCourse',
286  SERVICE_STYLE,
287  SERVICE_USE,
288  'ILIAS addCourse(). Course import. See ilias_course_0_1.dtd for details about course xml structure');
289 
290  // deleteCourse()
291  $this->server->register('deleteCourse',
292  array('sid' => 'xsd:string',
293  'course_id' => 'xsd:int'),
294  array('success' => 'xsd:boolean'),
295  SERVICE_NAMESPACE,
296  SERVICE_NAMESPACE.'#deleteCourse',
297  SERVICE_STYLE,
298  SERVICE_USE,
299  'ILIAS deleteCourse(). Deletes a course. Delete courses are stored in "Trash" and can be undeleted in '.
300  ' the ILIAS administration. ');
301  // assignCourseMember()
302  $this->server->register('assignCourseMember',
303  array('sid' => 'xsd:string',
304  'course_id' => 'xsd:int',
305  'user_id' => 'xsd:int',
306  'type' => 'xsd:string'),
307  array('success' => 'xsd:boolean'),
308  SERVICE_NAMESPACE,
309  SERVICE_NAMESPACE.'#assignCourseMember',
310  SERVICE_STYLE,
311  SERVICE_USE,
312  'ILIAS assignCourseMember(). Assigns an user to an existing course. Type should be "Admin", "Tutor" or "Member"');
313 
314  // excludeCourseMember()
315  $this->server->register('excludeCourseMember',
316  array('sid' => 'xsd:string',
317  'course_id' => 'xsd:int',
318  'user_id' => 'xsd:int'),
319  array('success' => 'xsd:boolean'),
320  SERVICE_NAMESPACE,
321  SERVICE_NAMESPACE.'#excludeCourseMember',
322  SERVICE_STYLE,
323  SERVICE_USE,
324  'ILIAS excludeCourseMember(). Excludes an user from an existing course.');
325 
326  // isAssignedToCourse()
327  $this->server->register('isAssignedToCourse',
328  array('sid' => 'xsd:string',
329  'course_id' => 'xsd:int',
330  'user_id' => 'xsd:int'),
331  array('role' => 'xsd:int'),
332  SERVICE_NAMESPACE,
333  SERVICE_NAMESPACE.'#isAssignedToCourse',
334  SERVICE_STYLE,
335  SERVICE_USE,
336  'ILIAS isAssignedToCourse(). Checks whether an user is assigned to a given course. '.
337  'Returns 0 => not assigned, 1 => course admin, 2 => course member or 3 => course tutor');
338 
339  // getCourseXML($sid,$course_id)
340  $this->server->register('getCourseXML',
341  array('sid' => 'xsd:string',
342  'course_id' => 'xsd:int'),
343  array('xml' => 'xsd:string'),
344  SERVICE_NAMESPACE,
345  SERVICE_NAMESPACE.'#getCourseXML',
346  SERVICE_STYLE,
347  SERVICE_USE,
348  'ILIAS getCourseXML(). Get a xml description of a specific course.');
349 
350  // updateCourse($sid,$course_id,$xml)
351  $this->server->register('updateCourse',
352  array('sid' => 'xsd:string',
353  'course_id' => 'xsd:int',
354  'xml' => 'xsd:string'),
355  array('success' => 'xsd:boolean'),
356  SERVICE_NAMESPACE,
357  SERVICE_NAMESPACE.'#updateCourse',
358  SERVICE_STYLE,
359  SERVICE_USE,
360  'ILIAS updateCourse(). Update course settings, assigned members, tutors, administrators with a '.
361  'given xml description');
362 
363  // get obj_id by import id
364  $this->server->register('getObjIdByImportId',
365  array('sid' => 'xsd:string',
366  'import_id' => 'xsd:string'),
367  array('obj_id' => 'xsd:int'),
368  SERVICE_NAMESPACE,
369  SERVICE_NAMESPACE.'#getCourseIdByImportId',
370  SERVICE_STYLE,
371  SERVICE_USE,
372  'ILIAS getObjIdByImportId(). Get the obj_id of an ILIAS obj by a given import id.');
373 
374 
375  // get ref ids by import id
376  $this->server->register('getRefIdsByImportId',
377  array('sid' => 'xsd:string',
378  'import_id' => 'xsd:string'),
379  array('ref_ids' => 'tns:intArray'),
380  SERVICE_NAMESPACE,
381  SERVICE_NAMESPACE.'#getRefIdsByImportId',
382  SERVICE_STYLE,
383  SERVICE_USE,
384  'ILIAS getRefIdsByImportId(). Get all reference ids by a given import id.');
385 
386  // get obj_id by import id
387  $this->server->register('getRefIdsByObjId',
388  array('sid' => 'xsd:string',
389  'obj_id' => 'xsd:string'),
390  array('ref_ids' => 'tns:intArray'),
391  SERVICE_NAMESPACE,
392  SERVICE_NAMESPACE.'#getRefIdsByObjId',
393  SERVICE_STYLE,
394  SERVICE_USE,
395  'ILIAS getRefIdsByObjId(). Get all reference ids by a given object id.');
396 
397  // Object administration
398  $this->server->register('getObjectByReference',
399  array('sid' => 'xsd:string',
400  'reference_id' => 'xsd:int',
401  'user_id' => 'xsd:int'),
402  array('object_xml' => 'xsd:string'),
403  SERVICE_NAMESPACE,
404  SERVICE_NAMESPACE.'#getObjectByReference',
405  SERVICE_STYLE,
406  SERVICE_USE,
407  'ILIAS getObjectByReference(). Get XML-description of an ILIAS object. If a user id is given, '.
408  'this methods also checks the permissions of that user on the object.');
409 
410  $this->server->register('getObjectsByTitle',
411  array('sid' => 'xsd:string',
412  'title' => 'xsd:string',
413  'user_id' => 'xsd:int'),
414  array('object_xml' => 'xsd:string'),
415  SERVICE_NAMESPACE,
416  SERVICE_NAMESPACE.'#getObjectsByTitle',
417  SERVICE_STYLE,
418  SERVICE_USE,
419  'ILIAS getObjectsByTitle(). Get XML-description of an ILIAS object with given title. '.
420  'If a user id is given this method also checks the permissions of that user on the object.');
421 
422  $this->server->register('searchObjects',
423  array('sid' => 'xsd:string',
424  'types' => 'tns:stringArray',
425  'key' => 'xsd:string',
426  'combination' => 'xsd:string',
427  'user_id' => 'xsd:int'),
428  array('object_xml' => 'xsd:string'),
429  SERVICE_NAMESPACE,
430  SERVICE_NAMESPACE.'#searchObjects',
431  SERVICE_STYLE,
432  SERVICE_USE,
433  'ILIAS searchObjects(): Searches for objects. Key is within "title" or "description" '.
434  'Typical calls are searchObject($sid,array("lm","crs"),"\"this and that\"","and"); '.
435  ' If an optional user id is given, this methods also return the permissions for that user '.
436  'on the found objects');
437 
438  $this->server->register('getTreeChilds',
439  array('sid' => 'xsd:string',
440  'ref_id' => 'xsd:int',
441  'types' => 'tns:stringArray',
442  'user_id' => 'xsd:int'),
443  array('object_xml' => 'xsd:string'),
444  SERVICE_NAMESPACE,
445  SERVICE_NAMESPACE.'#getTreeChilds',
446  SERVICE_STYLE,
447  SERVICE_USE,
448  'ILIAS getTreeChilds(): Get all child objects of a given object.'.
449  'Choose array of types to filter the output. Choose empty type array to receive all object types');
450 
451  $this->server->register('getXMLTree',
452  array('sid' => 'xsd:string',
453  'ref_id' => 'xsd:int',
454  'types' => 'tns:stringArray',
455  'user_id' => 'xsd:int'),
456  array('object_xml' => 'xsd:string'),
457  SERVICE_NAMESPACE,
458  SERVICE_NAMESPACE.'#getXMLTree',
459  SERVICE_STYLE,
460  SERVICE_USE,
461  'ILIAS getXMLTree(): Returns a xml stream with the subtree objects.');
462 
463 
464 
465  $this->server->register('addObject',
466  array('sid' => 'xsd:string',
467  'target_id' => 'xsd:int',
468  'object_xml' => 'xsd:string'),
469  array('ref_id' => 'xsd:int'),
470  SERVICE_NAMESPACE,
471  SERVICE_NAMESPACE.'#addObject',
472  SERVICE_STYLE,
473  SERVICE_USE,
474  'ILIAS addObject. Create new object based on xml description under a given node '.
475  '("category,course,group or folder). Return created reference id of the new object.' );
476 
477  $this->server->register('updateObjects',
478  array('sid' => 'xsd:string',
479  'object_xml' => 'xsd:string'),
480  array('success' => 'xsd:boolean'),
481  SERVICE_NAMESPACE,
482  SERVICE_NAMESPACE.'#updateObjects',
483  SERVICE_STYLE,
484  SERVICE_USE,
485  'ILIAS updateObjects. Update object data (title,description,owner)');
486 
487  $this->server->register('addReference',
488  array('sid' => 'xsd:string',
489  'source_id' => 'xsd:int',
490  'target_id' => 'xsd:int'),
491  array('ref_id' => 'xsd:int'),
492  SERVICE_NAMESPACE,
493  SERVICE_NAMESPACE.'#addReference',
494  SERVICE_STYLE,
495  SERVICE_USE,
496  'ILIAS addReference. Create new link of given object to new object. Return the new reference id');
497 
498  $this->server->register('deleteObject',
499  array('sid' => 'xsd:string',
500  'reference_id' => 'xsd:int'),
501  array('success' => 'xsd:boolean'),
502  SERVICE_NAMESPACE,
503  SERVICE_NAMESPACE.'#deleteObject',
504  SERVICE_STYLE,
505  SERVICE_USE,
506  'ILIAS deleteObject. Stores object in trash. If multiple references exist, only the reference is deleted ');
507 
508 
509  $this->server->register('removeFromSystemByImportId',
510  array('sid' => 'xsd:string',
511  'import_id' => 'xsd:string'),
512  array('success' => 'xsd:boolean'),
513  SERVICE_NAMESPACE,
514  SERVICE_NAMESPACE.'#removeFromSystemByImportId',
515  SERVICE_STYLE,
516  SERVICE_USE,
517  'ILIAS removeFromSystemByImportId(). Removes an object identified by its import id permanently from the '.
518  'system. All data will be deleted. There will be no possibility to restore it from the trash. Do not use '.
519  'this function for deleting roles or users. Use deleteUser() or deleteRole() instead.');
520 
521  $this->server->register('addUserRoleEntry',
522  array('sid' => 'xsd:string',
523  'user_id' => 'xsd:int',
524  'role_id' => 'xsd:int'),
525  array('success' => 'xsd:boolean'),
526  SERVICE_NAMESPACE,
527  SERVICE_NAMESPACE.'#addUserRoleEntry',
528  SERVICE_STYLE,
529  SERVICE_USE,
530  'ILIAS addUserRoleEntry. Assign user to role.');
531 
532  $this->server->register('deleteUserRoleEntry',
533  array('sid' => 'xsd:string',
534  'user_id' => 'xsd:int',
535  'role_id' => 'xsd:int'),
536  array('success' => 'xsd:boolean'),
537  SERVICE_NAMESPACE,
538  SERVICE_NAMESPACE.'#deleteUserRoleEntry',
539  SERVICE_STYLE,
540  SERVICE_USE,
541  'ILIAS deleteUserRoleEntry. Deassign user from role.');
542 
543 
544  // Add complex type for operations e.g array(array('name' => 'read','ops_id' => 2),...)
545  $this->server->wsdl->addComplexType('ilOperation',
546  'complexType',
547  'struct',
548  'all',
549  '',
550  array('ops_id' => array('name' => 'ops_id',
551  'type' => 'xsd:int'),
552  'operation' => array('name' => 'operation',
553  'type' => 'xsd:string'),
554  'description' => array('name' => 'description',
555  'type' => 'xsd:string')));
556  // Now create an array of ilOperations
557  $this->server->wsdl->addComplexType('ilOperations',
558  'complexType',
559  'array',
560  '',
561  'SOAP-ENC:Array',
562  array(),
563  array(array('ref' => 'SOAP-ENC:arrayType',
564  'wsdl:arrayType' => 'tns:ilOperation[]')),
565  'tns:ilOperation');
566  $this->server->register('getOperations',
567  array('sid' => 'xsd:string'),
568  array('operations' => 'tns:ilOperations'),
569  SERVICE_NAMESPACE,
570  SERVICE_NAMESPACE.'#getOperations',
571  SERVICE_STYLE,
572  SERVICE_USE,
573  'ILIAS getOperations(): get complete set of RBAC operations.');
574 
575  $this->server->register('revokePermissions',
576  array('sid' => 'xsd:string',
577  'ref_id' => 'xsd:int',
578  'role_id' => 'xsd:int'),
579  array('success' => 'xsd:boolean'),
580  SERVICE_NAMESPACE,
581  SERVICE_NAMESPACE.'#revokePermissions',
582  SERVICE_STYLE,
583  SERVICE_USE,
584  'ILIAS revokePermissions(): Revoke all permissions for a specific role on an object.');
585 
586  $this->server->wsdl->addComplexType('ilOperationIds',
587  'complexType',
588  'array',
589  '',
590  'SOAP-ENC:Array',
591  array(),
592  array(array('ref' => 'SOAP-ENC:arrayType',
593  'wsdl:arrayType' => 'xsd:int[]')),
594  'xsd:int');
595 
596  $this->server->register('grantPermissions',
597  array('sid' => 'xsd:string',
598  'ref_id' => 'xsd:int',
599  'role_id' => 'xsd:int',
600  'operations' => 'tns:intArray'),
601  array('success' => 'xsd:boolean'),
602  SERVICE_NAMESPACE,
603  SERVICE_NAMESPACE.'#grantPermissions',
604  SERVICE_STYLE,
605  SERVICE_USE,
606  'ILIAS grantPermissions(): Grant permissions for a specific role on an object. '.
607  '(Substitutes existing permission settings)');
608 
609  $this->server->register('getLocalRoles',
610  array('sid' => 'xsd:string',
611  'ref_id' => 'xsd:int'),
612  array('role_xml' => 'xsd:string'),
613  SERVICE_NAMESPACE,
614  SERVICE_NAMESPACE.'#getLocalRoles',
615  SERVICE_STYLE,
616  SERVICE_USE,
617  'ILIAS getLocalRoles(): Get all local roles assigned to an specific object.');
618 
619  $this->server->register('getUserRoles',
620  array('sid' => 'xsd:string',
621  'user_id' => 'xsd:int'),
622  array('role_xml' => 'xsd:string'),
623  SERVICE_NAMESPACE,
624  SERVICE_NAMESPACE.'#getLocalRoles',
625  SERVICE_STYLE,
626  SERVICE_USE,
627  'ILIAS getUserRoles(): Get all local roles assigned to an specific user. ');
628 
629  $this->server->register('addRole',
630  array('sid' => 'xsd:string',
631  'target_id' => 'xsd:int',
632  'obj_xml' => 'xsd:string'),
633  array('role_ids' => 'tns:intArray'),
634  SERVICE_NAMESPACE,
635  SERVICE_NAMESPACE.'#addRole',
636  SERVICE_STYLE,
637  SERVICE_USE,
638  'ILIAS addRole(): Creates new role under given node. "target_id" is the reference id of an ILIAS '.
639  'ILIAS object. E.g ref_id of crs,grp. If no role folder exists, a new role folder will be created.');
640 
641  $this->server->register('deleteRole',
642  array('sid' => 'xsd:string',
643  'role_id' => 'xsd:int'),
644  array('success' => 'xsd:boolean'),
645  SERVICE_NAMESPACE,
646  SERVICE_NAMESPACE.'#deleteRole',
647  SERVICE_STYLE,
648  SERVICE_USE,
649  'ILIAS deleteRole(): Deletes an role and all user assignments. Fails if it is the last role of an user');
650 
651  $this->server->register('addRoleFromTemplate',
652  array('sid' => 'xsd:string',
653  'target_id' => 'xsd:int',
654  'obj_xml' => 'xsd:string',
655  'role_template_id' => 'xsd:int'),
656  array('role_ids' => 'tns:intArray'),
657  SERVICE_NAMESPACE,
658  SERVICE_NAMESPACE.'#addRole',
659  SERVICE_STYLE,
660  SERVICE_USE,
661  'ILIAS addRole(): Creates new role under given node. "target_id" is the reference id of an ILIAS '.
662  'ILIAS object. E.g ref_id of crs,grp. If no role folder exists, a new role folder will be created. '.
663  'In addition to addRole the template permissions will be copied from the given role template');
664 
665  $this->server->register('getObjectTreeOperations',
666  array('sid' => 'xsd:string',
667  'ref_id' => 'xsd:int',
668  'user_id' => 'xsd:int'),
669  array('operations' => 'tns:ilOperations'),
670  SERVICE_NAMESPACE,
671  SERVICE_NAMESPACE.'#getPermissionsForObject',
672  SERVICE_STYLE,
673  SERVICE_USE,
674  'ILIAS getObjectTreeOperations(): Get all granted permissions for all references of '.
675  'an object for a specific user. Returns array of granted operations or empty array');
676 
677  $this->server->register('addGroup',
678  array('sid' => 'xsd:string',
679  'target_id' => 'xsd:int',
680  'group_xml' => 'xsd:string'),
681  array('ref_id' => 'xsd:int'),
682  SERVICE_NAMESPACE,
683  SERVICE_NAMESPACE.'#addGroup',
684  SERVICE_STYLE,
685  SERVICE_USE,
686  'ILIAS addGroup(): Add grop according to valid group XML '.
687  '@See ilias_group_0_1.dtd');
688 
689  $this->server->register('groupExists',
690  array('sid' => 'xsd:string',
691  'title' => 'xsd:string'),
692  array('exists' => 'xsd:boolean'),
693  SERVICE_NAMESPACE,
694  SERVICE_NAMESPACE.'#groupExists',
695  SERVICE_STYLE,
696  SERVICE_USE,
697  'ILIAS addGroup(): Check if group with given name exists. ');
698 
699 
700  // getGroup
701  $this->server->register('getGroup',
702  array('sid' => 'xsd:string',
703  'ref_id' => 'xsd:int'),
704  array('group_xml' => 'xsd:string'),
705  SERVICE_NAMESPACE,
706  SERVICE_NAMESPACE.'#getGroup',
707  SERVICE_STYLE,
708  SERVICE_USE,
709  'ILIAS getGroup(): get xml description of grouip with given reference id.');
710 
711  // assignGroupMember()
712  $this->server->register('assignGroupMember',
713  array('sid' => 'xsd:string',
714  'group_id' => 'xsd:int',
715  'user_id' => 'xsd:int',
716  'type' => 'xsd:string'),
717  array('success' => 'xsd:boolean'),
718  SERVICE_NAMESPACE,
719  SERVICE_NAMESPACE.'#assignGroupMember',
720  SERVICE_STYLE,
721  SERVICE_USE,
722  'ILIAS assignGroupMember(). Assigns an user to an existing group. Type should be "Admin","Member"');
723 
724  // excludeGroupMember()
725  $this->server->register('excludeGroupMember',
726  array('sid' => 'xsd:string',
727  'group_id' => 'xsd:int',
728  'user_id' => 'xsd:int'),
729  array('success' => 'xsd:boolean'),
730  SERVICE_NAMESPACE,
731  SERVICE_NAMESPACE.'#excludeGroupMember',
732  SERVICE_STYLE,
733  SERVICE_USE,
734  'ILIAS excludeGroupMember(). Excludes an user from an existing group.');
735 
736  // isAssignedToGroup()
737  $this->server->register('isAssignedToGroup',
738  array('sid' => 'xsd:string',
739  'group_id' => 'xsd:int',
740  'user_id' => 'xsd:int'),
741  array('role' => 'xsd:int'),
742  SERVICE_NAMESPACE,
743  SERVICE_NAMESPACE.'#isAssignedToGroup',
744  SERVICE_STYLE,
745  SERVICE_USE,
746  'ILIAS isAssignedToGroup(). Checks whether an user is assigned to a given group. '.
747  'Returns 0 => not assigned, 1 => group admin, 2 => group member');
748 
749 
750 
751  // ILIAS util functions
752  $this->server->register('sendMail',
753  array('sid' => 'xsd:string',
754  'rcp_to' => 'xsd:string',
755  'rcp_cc' => 'xsd:string',
756  'rcp_bcc' => 'xsd:string',
757  'sender' => 'xsd:string',
758  'subject' => 'xsd:string',
759  'message' => 'xsd:string',
760  'attachments' => 'xsd:string'),
761  array('status' => 'xsd:boolean'),
762  SERVICE_NAMESPACE,
763  SERVICE_NAMESPACE.'#sendMail',
764  SERVICE_STYLE,
765  SERVICE_USE,
766  'ILIAS sendMail(): Send mime mails according to xml description. Only for internal usage '.
767  'Syntax, parameters may change in future releases');
768  // Clone functions
769  $this->server->register('ilClone',
770  array('sid' => 'xsd:string','copy_identifier' => 'xsd:int'),
771  array('new_ref_id' => 'xsd:int'),
772  SERVICE_NAMESPACE,
773  SERVICE_NAMESPACE.'#ilClone',
774  SERVICE_STYLE,
775  SERVICE_USE,
776  'ILIAS ilClone(): Only for internal usage.'.
777  'Syntax, parameters may change in future releases. ');
778 
779  $this->server->register('handleECSTasks',
780  array('sid' => 'xsd:string'),
781  array('success' => 'xsd:boolean'),
782  SERVICE_NAMESPACE,
783  SERVICE_NAMESPACE.'#handleECSTasks',
784  SERVICE_STYLE,
785  SERVICE_USE,
786  'ILIAS handleECSTasks(): Only for internal usage.'.
787  'Syntax, parameters may change in future releases. ');
788 
789  $this->server->register('ilCloneDependencies',
790  array('sid' => 'xsd:string','copy_identifier' => 'xsd:int'),
791  array('success' => 'xsd:boolean'),
792  SERVICE_NAMESPACE,
793  SERVICE_NAMESPACE.'#ilCloneDependencies',
794  SERVICE_STYLE,
795  SERVICE_USE,
796  'ILIAS ilCloneDependencies(): Only for internal usage.'.
797  'Syntax, parameters may change in future releases. ');
798 
799  $this->server->register('saveQuestionResult',
800  array('sid' => 'xsd:string',
801  'user_id' => 'xsd:int',
802  'test_id' => 'xsd:int',
803  'question_id' => 'xsd:int',
804  'pass' => 'xsd:int',
805  'solution' => 'tns:stringArray'),
806  array('status' => 'xsd:boolean'),
807  SERVICE_NAMESPACE,
808  SERVICE_NAMESPACE.'#saveQuestionResult',
809  SERVICE_STYLE,
810  SERVICE_USE,
811  'ILIAS saveQuesionResult: Typically called from an external assessment question to save the user input. DEPRECATED since ILIAS 3.9');
812 
813  $this->server->register('saveQuestion',
814  array('sid' => 'xsd:string',
815  'active_id' => 'xsd:long',
816  'question_id' => 'xsd:long',
817  'pass' => 'xsd:int',
818  'solution' => 'tns:stringArray'),
819  array('status' => 'xsd:boolean'),
820  SERVICE_NAMESPACE,
821  SERVICE_NAMESPACE.'#saveQuestion',
822  SERVICE_STYLE,
823  SERVICE_USE,
824  'ILIAS saveQuestion: Saves the result of a question in a given test pass for the active test user. The active user is identified by the active ID, which assigns a user to a test.');
825 
826  $this->server->register('saveQuestionSolution',
827  array('sid' => 'xsd:string',
828  'active_id' => 'xsd:long',
829  'question_id' => 'xsd:long',
830  'pass' => 'xsd:int',
831  'solution' => 'xsd:string'),
832  array('status' => 'xsd:string'),
833  SERVICE_NAMESPACE,
834  SERVICE_NAMESPACE.'#saveQuestionSolution',
835  SERVICE_STYLE,
836  SERVICE_USE,
837  'ILIAS saveQuestionSolution: Saves the result of a question in a given test pass for the active test user. The active user is identified by the active ID, which assigns a user to a test. The solution has to be an XML string which contains &lt;values&gt;&lt;value&gt;VALUE&lt;/value&gt;&lt;value&gt;VALUE&lt;/value&gt;&lt;points&gt;POINTS&lt;/points&gt;...&lt;/values&gt; where the triplet (value,value,points) can repeat n times. The result string is either TRUE or it contains an error message.');
838 
839  $this->server->register('getQuestionSolution',
840  array('sid' => 'xsd:string',
841  'active_id' => 'xsd:long',
842  'question_id' => 'xsd:int',
843  'pass' => 'xsd:int'),
844  array('solution' => 'tns:stringArray'),
845  SERVICE_NAMESPACE,
846  SERVICE_NAMESPACE.'#getQuestionSolution',
847  SERVICE_STYLE,
848  SERVICE_USE,
849  'ILIAS getQuestionSolution: Typically called from external assessment questions to retrieve the previous input of a user.');
850 
851  $this->server->register('getTestUserData',
852  array('sid' => 'xsd:string',
853  'active_id' => 'xsd:long'),
854  array('userdata' => 'tns:stringArray'),
855  SERVICE_NAMESPACE,
856  SERVICE_NAMESPACE.'#getTestUserData',
857  SERVICE_STYLE,
858  SERVICE_USE,
859  'ILIAS getTestUserData: Typically called from external assessment questions to retrieve data of the active user. The returned string array values are fullname, title, firstname, lastname, login.');
860 
861  $this->server->register('getPositionOfQuestion',
862  array('sid' => 'xsd:string',
863  'active_id' => 'xsd:long',
864  'question_id' => 'xsd:int',
865  'pass' => 'xsd:int'),
866  array('position' => 'xsd:int'),
867  SERVICE_NAMESPACE,
868  SERVICE_NAMESPACE.'#getPositionOfQuestion',
869  SERVICE_STYLE,
870  SERVICE_USE,
871  'ILIAS getPositionOfQuestion: Returns the position of a given question for a given user in a given test pass.');
872 
873  $this->server->register('getPreviousReachedPoints',
874  array('sid' => 'xsd:string',
875  'active_id' => 'xsd:long',
876  'question_id' => 'xsd:int',
877  'pass' => 'xsd:int'),
878  array('position' => 'tns:doubleArray'),
879  SERVICE_NAMESPACE,
880  SERVICE_NAMESPACE.'#getPreviousReachedPoints',
881  SERVICE_STYLE,
882  SERVICE_USE,
883  'ILIAS getPreviousReachedPoints: Returns an array of reached points for the previous questions in a given test pass.');
884 
885  $this->server->register('getNrOfQuestionsInPass',
886  array('sid' => 'xsd:string',
887  'active_id' => 'xsd:long',
888  'pass' => 'xsd:int'),
889  array('count' => 'xsd:int'),
890  SERVICE_NAMESPACE,
891  SERVICE_NAMESPACE.'#getNrOfQuestionsInPass',
892  SERVICE_STYLE,
893  SERVICE_USE,
894  'ILIAS getNrOfQuestionsInPass: Returns the question count for a given test user in a given pass.');
895 
896  $this->server->register('getStructureObjects',
897  array('sid' => 'xsd:string',
898  'ref_id' => 'xsd:int'),
899  array('xml' => 'xsd:string'),
900  SERVICE_NAMESPACE,
901  SERVICE_NAMESPACE.'#getStructureObjects',
902  SERVICE_STYLE,
903  SERVICE_USE,
904  'ILIAS getStructureObjects: delivers structure of content objects like learning modules (chapters/pages) or glossary (terms)');
905 
906  // importUsers()
907  $this->server->register('importUsers',
908  array('sid' => 'xsd:string',
909  'folder_id' => 'xsd:int',
910  'usr_xml' => 'xsd:string',
911  'conflict_rule' => 'xsd:int',
912  'send_account_mail' => 'xsd:int'),
913  array('protocol' => 'xsd:string'),
914  SERVICE_NAMESPACE,
915  SERVICE_NAMESPACE.'#importUsers',
916  SERVICE_STYLE,
917  SERVICE_USE,
918  'ILIAS import users into folder id, which should be ref_id of folder or user folder (-1:System user folder, 0: checks access at user level, otherwise refid): conflict_rule: IL_FAIL_ON_CONFLICT = 1, IL_UPDATE_ON_CONFLICT = 2, IL_IGNORE_ON_CONFLICT = 3. The Return-Value is a protocol with the columns userid, login, action, message, following xmlresultset dtd. Send Account Mail = 0 deactivates sending a mail to each user, 1 activates it');
919 
920  $this->server->register('getRoles',
921  array('sid' => 'xsd:string',
922  'role_type' => 'xsd:string',
923  'id' => 'xsd:string'),
924  array('role_xml' => 'xsd:string'),
925  SERVICE_NAMESPACE,
926  SERVICE_NAMESPACE.'#getRoles',
927  SERVICE_STYLE,
928  SERVICE_USE,
929  'ILIAS getRoles():if id equals -1, get all roles specified by type (global|local|user|user_login|template or empty), if type is empty all roles with all types are delivered, if id > -1 and role_type <> user or user_login, delivers all roles which belong to a repository object with specified ref_id, if roletype is user a numeric id is interpreted as userid, if roletype is user_login it is interpreted as login,if roletype is template all role templates will be listed');
930 
931  $this->server->register('getUsersForContainer',
932  array('sid' => 'xsd:string',
933  'ref_id' => 'xsd:int',
934  'attach_roles' => 'xsd:int',
935  'active' => 'xsd:int'),
936  array('user_xml' => 'xsd:string'),
937  SERVICE_NAMESPACE,
938  SERVICE_NAMESPACE.'#getUsersForContainer',
939  SERVICE_STYLE,
940  SERVICE_USE,
941  'ILIAS getUsersForContainer(): get all users of a specific ref_id, which can be crs, group, category or user folder (value: -1). Choose if all roles of a user should be attached (1) or not (0). set active to -1 to get all, 0, to get inactive users only, 1 to get active users only');
942 
943  $this->server->register('getUsersForRole',
944  array('sid' => 'xsd:string',
945  'role_id' => 'xsd:int',
946  'attach_roles' => 'xsd:int',
947  'active' => 'xsd:int'),
948  array('user_xml' => 'xsd:string'),
949  SERVICE_NAMESPACE,
950  SERVICE_NAMESPACE.'#getUsersForRole',
951  SERVICE_STYLE,
952  SERVICE_USE,
953  'ILIAS getUsersForRole(): get all users of a role with specified id, specify attach_roles to 1, to attach all role assignmnents; specify active: 1, to import active only, 0: inactive only, -1: both');
954 
955  $this->server->register('searchUser',
956  array('sid' => 'xsd:string',
957  'key_fields' => 'tns:stringArray',
958  'query_operator' => 'xsd:string',
959  'key_values' => 'tns:stringArray',
960  'attach_roles' => 'xsd:int',
961  'active' => 'xsd:int'),
962 
963  array('user_xml' => 'xsd:string'),
964  SERVICE_NAMESPACE,
965  SERVICE_NAMESPACE.'#searchUsers',
966  SERVICE_STYLE,
967  SERVICE_USE,
968  'ILIAS searchUser(): get all users, which match a query, consisting of the keyfields, matched with values of the field values, concatenated with the logical query operator. Specify attach_roles to 1, to attach all role assignmnents; specify active: 1, to import active only, 0: inactive only, -1: both');
969 
970  // Mail Functions
971  // Check whether current user has new mail
972  $this->server->register('hasNewMail',
973  array('sid' => 'xsd:string'),
974  array('status' => 'xsd:boolean'),
975  SERVICE_NAMESPACE,
976  SERVICE_NAMESPACE.'#hasNewMail',
977  SERVICE_STYLE,
978  SERVICE_USE,
979  'ILIAS hasNewMail(): Checks whether the current authenticated user has a new mail.');
980 
981  $this->server->register('getNIC',
982  array('sid' => 'xsd:string'),
983  array('xmlresultset' => 'xsd:string'),
984  SERVICE_NAMESPACE,
985  SERVICE_NAMESPACE.'#getNIC',
986  SERVICE_STYLE,
987  SERVICE_USE,
988  'ILIAS getNIC(): DEPRECATED: use getClientInfoXML instead. was: return client information from current client as xml result set containing installation_id, installation_version, installation_url, installation_description, installation_language_default as columns');
989 
990  $this->server->register('getExerciseXML',
991  array('sid' => 'xsd:string', "ref_id" => 'xsd:int', "attachment_mode" => "xsd:int"),
992  array('exercisexml' => 'xsd:string'),
993  SERVICE_NAMESPACE,
994  SERVICE_NAMESPACE.'#getExerciseXML',
995  SERVICE_STYLE,
996  SERVICE_USE,
997  'ILIAS getExerciseXML(): returns xml description of exercise. Attachment mode: 0 - no file contents, 1 - plain content (base64encoded), 2 zlib + base64, 3 gzip + base64)');
998 
999  $this->server->register('addExercise',
1000  array('sid' => 'xsd:string', "target_id" => 'xsd:int', "xml" => "xsd:string"),
1001  array('refid' => 'xsd:int'),
1002  SERVICE_NAMESPACE,
1003  SERVICE_NAMESPACE.'#addExercise',
1004  SERVICE_STYLE,
1005  SERVICE_USE,
1006  'ILIAS addExercise(): create exercise, put it into target (ref_id) and update exercise properties from xml (see ilias_exercise_3_8.dtd for details). Obj_id must not be set!');
1007 
1008  $this->server->register('updateExercise',
1009  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1010  array('success' => 'xsd:boolean'),
1011  SERVICE_NAMESPACE,
1012  SERVICE_NAMESPACE.'#updateExercise',
1013  SERVICE_STYLE,
1014  SERVICE_USE,
1015  'ILIAS updateExercise():update existing exercise, update exercise properties from xml (see ilias_exercise_3_8.dtd for details). obj_id in xml must match according obj id of refid.!');
1016 
1017  $this->server->register('getFileXML',
1018  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'attachment_mode' => 'xsd:int'),
1019  array('filexml' => 'xsd:string'),
1020  SERVICE_NAMESPACE,
1021  SERVICE_NAMESPACE.'#getFileXML',
1022  SERVICE_STYLE,
1023  SERVICE_USE,
1024  'ILIAS getFileXML(): returns xml description of file. Attachment mode: 0 - no file contents, 1 - plain content (base64encoded), 2 zlib + base64, 3 gzip + base64)');
1025 
1026  $this->server->register('addFile',
1027  array('sid' => 'xsd:string', 'target_id' => 'xsd:int', 'xml' => 'xsd:string'),
1028  array('refid' => 'xsd:int'),
1029  SERVICE_NAMESPACE,
1030  SERVICE_NAMESPACE.'#addFile',
1031  SERVICE_STYLE,
1032  SERVICE_USE,
1033  'ILIAS addFile(): create file, put it into target (ref_id) and update file properties from xml (see ilias_file_3_8.dtd for details). Obj_id must not be set!');
1034 
1035  $this->server->register('updateFile',
1036  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1037  array('success' => 'xsd:boolean'),
1038  SERVICE_NAMESPACE,
1039  SERVICE_NAMESPACE.'#updateFile',
1040  SERVICE_STYLE,
1041  SERVICE_USE,
1042  'ILIAS updateFile():update existing file, update file properties from xml (see ilias_file_3_8.dtd for details). obj_id in xml must match according obj id of refid.!');
1043 
1044 
1045  $this->server->register('getUserXML',
1046  array('sid' => 'xsd:string', 'user_ids' => 'tns:intArray', 'attach_roles' => 'xsd:int'),
1047  array('xml' => 'xsd:string'),
1048  SERVICE_NAMESPACE,
1049  SERVICE_NAMESPACE.'#resolveUsers',
1050  SERVICE_STYLE,
1051  SERVICE_USE,
1052  'ILIAS getUserXML(): get xml records for user ids, e.g. retrieved vom members of course xml. Returns user xml dtds. ids are numeric ids of user');
1053 
1054 
1055  // get objs ids by ref id
1056  $this->server->register('getObjIdsByRefIds',
1057  array('sid' => 'xsd:string',
1058  'ref_ids' => 'tns:intArray'),
1059  array('obj_ids' => 'tns:intArray'),
1060  SERVICE_NAMESPACE,
1061  SERVICE_NAMESPACE.'#getRefIdsByImportId',
1062  SERVICE_STYLE,
1063  SERVICE_USE,
1064  'ILIAS getObjIdsForRefIds: Returns a array of object ids which match the references id, given by a comma seperated string. Returns an array of ref ids, in the same order as object ids. Therefore, there might by duplicates');
1065 
1066  $this->server->register('updateGroup',
1067  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1068  array('success' => 'xsd:boolean'),
1069  SERVICE_NAMESPACE,
1070  SERVICE_NAMESPACE.'#updateGroup',
1071  SERVICE_STYLE,
1072  SERVICE_USE,
1073  'ILIAS updateGroup(): update existing group using ref id and group xml (see DTD).');
1074 
1075 
1076 
1077  $this->server->register('getIMSManifestXML',
1078  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int'),
1079  array('xml' => 'xsd:string'),
1080  SERVICE_NAMESPACE,
1081  SERVICE_NAMESPACE.'#getIMSManifestXML',
1082  SERVICE_STYLE,
1083  SERVICE_USE,
1084  'ILIAS getIMSManifestXML(): returns xml of ims manifest file (scorm learning module) referred by refid');
1085 
1086  $this->server->register('hasSCORMCertificate',
1087  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'usr_id' => 'xsd:int'),
1088  array('success' => 'xsd:boolean'),
1089  SERVICE_NAMESPACE,
1090  SERVICE_NAMESPACE.'#hasSCORMCertificate',
1091  SERVICE_STYLE,
1092  SERVICE_USE,
1093  'ILIAS hasSCORMCertificate(): returns true if a certficate is available for a user referred by usr_id in a SCORM learning module referred by ref_id');
1094 
1095  $this->server->register('getSCORMCompletionStatus',
1096  array('sid' => 'xsd:string', 'usr_id' => 'xsd:int', 'ref_id' => 'xsd:int'),
1097  array('status' => 'xsd:string'),
1098  SERVICE_NAMESPACE,
1099  SERVICE_NAMESPACE.'#getSCORMCompletionStatus',
1100  SERVICE_STYLE,
1101  SERVICE_USE,
1102  'ILIAS getSCORMCompletionStatus(): returns a completion status of a scorm module');
1103 
1104  $this->server->register('copyObject',
1105  array('sid' => 'xsd:string', 'xml' => 'xsd:string'),
1106  array('xml' => 'xsd:int'),
1107  SERVICE_NAMESPACE,
1108  SERVICE_NAMESPACE.'#copyObject',
1109  SERVICE_STYLE,
1110  SERVICE_USE,
1111  'ILIAS copyObject(): returns reference of copy, if copy is created directly, or the ref id of the target if copy is in progress.');
1112 
1113  $this->server->register('moveObject',
1114  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'target_id' => 'xsd:int'),
1115  array('result' => 'xsd:boolean'),
1116  SERVICE_NAMESPACE,
1117  SERVICE_NAMESPACE.'#moveObject',
1118  SERVICE_STYLE,
1119  SERVICE_USE,
1120  'ILIAS moveObject(): returns true, if object with refid could be successfully moved to target id, other it raises an error.');
1121 
1122 
1123  $this->server->register ('getTestResults',
1124  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'sum_only' => 'xsd:boolean'),
1125  array('xml' => 'xsd:string'),
1126  SERVICE_NAMESPACE,
1127  SERVICE_NAMESPACE.'#getTestResults',
1128  SERVICE_STYLE,
1129  SERVICE_USE,
1130  'ILIAS getTestResults(): returns XMLResultSet with
1131  sum only = true: user_id, login, firstname, lastname, matriculation, maximum points, received points
1132  sum only = false: user_id, login, firstname, lastname, matriculation, question id, question title, question points, received points');
1133 
1134  $this->server->register ('getTestIdByObjId',
1135  array('sid' => 'xsd:string', 'test_obj_id' => 'xsd:int'),
1136  array('test_id' => 'xsd:int'),
1137  SERVICE_NAMESPACE,
1138  SERVICE_NAMESPACE.'#getTestIdByObjId',
1139  SERVICE_STYLE,
1140  SERVICE_USE,
1141  'ILIAS getTestIdByObjId(): returns test ID for test with object ID test_obj_id');
1142 
1143  $this->server->register ('getTestRunDates',
1144  array('sid' => 'xsd:string', 'obj_id' => 'xsd:int'),
1145  array('dates' => 'tns:stringArray'),
1146  SERVICE_NAMESPACE,
1147  SERVICE_NAMESPACE.'#getTestRunDates',
1148  SERVICE_STYLE,
1149  SERVICE_USE,
1150  'ILIAS getTestRunDates(): returns array of YYYY-MM-DD date strings for all dates that have archived runs of the test with object ID obj_id');
1151 
1152  $this->server->register('packageTestRun',
1153  array('sid' => 'xsd:string', 'obj_id' => 'xsd:int', 'date' => 'xsd:string'),
1154  array('success' => 'xsd:boolean'),
1155  SERVICE_NAMESPACE,
1156  SERVICE_NAMESPACE.'#packageTestRun',
1157  SERVICE_STYLE,
1158  SERVICE_USE,
1159  'ILIAS getTestRunDates(): packages archived run designated by YYYY-MM-DD string date. Return TRUE iff successful.');
1160 
1161  $this->server->register ('getTestRunPackageDates',
1162  array('sid' => 'xsd:string', 'obj_id' => 'xsd:int'),
1163  array('dates' => 'tns:stringArray'),
1164  SERVICE_NAMESPACE,
1165  SERVICE_NAMESPACE.'#getTestRunPackageDates',
1166  SERVICE_STYLE,
1167  SERVICE_USE,
1168  'ILIAS getTestRunPackageDates(): returns array of YYYY-MM-DD date strings for all dates that have ZIP packages of archive runs of the test with object ID obj_id');
1169 
1170  $this->server->register ('fetchTestRunPackage',
1171  array('sid' => 'xsd:string', 'obj_id' => 'xsd:int', 'date' => 'xsd:string'),
1172  array('zipfile' => 'xsd:string'),
1173  SERVICE_NAMESPACE,
1174  SERVICE_NAMESPACE.'#fetchTestRunPackage',
1175  SERVICE_STYLE,
1176  SERVICE_USE,
1177  'ILIAS fetchTestRunPackage(): if the test with object ID obj_id has a run package for the YYYY-MM-DD date specified in date, return the ZIP file as a base64-encoded string');
1178 
1179  $this->server->register('deleteTestRunPackage',
1180  array('sid' => 'xsd:string', 'obj_id' => 'xsd:int', 'date' => 'xsd:string'),
1181  array('success' => 'xsd:boolean'),
1182  SERVICE_NAMESPACE,
1183  SERVICE_NAMESPACE.'#deleteTestRunPackage',
1184  SERVICE_STYLE,
1185  SERVICE_USE,
1186  'ILIAS deleteTestRunPackage(): if the test with object ID obj_id has a run package for the YYYY-MM-DD date specified in date, delete it. Return TRUE iff successful');
1187 
1188  $this->server->register('obliterateTestRun',
1189  array('sid' => 'xsd:string', 'obj_id' => 'xsd:int', 'date' => 'xsd:string'),
1190  array('success' => 'xsd:boolean'),
1191  SERVICE_NAMESPACE,
1192  SERVICE_NAMESPACE.'#obliterateTestRun',
1193  SERVICE_STYLE,
1194  SERVICE_USE,
1195  'ILIAS obliterateTestRun(): if the test with object ID obj_id has an archived run for the YYYY-MM-DD date specified in date, remove all archival traces of it. Return TRUE iff successful');
1196 
1197 
1198  $this->server->register ('getCoursesForUser',
1199  array('sid' => 'xsd:string', 'parameters' => 'xsd:string'),
1200  array('xml' => 'xsd:string'),
1201  SERVICE_NAMESPACE,
1202  SERVICE_NAMESPACE.'#getCoursesForUser',
1203  SERVICE_STYLE,
1204  SERVICE_USE,
1205  'ILIAS getTestResults(): returns XMLResultSet with columns ref_id, course xml. $parameters has to contain a column user_id and a column status. Status is a logical AND combined value of (MEMBER = 1, TUTOR = 2, ADMIN = 4, OWNER = 8) and determines which courses should be returned.');
1206 
1207  $this->server->register ('getGroupsForUser',
1208  array('sid' => 'xsd:string', 'parameters' => 'xsd:string'),
1209  array('xml' => 'xsd:string'),
1210  SERVICE_NAMESPACE,
1211  SERVICE_NAMESPACE.'#getGroupsForUser',
1212  SERVICE_STYLE,
1213  SERVICE_USE,
1214  'ILIAS getTestResults(): returns XMLResultSet with columns ref_id, group xml. $parameters has to contain a column user_id and a column status. Status is a logical AND combined value of (MEMBER = 1, TUTOR = 2, OWNER = 4) and determines which groups should be returned.');
1215 
1216  $this->server->register ('getPathForRefId',
1217  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int'),
1218  array('xml' => 'xsd:string'),
1219  SERVICE_NAMESPACE,
1220  SERVICE_NAMESPACE.'#getPathForRefId',
1221  SERVICE_STYLE,
1222  SERVICE_USE,
1223  'ILIAS getPathForRefId(): returns XMLResultSet with columns ref_id, type and title.');
1224 
1225  $this->server->register ('searchRoles',
1226  array('sid' => 'xsd:string', 'key' => 'xsd:string', 'combination' => 'xsd:string', 'role_type' => 'xsd:string'),
1227  array('xml' => 'xsd:string'),
1228  SERVICE_NAMESPACE,
1229  SERVICE_NAMESPACE.'#searchRoles',
1230  SERVICE_STYLE,
1231  SERVICE_USE,
1232  'ILIAS searchRoles(): returns XML following role dtd with search results for given role type and search terms.');
1233 
1234  $this->server->register ('getInstallationInfoXML',
1235  array(),
1236  array('xml' => 'xsd:string'),
1237  SERVICE_NAMESPACE,
1238  SERVICE_NAMESPACE.'#getInstallationInfoXML',
1239  SERVICE_STYLE,
1240  SERVICE_USE,
1241  'ILIAS getInstallationInfoXML(): returns XML following installation_info dtd');
1242 
1243  $this->server->register ('getClientInfoXML',
1244  array('clientid' => 'xsd:string'),
1245  array('xml' => 'xsd:string'),
1246  SERVICE_NAMESPACE,
1247  SERVICE_NAMESPACE.'#getClientInfoXML',
1248  SERVICE_STYLE,
1249  SERVICE_USE,
1250  'ILIAS getClientInfoXML(): returns XML following installation_info dtd, contains the client the data of given client id');
1251 
1252  $this->server->register ('getUserIdBySid',
1253  array('sid' => 'xsd:string'),
1254  array('usr_id' => 'xsd:int'),
1255  SERVICE_NAMESPACE,
1256  SERVICE_NAMESPACE.'#getUserIdBySid',
1257  SERVICE_STYLE,
1258  SERVICE_USE,
1259  'ILIAS getUserIdBySid(): returns an ILIAS usr_id for the given sid');
1260 
1261  $this->server->register('deleteExpiredDualOptInUserObjects',
1262  array('sid' => 'xsd:string',
1263  'usr_id' => 'xsd:int'),
1264  array('status' => 'xsd:boolean'),
1265  SERVICE_NAMESPACE,
1266  SERVICE_NAMESPACE.'#deleteExpiredDualOptInUserObjects',
1267  SERVICE_STYLE,
1268  SERVICE_USE,
1269  'ILIAS deleteExpiredDualOptInUserObjects(): Deletes expired user accounts caused by unconfirmed registration links in "dual opt in" registration method');
1270 
1271  return true;
1272 
1273  }
1274 
1275 }
1276 ?>