ILIAS  Release_4_4_x_branch Revision 61816
 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 
769  $this->server->register('distributeMails',
770  array('sid' => 'xsd:string',
771  'mail_xml' => 'xsd:string'),
772  array('status' => 'xsd:boolean'),
773  SERVICE_NAMESPACE,
774  SERVICE_NAMESPACE.'#sendMail',
775  SERVICE_STYLE,
776  SERVICE_USE,
777  'ILIAS distributeMails(): Distribute ILIAS mails according according to the mail setting of the recipients as '.
778  'ILIAS internal mail or as e-mail.'
779  );
780 
781  // Clone functions
782  $this->server->register('ilClone',
783  array('sid' => 'xsd:string','copy_identifier' => 'xsd:int'),
784  array('new_ref_id' => 'xsd:int'),
785  SERVICE_NAMESPACE,
786  SERVICE_NAMESPACE.'#ilClone',
787  SERVICE_STYLE,
788  SERVICE_USE,
789  'ILIAS ilClone(): Only for internal usage.'.
790  'Syntax, parameters may change in future releases. ');
791 
792  $this->server->register('handleECSTasks',
793  array('sid' => 'xsd:string','server_id' => 'xsd:int'),
794  array('success' => 'xsd:boolean'),
795  SERVICE_NAMESPACE,
796  SERVICE_NAMESPACE.'#handleECSTasks',
797  SERVICE_STYLE,
798  SERVICE_USE,
799  'ILIAS handleECSTasks(): Only for internal usage.'.
800  'Syntax, parameters may change in future releases. ');
801 
802  $this->server->register('ilCloneDependencies',
803  array('sid' => 'xsd:string','copy_identifier' => 'xsd:int'),
804  array('success' => 'xsd:boolean'),
805  SERVICE_NAMESPACE,
806  SERVICE_NAMESPACE.'#ilCloneDependencies',
807  SERVICE_STYLE,
808  SERVICE_USE,
809  'ILIAS ilCloneDependencies(): Only for internal usage.'.
810  'Syntax, parameters may change in future releases. ');
811 
812  $this->server->register('saveQuestionResult',
813  array('sid' => 'xsd:string',
814  'user_id' => 'xsd:int',
815  'test_id' => 'xsd:int',
816  'question_id' => 'xsd:int',
817  'pass' => 'xsd:int',
818  'solution' => 'tns:stringArray'),
819  array('status' => 'xsd:boolean'),
820  SERVICE_NAMESPACE,
821  SERVICE_NAMESPACE.'#saveQuestionResult',
822  SERVICE_STYLE,
823  SERVICE_USE,
824  'ILIAS saveQuesionResult: Typically called from an external assessment question to save the user input. DEPRECATED since ILIAS 3.9');
825 
826  $this->server->register('saveQuestion',
827  array('sid' => 'xsd:string',
828  'active_id' => 'xsd:long',
829  'question_id' => 'xsd:long',
830  'pass' => 'xsd:int',
831  'solution' => 'tns:stringArray'),
832  array('status' => 'xsd:boolean'),
833  SERVICE_NAMESPACE,
834  SERVICE_NAMESPACE.'#saveQuestion',
835  SERVICE_STYLE,
836  SERVICE_USE,
837  '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.');
838 
839  $this->server->register('saveQuestionSolution',
840  array('sid' => 'xsd:string',
841  'active_id' => 'xsd:long',
842  'question_id' => 'xsd:long',
843  'pass' => 'xsd:int',
844  'solution' => 'xsd:string'),
845  array('status' => 'xsd:string'),
846  SERVICE_NAMESPACE,
847  SERVICE_NAMESPACE.'#saveQuestionSolution',
848  SERVICE_STYLE,
849  SERVICE_USE,
850  '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.');
851 
852  $this->server->register('getQuestionSolution',
853  array('sid' => 'xsd:string',
854  'active_id' => 'xsd:long',
855  'question_id' => 'xsd:int',
856  'pass' => 'xsd:int'),
857  array('solution' => 'tns:stringArray'),
858  SERVICE_NAMESPACE,
859  SERVICE_NAMESPACE.'#getQuestionSolution',
860  SERVICE_STYLE,
861  SERVICE_USE,
862  'ILIAS getQuestionSolution: Typically called from external assessment questions to retrieve the previous input of a user.');
863 
864  $this->server->register('getTestUserData',
865  array('sid' => 'xsd:string',
866  'active_id' => 'xsd:long'),
867  array('userdata' => 'tns:stringArray'),
868  SERVICE_NAMESPACE,
869  SERVICE_NAMESPACE.'#getTestUserData',
870  SERVICE_STYLE,
871  SERVICE_USE,
872  '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.');
873 
874  $this->server->register('getPositionOfQuestion',
875  array('sid' => 'xsd:string',
876  'active_id' => 'xsd:long',
877  'question_id' => 'xsd:int',
878  'pass' => 'xsd:int'),
879  array('position' => 'xsd:int'),
880  SERVICE_NAMESPACE,
881  SERVICE_NAMESPACE.'#getPositionOfQuestion',
882  SERVICE_STYLE,
883  SERVICE_USE,
884  'ILIAS getPositionOfQuestion: Returns the position of a given question for a given user in a given test pass.');
885 
886  $this->server->register('getPreviousReachedPoints',
887  array('sid' => 'xsd:string',
888  'active_id' => 'xsd:long',
889  'question_id' => 'xsd:int',
890  'pass' => 'xsd:int'),
891  array('position' => 'tns:doubleArray'),
892  SERVICE_NAMESPACE,
893  SERVICE_NAMESPACE.'#getPreviousReachedPoints',
894  SERVICE_STYLE,
895  SERVICE_USE,
896  'ILIAS getPreviousReachedPoints: Returns an array of reached points for the previous questions in a given test pass.');
897 
898  $this->server->register('getNrOfQuestionsInPass',
899  array('sid' => 'xsd:string',
900  'active_id' => 'xsd:long',
901  'pass' => 'xsd:int'),
902  array('count' => 'xsd:int'),
903  SERVICE_NAMESPACE,
904  SERVICE_NAMESPACE.'#getNrOfQuestionsInPass',
905  SERVICE_STYLE,
906  SERVICE_USE,
907  'ILIAS getNrOfQuestionsInPass: Returns the question count for a given test user in a given pass.');
908 
909  $this->server->register('getStructureObjects',
910  array('sid' => 'xsd:string',
911  'ref_id' => 'xsd:int'),
912  array('xml' => 'xsd:string'),
913  SERVICE_NAMESPACE,
914  SERVICE_NAMESPACE.'#getStructureObjects',
915  SERVICE_STYLE,
916  SERVICE_USE,
917  'ILIAS getStructureObjects: delivers structure of content objects like learning modules (chapters/pages) or glossary (terms)');
918 
919  // importUsers()
920  $this->server->register('importUsers',
921  array('sid' => 'xsd:string',
922  'folder_id' => 'xsd:int',
923  'usr_xml' => 'xsd:string',
924  'conflict_rule' => 'xsd:int',
925  'send_account_mail' => 'xsd:int'),
926  array('protocol' => 'xsd:string'),
927  SERVICE_NAMESPACE,
928  SERVICE_NAMESPACE.'#importUsers',
929  SERVICE_STYLE,
930  SERVICE_USE,
931  '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');
932 
933  $this->server->register('getRoles',
934  array('sid' => 'xsd:string',
935  'role_type' => 'xsd:string',
936  'id' => 'xsd:string'),
937  array('role_xml' => 'xsd:string'),
938  SERVICE_NAMESPACE,
939  SERVICE_NAMESPACE.'#getRoles',
940  SERVICE_STYLE,
941  SERVICE_USE,
942  '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');
943 
944  $this->server->register('getUsersForContainer',
945  array('sid' => 'xsd:string',
946  'ref_id' => 'xsd:int',
947  'attach_roles' => 'xsd:int',
948  'active' => 'xsd:int'),
949  array('user_xml' => 'xsd:string'),
950  SERVICE_NAMESPACE,
951  SERVICE_NAMESPACE.'#getUsersForContainer',
952  SERVICE_STYLE,
953  SERVICE_USE,
954  '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');
955 
956  $this->server->register('getUsersForRole',
957  array('sid' => 'xsd:string',
958  'role_id' => 'xsd:int',
959  'attach_roles' => 'xsd:int',
960  'active' => 'xsd:int'),
961  array('user_xml' => 'xsd:string'),
962  SERVICE_NAMESPACE,
963  SERVICE_NAMESPACE.'#getUsersForRole',
964  SERVICE_STYLE,
965  SERVICE_USE,
966  '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');
967 
968  $this->server->register('searchUser',
969  array('sid' => 'xsd:string',
970  'key_fields' => 'tns:stringArray',
971  'query_operator' => 'xsd:string',
972  'key_values' => 'tns:stringArray',
973  'attach_roles' => 'xsd:int',
974  'active' => 'xsd:int'),
975 
976  array('user_xml' => 'xsd:string'),
977  SERVICE_NAMESPACE,
978  SERVICE_NAMESPACE.'#searchUsers',
979  SERVICE_STYLE,
980  SERVICE_USE,
981  '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');
982 
983  // Mail Functions
984  // Check whether current user has new mail
985  $this->server->register('hasNewMail',
986  array('sid' => 'xsd:string'),
987  array('status' => 'xsd:boolean'),
988  SERVICE_NAMESPACE,
989  SERVICE_NAMESPACE.'#hasNewMail',
990  SERVICE_STYLE,
991  SERVICE_USE,
992  'ILIAS hasNewMail(): Checks whether the current authenticated user has a new mail.');
993 
994  $this->server->register('getNIC',
995  array('sid' => 'xsd:string'),
996  array('xmlresultset' => 'xsd:string'),
997  SERVICE_NAMESPACE,
998  SERVICE_NAMESPACE.'#getNIC',
999  SERVICE_STYLE,
1000  SERVICE_USE,
1001  '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');
1002 
1003  $this->server->register('getExerciseXML',
1004  array('sid' => 'xsd:string', "ref_id" => 'xsd:int', "attachment_mode" => "xsd:int"),
1005  array('exercisexml' => 'xsd:string'),
1006  SERVICE_NAMESPACE,
1007  SERVICE_NAMESPACE.'#getExerciseXML',
1008  SERVICE_STYLE,
1009  SERVICE_USE,
1010  'ILIAS getExerciseXML(): returns xml description of exercise. Attachment mode: 0 - no file contents, 1 - plain content (base64encoded), 2 zlib + base64, 3 gzip + base64)');
1011 
1012  $this->server->register('addExercise',
1013  array('sid' => 'xsd:string', "target_id" => 'xsd:int', "xml" => "xsd:string"),
1014  array('refid' => 'xsd:int'),
1015  SERVICE_NAMESPACE,
1016  SERVICE_NAMESPACE.'#addExercise',
1017  SERVICE_STYLE,
1018  SERVICE_USE,
1019  '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!');
1020 
1021  $this->server->register('updateExercise',
1022  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1023  array('success' => 'xsd:boolean'),
1024  SERVICE_NAMESPACE,
1025  SERVICE_NAMESPACE.'#updateExercise',
1026  SERVICE_STYLE,
1027  SERVICE_USE,
1028  '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.!');
1029 
1030  $this->server->register('getFileXML',
1031  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'attachment_mode' => 'xsd:int'),
1032  array('filexml' => 'xsd:string'),
1033  SERVICE_NAMESPACE,
1034  SERVICE_NAMESPACE.'#getFileXML',
1035  SERVICE_STYLE,
1036  SERVICE_USE,
1037  'ILIAS getFileXML(): returns xml description of file. Attachment mode: 0 - no file contents, 1 - plain content (base64encoded), 2 zlib + base64, 3 gzip + base64)');
1038 
1039  $this->server->register('addFile',
1040  array('sid' => 'xsd:string', 'target_id' => 'xsd:int', 'xml' => 'xsd:string'),
1041  array('refid' => 'xsd:int'),
1042  SERVICE_NAMESPACE,
1043  SERVICE_NAMESPACE.'#addFile',
1044  SERVICE_STYLE,
1045  SERVICE_USE,
1046  '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!');
1047 
1048  $this->server->register('updateFile',
1049  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1050  array('success' => 'xsd:boolean'),
1051  SERVICE_NAMESPACE,
1052  SERVICE_NAMESPACE.'#updateFile',
1053  SERVICE_STYLE,
1054  SERVICE_USE,
1055  '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.!');
1056 
1057 
1058  $this->server->register('getUserXML',
1059  array('sid' => 'xsd:string', 'user_ids' => 'tns:intArray', 'attach_roles' => 'xsd:int'),
1060  array('xml' => 'xsd:string'),
1061  SERVICE_NAMESPACE,
1062  SERVICE_NAMESPACE.'#resolveUsers',
1063  SERVICE_STYLE,
1064  SERVICE_USE,
1065  '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');
1066 
1067 
1068  // get objs ids by ref id
1069  $this->server->register('getObjIdsByRefIds',
1070  array('sid' => 'xsd:string',
1071  'ref_ids' => 'tns:intArray'),
1072  array('obj_ids' => 'tns:intArray'),
1073  SERVICE_NAMESPACE,
1074  SERVICE_NAMESPACE.'#getRefIdsByImportId',
1075  SERVICE_STYLE,
1076  SERVICE_USE,
1077  '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');
1078 
1079  $this->server->register('updateGroup',
1080  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1081  array('success' => 'xsd:boolean'),
1082  SERVICE_NAMESPACE,
1083  SERVICE_NAMESPACE.'#updateGroup',
1084  SERVICE_STYLE,
1085  SERVICE_USE,
1086  'ILIAS updateGroup(): update existing group using ref id and group xml (see DTD).');
1087 
1088 
1089 
1090  $this->server->register('getIMSManifestXML',
1091  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int'),
1092  array('xml' => 'xsd:string'),
1093  SERVICE_NAMESPACE,
1094  SERVICE_NAMESPACE.'#getIMSManifestXML',
1095  SERVICE_STYLE,
1096  SERVICE_USE,
1097  'ILIAS getIMSManifestXML(): returns xml of ims manifest file (scorm learning module) referred by refid');
1098 
1099  $this->server->register('hasSCORMCertificate',
1100  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'usr_id' => 'xsd:int'),
1101  array('success' => 'xsd:boolean'),
1102  SERVICE_NAMESPACE,
1103  SERVICE_NAMESPACE.'#hasSCORMCertificate',
1104  SERVICE_STYLE,
1105  SERVICE_USE,
1106  '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');
1107 
1108  $this->server->register('getSCORMCompletionStatus',
1109  array('sid' => 'xsd:string', 'usr_id' => 'xsd:int', 'ref_id' => 'xsd:int'),
1110  array('status' => 'xsd:string'),
1111  SERVICE_NAMESPACE,
1112  SERVICE_NAMESPACE.'#getSCORMCompletionStatus',
1113  SERVICE_STYLE,
1114  SERVICE_USE,
1115  'ILIAS getSCORMCompletionStatus(): returns a completion status of a scorm module');
1116 
1117  $this->server->register('copyObject',
1118  array('sid' => 'xsd:string', 'xml' => 'xsd:string'),
1119  array('xml' => 'xsd:int'),
1120  SERVICE_NAMESPACE,
1121  SERVICE_NAMESPACE.'#copyObject',
1122  SERVICE_STYLE,
1123  SERVICE_USE,
1124  'ILIAS copyObject(): returns reference of copy, if copy is created directly, or the ref id of the target if copy is in progress.');
1125 
1126  $this->server->register('moveObject',
1127  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'target_id' => 'xsd:int'),
1128  array('result' => 'xsd:boolean'),
1129  SERVICE_NAMESPACE,
1130  SERVICE_NAMESPACE.'#moveObject',
1131  SERVICE_STYLE,
1132  SERVICE_USE,
1133  'ILIAS moveObject(): returns true, if object with refid could be successfully moved to target id, other it raises an error.');
1134 
1135 
1136  $this->server->register ('getTestResults',
1137  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'sum_only' => 'xsd:boolean'),
1138  array('xml' => 'xsd:string'),
1139  SERVICE_NAMESPACE,
1140  SERVICE_NAMESPACE.'#getTestResults',
1141  SERVICE_STYLE,
1142  SERVICE_USE,
1143  'ILIAS getTestResults(): returns XMLResultSet with
1144  sum only = true: user_id, login, firstname, lastname, matriculation, maximum points, received points
1145  sum only = false: user_id, login, firstname, lastname, matriculation, question id, question title, question points, received points');
1146 
1147  $this->server->register ('removeTestResults',
1148  array(
1149  'sid' => 'xsd:string',
1150  'ref_id' => 'xsd:int',
1151  'user_ids' => 'tns:intArray'),
1152  array('success' => 'xsd:boolean'),
1153  SERVICE_NAMESPACE,
1154  SERVICE_NAMESPACE.'#removeTestResults',
1155  SERVICE_STYLE,
1156  SERVICE_USE,
1157  'ILIAS removeTestResults(): remove test results for the chosen users');
1158 
1159  $this->server->register ('getCoursesForUser',
1160  array('sid' => 'xsd:string', 'parameters' => 'xsd:string'),
1161  array('xml' => 'xsd:string'),
1162  SERVICE_NAMESPACE,
1163  SERVICE_NAMESPACE.'#getCoursesForUser',
1164  SERVICE_STYLE,
1165  SERVICE_USE,
1166  '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.');
1167 
1168  $this->server->register ('getGroupsForUser',
1169  array('sid' => 'xsd:string', 'parameters' => 'xsd:string'),
1170  array('xml' => 'xsd:string'),
1171  SERVICE_NAMESPACE,
1172  SERVICE_NAMESPACE.'#getGroupsForUser',
1173  SERVICE_STYLE,
1174  SERVICE_USE,
1175  '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.');
1176 
1177  $this->server->register ('getPathForRefId',
1178  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int'),
1179  array('xml' => 'xsd:string'),
1180  SERVICE_NAMESPACE,
1181  SERVICE_NAMESPACE.'#getPathForRefId',
1182  SERVICE_STYLE,
1183  SERVICE_USE,
1184  'ILIAS getPathForRefId(): returns XMLResultSet with columns ref_id, type and title.');
1185 
1186  $this->server->register ('searchRoles',
1187  array('sid' => 'xsd:string', 'key' => 'xsd:string', 'combination' => 'xsd:string', 'role_type' => 'xsd:string'),
1188  array('xml' => 'xsd:string'),
1189  SERVICE_NAMESPACE,
1190  SERVICE_NAMESPACE.'#searchRoles',
1191  SERVICE_STYLE,
1192  SERVICE_USE,
1193  'ILIAS searchRoles(): returns XML following role dtd with search results for given role type and search terms.');
1194 
1195  $this->server->register ('getInstallationInfoXML',
1196  array(),
1197  array('xml' => 'xsd:string'),
1198  SERVICE_NAMESPACE,
1199  SERVICE_NAMESPACE.'#getInstallationInfoXML',
1200  SERVICE_STYLE,
1201  SERVICE_USE,
1202  'ILIAS getInstallationInfoXML(): returns XML following installation_info dtd');
1203 
1204  $this->server->register ('getClientInfoXML',
1205  array('clientid' => 'xsd:string'),
1206  array('xml' => 'xsd:string'),
1207  SERVICE_NAMESPACE,
1208  SERVICE_NAMESPACE.'#getClientInfoXML',
1209  SERVICE_STYLE,
1210  SERVICE_USE,
1211  'ILIAS getClientInfoXML(): returns XML following installation_info dtd, contains the client the data of given client id');
1212 
1213  $this->server->register('getSkillCompletionDateForTriggerRefId',
1214  array('sid' => 'xsd:string',
1215  'user_id' => 'xsd:string',
1216  'ref_id' => 'xsd:string'),
1217  array('dates' => 'xsd:string'),
1218  SERVICE_NAMESPACE,
1219  SERVICE_NAMESPACE.'#getSkillCompletionDateForTriggerRefId',
1220  SERVICE_STYLE,
1221  SERVICE_USE,
1222  'ILIAS getSkillCompletionDateForTriggerRefId(). Get completion dates for skill trigger ref ids.');
1223 
1224  $this->server->register('checkSkillUserCertificateForTriggerRefId',
1225  array('sid' => 'xsd:string',
1226  'user_id' => 'xsd:string',
1227  'ref_id' => 'xsd:string'),
1228  array('have_certificates' => 'xsd:string'),
1229  SERVICE_NAMESPACE,
1230  SERVICE_NAMESPACE.'#checkSkillUserCertificateForTriggerRefId',
1231  SERVICE_STYLE,
1232  SERVICE_USE,
1233  'ILIAS checkSkillUserCertificateForTriggerRefId(). Check user certificates for trigger ref ids.');
1234 
1235  $this->server->register('getSkillTriggerOfAllCertificates',
1236  array('sid' => 'xsd:string',
1237  'user_id' => 'xsd:string'),
1238  array('certificate_triggers' => 'xsd:string'),
1239  SERVICE_NAMESPACE,
1240  SERVICE_NAMESPACE.'#getSkillTriggerOfAllCertificates',
1241  SERVICE_STYLE,
1242  SERVICE_USE,
1243  'ILIAS getSkillTriggerOfAllCertificates(). Check get all trigger with certificate for a user.');
1244 
1245  $this->server->register ('getUserIdBySid',
1246  array('sid' => 'xsd:string'),
1247  array('usr_id' => 'xsd:int'),
1248  SERVICE_NAMESPACE,
1249  SERVICE_NAMESPACE.'#getUserIdBySid',
1250  SERVICE_STYLE,
1251  SERVICE_USE,
1252  'ILIAS getUserIdBySid(): returns an ILIAS usr_id for the given sid');
1253 
1254  $this->server->register('deleteExpiredDualOptInUserObjects',
1255  array('sid' => 'xsd:string',
1256  'usr_id' => 'xsd:int'),
1257  array('status' => 'xsd:boolean'),
1258  SERVICE_NAMESPACE,
1259  SERVICE_NAMESPACE.'#deleteExpiredDualOptInUserObjects',
1260  SERVICE_STYLE,
1261  SERVICE_USE,
1262  'ILIAS deleteExpiredDualOptInUserObjects(): Deletes expired user accounts caused by unconfirmed registration links in "dual opt in" registration method');
1263 
1264 
1265  $this->server->register('readWebLink',
1266  array('sid' => 'xsd:string', "ref_id" => 'xsd:int'),
1267  array('weblinkxml' => 'xsd:string'),
1268  SERVICE_NAMESPACE,
1269  SERVICE_NAMESPACE . '#readWebLink',
1270  SERVICE_STYLE,
1271  SERVICE_USE,
1272  'ILIAS readWebLink(): returns xml description of a weblink container.');
1273 
1274  $this->server->register('createWebLink',
1275  array('sid' => 'xsd:string', "target_id" => 'xsd:int', "xml" => "xsd:string"),
1276  array('refid' => 'xsd:int'),
1277  SERVICE_NAMESPACE,
1278  SERVICE_NAMESPACE . '#createWebLink',
1279  SERVICE_STYLE,
1280  SERVICE_USE,
1281  'ILIAS createWebLink(): create web link container, put it into target (ref_id) and update weblink container from xml (see ilias_weblink_4_0.dtd for details). Obj_id must not be set!');
1282 
1283  $this->server->register('updateWebLink',
1284  array('sid' => 'xsd:string', 'ref_id' => 'xsd:int', 'xml' => 'xsd:string'),
1285  array('success' => 'xsd:boolean'),
1286  SERVICE_NAMESPACE,
1287  SERVICE_NAMESPACE . '#updateWebLink',
1288  SERVICE_STYLE,
1289  SERVICE_USE,
1290  'ILIAS updateWebLink():update existing weblink, update weblink properties from xml (see ilias_weblink_4_0.dtd for details).');
1291 
1292  // mcs-patch start
1293  $this->server->register('getLearningProgressChanges',
1294  array('sid' => 'xsd:string', 'timestamp' => 'xsd:string', 'include_ref_ids' => 'xsd:boolean', 'type_filter' => 'tns:stringArray'),
1295  array('lp_data' => 'xsd:string'),
1296  SERVICE_NAMESPACE,
1297  SERVICE_NAMESPACE . '#getLearningProgressChanges',
1298  SERVICE_STYLE,
1299  SERVICE_USE,
1300  'ILIAS getLearningProgressChanges(): Get learning progress changes after a given timestamp.');
1301  // mcs-patch end
1302 
1303 
1304 
1305  $this->server->register('deleteProgress',
1306  array(
1307  'sid' => 'xsd:string',
1308  'ref_ids' => 'tns:intArray',
1309  'usr_ids' => 'tns:intArray',
1310  'type_filter' => 'tns:stringArray',
1311  'progress_filter' => 'tns:intArray'
1312  ),
1313  array('status' => 'xsd:boolean'),
1314  SERVICE_NAMESPACE,
1315  SERVICE_NAMESPACE.'#deleteProgress',
1316  SERVICE_STYLE,
1317  SERVICE_USE,
1318  'Delete user progress data of objects. '
1319  );
1320 
1321 
1322  return true;
1323 
1324  }
1325 
1326 }
1327 ?>