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