ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
inc.soap_functions.php
Go to the documentation of this file.
1 <?php
2 
13 
14 require_once('./Services/Init/classes/class.ilInitialisation.php');
15 require_once('./Services/WebServices/SOAP/classes/class.ilSoapHook.php');
16 
17 /*
18  +-----------------------------------------------------------------------------+
19  | ILIAS open source |
20  +-----------------------------------------------------------------------------+
21  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
22  | |
23  | This program is free software; you can redistribute it and/or |
24  | modify it under the terms of the GNU General Public License |
25  | as published by the Free Software Foundation; either version 2 |
26  | of the License, or (at your option) any later version. |
27  | |
28  | This program is distributed in the hope that it will be useful, |
29  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
30  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
31  | GNU General Public License for more details. |
32  | |
33  | You should have received a copy of the GNU General Public License |
34  | along with this program; if not, write to the Free Software |
35  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
36  +-----------------------------------------------------------------------------+
37  */
38 
49 {
50 
51  // These functions are wrappers for soap, since it cannot register methods inside classes
52 
53  // USER ADMINISTRATION
54  public static function login($client, $username, $password)
55  {
56  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
57 
58  $sua = new ilSoapUserAdministration();
59 
60  return $sua->login($client, $username, $password);
61  }
62 
63  public static function loginCAS($client, $PT, $user)
64  {
65  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
66 
67  $sua = new ilSoapUserAdministration();
68 
69  return $sua->loginCAS($client, $PT, $user);
70  }
71 
72  public static function loginLDAP($client, $username, $password)
73  {
74  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
75 
76  $sua = new ilSoapUserAdministration();
77 
78  return $sua->loginLDAP($client, $username, $password);
79  }
80 
84  public static function loginStudipUser($sid, $user_id)
85  {
86  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
87 
88  $sua = new ilSoapUserAdministration();
89 
90  return $sua->loginStudipUser($sid, $user_id);
91  }
92 
93 
94  public static function logout($sid)
95  {
96  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
97 
98  $sua = new ilSoapUserAdministration();
99 
100  return $sua->logout($sid);
101  }
102  public static function lookupUser($sid, $user_name)
103  {
104  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
105 
106  $sua = new ilSoapUserAdministration();
107 
108  return $sua->lookupUser($sid, $user_name);
109  }
110 
111  public static function getUser($sid, $user_id)
112  {
113  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
114 
115  $sua = new ilSoapUserAdministration();
116 
117  return $sua->getUser($sid, $user_id);
118  }
119 
120 
121 
124  public static function deleteUser($sid, $user_id)
125  {
126  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
127 
128  $sua = new ilSoapUserAdministration();
129 
130  return $sua->deleteUser($sid, $user_id);
131  }
132 
133 
134  // COURSE ADMINSTRATION
135  public static function addCourse($sid, $target_id, $crs_xml)
136  {
137  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
138 
139  $sca = new ilSoapCourseAdministration();
140 
141  return $sca->addCourse($sid, $target_id, $crs_xml);
142  }
143  public static function deleteCourse($sid, $course_id)
144  {
145  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
146 
147  $sca = new ilSoapCourseAdministration();
148 
149  return $sca->deleteCourse($sid, $course_id);
150  }
151  public static function assignCourseMember($sid, $course_id, $user_id, $type)
152  {
153  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
154 
155  $sca = new ilSoapCourseAdministration();
156 
157  return $sca->assignCourseMember($sid, $course_id, $user_id, $type);
158  }
159  public static function isAssignedToCourse($sid, $course_id, $user_id)
160  {
161  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
162 
163  $sca = new ilSoapCourseAdministration();
164 
165  return $sca->isAssignedToCourse($sid, $course_id, $user_id);
166  }
167 
168  public static function excludeCourseMember($sid, $course_id, $user_id)
169  {
170  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
171 
172  $sca = new ilSoapCourseAdministration();
173 
174  return $sca->excludeCourseMember($sid, $course_id, $user_id);
175  }
176  public static function getCourseXML($sid, $course_id)
177  {
178  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
179 
180  $sca = new ilSoapCourseAdministration();
181 
182  return $sca->getCourseXML($sid, $course_id);
183  }
184  public static function updateCourse($sid, $course_id, $xml)
185  {
186  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
187 
188  $sca = new ilSoapCourseAdministration();
189 
190  return $sca->updateCourse($sid, $course_id, $xml);
191  }
192  // Object admninistration
193  public static function getObjIdByImportId($sid, $import_id)
194  {
195  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
196 
197  $soa = new ilSoapObjectAdministration();
198 
199  return $soa->getObjIdByImportId($sid, $import_id);
200  }
201 
202  public static function getRefIdsByImportId($sid, $import_id)
203  {
204  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
205 
206  $soa = new ilSoapObjectAdministration();
207 
208  return $soa->getRefIdsByImportId($sid, $import_id);
209  }
210  public static function getRefIdsByObjId($sid, $object_id)
211  {
212  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
213 
214  $soa = new ilSoapObjectAdministration();
215 
216  return $soa->getRefIdsByObjId($sid, $object_id);
217  }
218 
219 
220  public static function getObjectByReference($sid, $a_ref_id, $user_id)
221  {
222  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
223 
224  $soa = new ilSoapObjectAdministration();
225 
226  return $soa->getObjectByReference($sid, $a_ref_id, $user_id);
227  }
228 
229  public static function getObjectsByTitle($sid, $a_title, $user_id)
230  {
231  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
232 
233  $soa = new ilSoapObjectAdministration();
234 
235  return $soa->getObjectsByTitle($sid, $a_title, $user_id);
236  }
237 
238  public static function addObject($sid, $a_target_id, $a_xml)
239  {
240  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
241 
242  $soa = new ilSoapObjectAdministration();
243 
244  return $soa->addObject($sid, $a_target_id, $a_xml);
245  }
246 
247  public static function addReference($sid, $a_source_id, $a_target_id)
248  {
249  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
250 
251  $soa = new ilSoapObjectAdministration();
252 
253  return $soa->addReference($sid, $a_source_id, $a_target_id);
254  }
255 
256  public static function deleteObject($sid, $reference_id)
257  {
258  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
259 
260  $soa = new ilSoapObjectAdministration();
261 
262  return $soa->deleteObject($sid, $reference_id);
263  }
264 
265  public static function removeFromSystemByImportId($sid, $import_id)
266  {
267  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
268 
269  $soa = new ilSoapObjectAdministration();
270 
271  return $soa->removeFromSystemByImportId($sid, $import_id);
272  }
273 
274  public static function updateObjects($sid, $obj_xml)
275  {
276  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
277 
278  $soa = new ilSoapObjectAdministration();
279 
280  return $soa->updateObjects($sid, $obj_xml);
281  }
282  public static function searchObjects($sid, $types, $key, $combination, $user_id)
283  {
284  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
285 
286  $soa = new ilSoapObjectAdministration();
287 
288  return $soa->searchObjects($sid, $types, $key, $combination, $user_id);
289  }
290 
291  public static function getTreeChilds($sid, $ref_id, $types, $user_id)
292  {
293  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
294 
295  $soa = new ilSoapObjectAdministration();
296 
297  return $soa->getTreeChilds($sid, $ref_id, $types, $user_id);
298  }
299 
300  public static function getXMLTree($sid, $ref_id, $types, $user_id)
301  {
302  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
303 
304  $soa = new ilSoapObjectAdministration();
305 
306  return $soa->getXMLTree($sid, $ref_id, $types, $user_id);
307  }
308 
309 
310 
311  // Rbac Tree public static function s
312  public static function getOperations($sid)
313  {
314  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
315 
316  $soa = new ilSoapRBACAdministration();
317 
318  return $soa->getOperations($sid);
319  }
320 
321 
322  public static function addUserRoleEntry($sid, $user_id, $role_id)
323  {
324  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
325 
326  $soa = new ilSoapRBACAdministration();
327 
328  return $soa->addUserRoleEntry($sid, $user_id, $role_id);
329  }
330 
331  public static function deleteUserRoleEntry($sid, $user_id, $role_id)
332  {
333  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
334 
335  $soa = new ilSoapRBACAdministration();
336 
337  return $soa->deleteUserRoleEntry($sid, $user_id, $role_id);
338  }
339 
340  public static function revokePermissions($sid, $ref_id, $role_id)
341  {
342  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
343 
344  $soa = new ilSoapRBACAdministration();
345 
346  return $soa->revokePermissions($sid, $ref_id, $role_id);
347  }
348 
349  public static function grantPermissions($sid, $ref_id, $role_id, $permissions)
350  {
351  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
352 
353  $soa = new ilSoapRBACAdministration();
354 
355  return $soa->grantPermissions($sid, $ref_id, $role_id, $permissions);
356  }
357 
358  public static function getLocalRoles($sid, $ref_id)
359  {
360  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
361 
362  $soa = new ilSoapRBACAdministration();
363 
364  return $soa->getLocalRoles($sid, $ref_id);
365  }
366 
367  public static function getUserRoles($sid, $user_id)
368  {
369  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
370 
371  $soa = new ilSoapRBACAdministration();
372 
373  return $soa->getUserRoles($sid, $user_id);
374  }
375 
376  public static function deleteRole($sid, $role_id)
377  {
378  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
379 
380  $soa = new ilSoapRBACAdministration();
381 
382  return $soa->deleteRole($sid, $role_id);
383  }
384 
385  public static function addRole($sid, $target_id, $obj_xml)
386  {
387  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
388 
389  $soa = new ilSoapRBACAdministration();
390 
391  return $soa->addRole($sid, $target_id, $obj_xml);
392  }
393  public static function addRoleFromTemplate($sid, $target_id, $obj_xml, $template_id)
394  {
395  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
396 
397  $soa = new ilSoapRBACAdministration();
398 
399  return $soa->addRoleFromTemplate($sid, $target_id, $obj_xml, $template_id);
400  }
401 
402  public static function getObjectTreeOperations($sid, $ref_id, $user_id)
403  {
404  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
405 
406  $soa = new ilSoapRBACAdministration();
407 
408  return $soa->getObjectTreeOperations($sid, $ref_id, $user_id);
409  }
410 
411  public static function addGroup($sid, $target_id, $group_xml)
412  {
413  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
414 
415  $soa = new ilSoapGroupAdministration();
416 
417  return $soa->addGroup($sid, $target_id, $group_xml);
418  }
419 
420  public static function groupExists($sid, $title)
421  {
422  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
423 
424  $soa = new ilSoapGroupAdministration();
425 
426  return $soa->groupExists($sid, $title);
427  }
428  public static function getGroup($sid, $ref_id)
429  {
430  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
431 
432  $soa = new ilSoapGroupAdministration();
433 
434  return $soa->getGroup($sid, $ref_id);
435  }
436 
437  public static function assignGroupMember($sid, $group_id, $user_id, $type)
438  {
439  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
440 
441  $sca = new ilSoapGroupAdministration();
442 
443  return $sca->assignGroupMember($sid, $group_id, $user_id, $type);
444  }
445  public static function isAssignedToGroup($sid, $group_id, $user_id)
446  {
447  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
448 
449  $sca = new ilSoapGroupAdministration();
450 
451  return $sca->isAssignedToGroup($sid, $group_id, $user_id);
452  }
453 
454  public static function excludeGroupMember($sid, $group_id, $user_id)
455  {
456  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
457 
458  $sca = new ilSoapGroupAdministration();
459 
460  return $sca->excludeGroupMember($sid, $group_id, $user_id, $type);
461  }
462 
463  public static function distributeMails($sid, $mail_xml)
464  {
465  include_once './webservice/soap/classes/class.ilSoapUtils.php';
466 
467  $sou = new ilSoapUtils();
468  return $sou->distributeMails($sid, $mail_xml);
469  }
470 
471  public static function ilClone($sid, $copy_identifier)
472  {
473  include_once './webservice/soap/classes/class.ilSoapUtils.php';
474 
475  $sou = new ilSoapUtils();
476  $sou->disableSOAPCheck();
477  $sou->ignoreUserAbort();
478 
479  return $sou->ilClone($sid, $copy_identifier);
480  }
481  public static function ilCloneDependencies($sid, $copy_identifier)
482  {
483  include_once './webservice/soap/classes/class.ilSoapUtils.php';
484 
485  $sou = new ilSoapUtils();
486  $sou->disableSOAPCheck();
487  $sou->ignoreUserAbort();
488 
489  return $sou->ilCloneDependencies($sid, $copy_identifier);
490  }
491 
492  public static function handleECSTasks($sid, $a_server_id)
493  {
494  include_once './webservice/soap/classes/class.ilSoapUtils.php';
495 
496  $sou = new ilSoapUtils();
497  $sou->disableSoapCheck();
498  $sou->ignoreUserAbort();
499 
500  return $sou->handleECSTasks($sid, $a_server_id);
501  }
502 
503  public static function saveQuestionResult($sid, $user_id, $test_id, $question_id, $pass, $solution)
504  {
505  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
506 
507  $sass = new ilSoapTestAdministration();
508 
509  return $sass->saveQuestionResult($sid, $user_id, $test_id, $question_id, $pass, $solution);
510  }
511 
512  public static function saveQuestion($sid, $active_id, $question_id, $pass, $solution)
513  {
514  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
515 
516  $sass = new ilSoapTestAdministration();
517 
518  return $sass->saveQuestion($sid, $active_id, $question_id, $pass, $solution);
519  }
520 
521  public static function saveQuestionSolution($sid, $active_id, $question_id, $pass, $solution)
522  {
523  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
524 
525  $sass = new ilSoapTestAdministration();
526 
527  return $sass->saveQuestionSolution($sid, $active_id, $question_id, $pass, $solution);
528  }
529 
530  public static function getQuestionSolution($sid, $active_id, $question_id, $pass)
531  {
532  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
533 
534  $sass = new ilSoapTestAdministration();
535 
536  return $sass->getQuestionSolution($sid, $active_id, $question_id, $pass);
537  }
538 
539  public static function getTestUserData($sid, $active_id)
540  {
541  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
542 
543  $sass = new ilSoapTestAdministration();
544 
545  return $sass->getTestUserData($sid, $active_id);
546  }
547 
548  public static function getNrOfQuestionsInPass($sid, $active_id, $pass)
549  {
550  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
551 
552  $sass = new ilSoapTestAdministration();
553 
554  return $sass->getNrOfQuestionsInPass($sid, $active_id, $pass);
555  }
556 
557  public static function getPositionOfQuestion($sid, $active_id, $question_id, $pass)
558  {
559  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
560 
561  $sass = new ilSoapTestAdministration();
562 
563  return $sass->getPositionOfQuestion($sid, $active_id, $question_id, $pass);
564  }
565 
566  public static function getPreviousReachedPoints($sid, $active_id, $question_id, $pass)
567  {
568  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
569 
570  $sass = new ilSoapTestAdministration();
571 
572  return $sass->getPreviousReachedPoints($sid, $active_id, $question_id, $pass);
573  }
574 
575  public static function saveTempFileAsMediaObject($sid, $name, $tmp_name)
576  {
577  include_once './webservice/soap/classes/class.ilSoapUtils.php';
578 
579  $sou = new ilSoapUtils();
580  $sou->disableSOAPCheck();
581 
582  return $sou->saveTempFileAsMediaObject($sid, $name, $tmp_name);
583  }
584 
585  public static function getMobsOfObject($sid, $a_type, $a_id)
586  {
587  include_once './webservice/soap/classes/class.ilSoapUtils.php';
588 
589  $sou = new ilSoapUtils();
590  $sou->disableSOAPCheck();
591 
592  return $sou->getMobsOfObject($sid, $a_type, $a_id);
593  }
594 
595  public static function getStructureObjects($sid, $ref_id)
596  {
597  include_once './webservice/soap/classes/class.ilSoapStructureObjectAdministration.php';
598 
600 
601  return $sca->getStructureObjects($sid, $ref_id);
602  }
603 
604  public static function getRoles($sid, $role_type, $id)
605  {
606  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
607 
608  $soa = new ilSoapRBACAdministration();
609 
610  return $soa->getRoles($sid, $role_type, $id);
611  }
612 
613  public static function importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail)
614  {
615  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
616 
617  $sua = new ilSoapUserAdministration();
618 
619  return $sua->importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail);
620  }
621 
622  public static function getUsersForContainer($sid, $ref_id, $attach_roles, $active)
623  {
624  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
625 
626  $sua = new ilSoapUserAdministration();
627 
628  return $sua->getUsersForContainer($sid, $ref_id, $attach_roles, $active);
629  }
630 
631  public static function getUsersForRole($sid, $role_id, $attach_roles, $active)
632  {
633  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
634 
635  $sua = new ilSoapUserAdministration();
636 
637  return $sua->getUserForRole($sid, $role_id, $attach_roles, $active);
638  }
639 
640 
641  public static function searchUser($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active)
642  {
643  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
644 
645  $sua = new ilSoapUserAdministration();
646 
647  return $sua->searchUser($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active);
648  }
649 
650  public static function hasNewMail($sid)
651  {
652  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
653 
654  $sua = new ilSoapUserAdministration();
655 
656  return $sua->hasNewMail($sid);
657  }
658 
659  public static function getNIC($sid)
660  {
661  include_once './webservice/soap/classes/class.ilSoapAdministration.php';
662  $soa = new ilSoapAdministration();
663  return $soa->getNIC($sid);
664  }
665 
666  public static function getExerciseXML($sid, $ref_id, $attachFileContentsMode)
667  {
668  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
669  $sta = new ilSoapExerciseAdministration();
670  return $sta->getExerciseXML($sid, $ref_id, $attachFileContentsMode);
671  }
672 
673 
674  public static function updateExercise($sid, $ref_id, $xml)
675  {
676  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
677  $sta = new ilSoapExerciseAdministration();
678  return $sta->updateExercise($sid, $ref_id, $xml);
679  }
680 
681  public static function addExercise($sid, $ref_id, $xml)
682  {
683  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
684  $sta = new ilSoapExerciseAdministration();
685  return $sta->addExercise($sid, $ref_id, $xml);
686  }
687 
688  public static function getFileXML($sid, $ref_id, $attachFileContentsMode)
689  {
690  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
691  $sta = new ilSoapFileAdministration();
692  return $sta->getFileXML($sid, $ref_id, $attachFileContentsMode);
693  }
694 
695 
696  public static function updateFile($sid, $ref_id, $xml)
697  {
698  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
699  $sta = new ilSoapFileAdministration();
700  return $sta->updateFile($sid, $ref_id, $xml);
701  }
702 
703  public static function addFile($sid, $ref_id, $xml)
704  {
705  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
706  $sta = new ilSoapFileAdministration();
707  return $sta->addFile($sid, $ref_id, $xml);
708  }
709 
710  public static function getObjIdsByRefIds($sid, $ref_ids)
711  {
712  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
713 
714  $soa = new ilSoapObjectAdministration();
715 
716  return $soa->getObjIdsByRefIds($sid, $ref_ids);
717  }
718 
719  public static function getUserXML($sid, $user_ids, $attach_roles)
720  {
721  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
722 
723  $sua = new ilSoapUserAdministration();
724 
725  return $sua->getUserXML($sid, $user_ids, $attach_roles);
726  }
727 
728  public static function updateGroup($sid, $ref_id, $grp_xml)
729  {
730  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
731 
732  $sua = new ilSoapGroupAdministration();
733 
734  return $sua->updateGroup($sid, $ref_id, $grp_xml);
735  }
736 
737  public static function getIMSManifestXML($sid, $ref_id)
738  {
739  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
740 
741  $sua = new ilSoapSCORMAdministration();
742 
743  return $sua->getIMSManifestXML($sid, $ref_id);
744  }
745 
746  public static function hasSCORMCertificate($sid, $ref_id, $usr_id)
747  {
748  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
749 
750  $sua = new ilSoapSCORMAdministration();
751 
752  return $sua->hasSCORMCertificate($sid, $ref_id, $usr_id);
753  }
754 
760  public static function copyObject($sid, $copy_settings_xml)
761  {
762  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
763 
764  $soa = new ilSoapObjectAdministration();
765 
766  return $soa->copyObject($sid, $copy_settings_xml);
767  }
768 
769 
775  public static function startBackgroundTaskWorker($sid)
776  {
777  require_once("./Services/BackgroundTasks/classes/class.ilSoapBackgroundTasksAdministration.php");
779 
780  return $soa->runAsync($sid);
781  }
782 
789  public static function moveObject($sid, $ref_id, $target_id)
790  {
791  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
792 
793  $soa = new ilSoapObjectAdministration();
794 
795  return $soa->moveObject($sid, $ref_id, $target_id);
796  }
797 
798 
809  public static function getTestResults($sid, $ref_id, $sum_only)
810  {
811  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
812 
813  $soa = new ilSoapTestAdministration();
814 
815  return $soa->getTestResults($sid, $ref_id, $sum_only);
816  }
817 
827  public static function removeTestResults($sid, $ref_id, $a_user_ids)
828  {
829  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
830 
831  $soa = new ilSoapTestAdministration();
832  return $soa->removeTestResults($sid, $ref_id, $a_user_ids);
833  }
834 
842  public static function getCoursesForUser($sid, $parameters)
843  {
844  include_once 'webservice/soap/classes/class.ilSoapCourseAdministration.php';
845  $soc = new ilSoapCourseAdministration();
846  return $soc->getCoursesForUser($sid, $parameters);
847  }
848 
856  public static function getGroupsForUser($sid, $parameters)
857  {
858  include_once 'webservice/soap/classes/class.ilSoapGroupAdministration.php';
859  $soc = new ilSoapGroupAdministration();
860  return $soc->getGroupsForUser($sid, $parameters);
861  }
862 
863  public static function getPathForRefId($sid, $ref_id)
864  {
865  include_once 'webservice/soap/classes/class.ilSoapObjectAdministration.php';
866  $soa = new ilSoapObjectAdministration();
867  return $soa->getPathForRefId($sid, $ref_id);
868  }
869 
870  public static function searchRoles($sid, $key, $combination, $role_type)
871  {
872  include_once 'webservice/soap/classes/class.ilSoapRBACAdministration.php';
873  $roa = new ilSoapRBACAdministration();
874  return $roa->searchRoles($sid, $key, $combination, $role_type);
875  }
876 
877 
878  public static function getInstallationInfoXML()
879  {
880  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
881  $roa = new ilSoapAdministration();
882  return $roa->getInstallationInfoXML();
883  }
884 
885  public static function getClientInfoXML($clientid)
886  {
887  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
888  $roa = new ilSoapAdministration();
889  return $roa->getClientInfoXML($clientid);
890  }
891 
897  public static function buildHTTPPath()
898  {
899  if ($_SERVER["HTTPS"] == "on") {
900  $protocol = 'https://';
901  } else {
902  $protocol = 'http://';
903  }
904  $host = $_SERVER['HTTP_HOST'];
905 
906  $path = dirname($_SERVER['REQUEST_URI']);
907 
908  //dirname cuts the last directory from a directory path e.g content/classes return content
909  include_once 'Services/Utilities/classes/class.ilUtil.php';
911 
912  $dirs = explode('/', $module);
913  $uri = $path;
914  foreach ($dirs as $dir) {
915  $uri = dirname($uri);
916  }
917  return ilUtil::removeTrailingPathSeparators($protocol . $host . $uri);
918  }
919 
920  public static function getSCORMCompletionStatus($sid, $usr_id, $a_ref_id)
921  {
922  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
923 
924  $sua = new ilSoapSCORMAdministration();
925 
926  return $sua->getSCORMCompletionStatus($sid, $usr_id, $a_ref_id);
927  }
928 
929  public static function getUserIdBySid($sid)
930  {
931  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
932 
933  $sua = new ilSoapUserAdministration();
934 
935  return $sua->getUserIdBySid($sid);
936  }
937 
938  public static function readWebLink($sid, $ref_id)
939  {
940  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
941 
942  $swa = new ilSoapWebLinkAdministration();
943  return $swa->readWebLink($sid, $ref_id);
944  }
945 
946  public static function createWebLink($sid, $ref_id, $xml)
947  {
948  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
949 
950  $swa = new ilSoapWebLinkAdministration();
951  return $swa->createWebLink($sid, $ref_id, $xml);
952  }
953 
954  public static function updateWebLink($sid, $ref_id, $xml)
955  {
956  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
957 
958  $swa = new ilSoapWebLinkAdministration();
959  return $swa->updateWebLink($sid, $ref_id, $xml);
960  }
961 
975  public static function deleteExpiredDualOptInUserObjects($sid, $usr_id)
976  {
977  include_once './webservice/soap/classes/class.ilSoapUtils.php';
978 
979  $sou = new ilSoapUtils();
980  $sou->disableSOAPCheck();
981  $sou->ignoreUserAbort();
982 
983  return $sou->deleteExpiredDualOptInUserObjects($sid, $usr_id);
984  }
985 
986  /*
987  public static function getSkillCompletionDateForTriggerRefId($sid, $usr_id, $a_ref_id)
988  {
989  include_once './webservice/soap/classes/class.ilSoapSkillAdministration.php';
990  $s = new ilSoapSkillAdministration();
991 
992  $res = $s->getCompletionDateForTriggerRefId($sid, $usr_id, $a_ref_id);
993  return $res;
994  }
995 
996  public static function checkSkillUserCertificateForTriggerRefId($sid, $usr_id, $a_ref_id)
997  {
998  include_once './webservice/soap/classes/class.ilSoapSkillAdministration.php';
999 
1000  $s = new ilSoapSkillAdministration();
1001  return $s->checkUserCertificateForTriggerRefId($sid, $usr_id, $a_ref_id);
1002  }
1003 
1004  public static function getSkillTriggerOfAllCertificates($sid, $usr_id)
1005  {
1006  include_once './webservice/soap/classes/class.ilSoapSkillAdministration.php';
1007 
1008  $s = new ilSoapSkillAdministration();
1009  return $s->getTriggerOfAllCertificates($sid, $usr_id);
1010  }
1011  */
1012 
1021  public static function deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter)
1022  {
1023  include_once './webservice/soap/classes/class.ilSoapLearningProgressAdministration.php';
1025  return $sla->deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter);
1026  }
1027  // mcs-patch start
1028  public static function getLearningProgressChanges($sid, $timestamp, $include_ref_ids, $type_filter)
1029  {
1030  include_once './webservice/soap/classes/class.ilSoapLearningProgressAdministration.php';
1031 
1033 
1034  return $s->getLearningProgressChanges($sid, $timestamp, $include_ref_ids, $type_filter);
1035  }
1036  // mcs-patch end
1037 
1038 
1046  public static function getProgressInfo($sid, $ref_id, $progress_filter)
1047  {
1048  include_once './webservice/soap/classes/class.ilSoapLearningProgressAdministration.php';
1050  return $sla->getProgressInfo($sid, $ref_id, $progress_filter);
1051  }
1052 
1064  public static function exportDataCollectionContent($sid, $data_collection_id, $table_id = null, $format = "xls", $filepath = null)
1065  {
1066  include_once './webservice/soap/classes/class.ilSoapDataCollectionAdministration.php';
1068  return $dcl->exportDataCollectionContent($sid, $data_collection_id, $table_id, $format, $filepath);
1069  }
1070 
1079  /* abandonded with 6.0
1080  public static function addDesktopItems($sid, $user_id, $reference_ids)
1081  {
1082  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
1083  $obj_handler = new ilSoapObjectAdministration();
1084  return $obj_handler->addDesktopItems($sid, $user_id, $reference_ids);
1085  }*/
1086 
1095  public static function removeDesktopItems($sid, $user_id, $reference_ids)
1096  {
1097  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
1098  $obj_handler = new ilSoapObjectAdministration();
1099  return $obj_handler->removeDesktopItems($sid, $user_id, $reference_ids);
1100  }
1101 
1102 
1103  // OrgUnits
1104  public static function addUserToPositionInOrgUnit(...$params)
1105  {
1106  $h = new AddUserIdToPositionInOrgUnit();
1107 
1108  return $h->execute($params);
1109  }
1110 
1111 
1112  public static function getEmployeePositionId(...$params)
1113  {
1114  $h = new EmployeePositionId();
1115 
1116  return $h->execute($params);
1117  }
1118 
1119 
1120  public static function importOrgUnitsSimpleXML(...$params)
1121  {
1122  $h = new ImportOrgUnitTree();
1123 
1124  return $h->execute($params);
1125  }
1126 
1127 
1128  public static function getOrgUnitsSimpleXML(...$params)
1129  {
1130  $h = new OrgUnitTree();
1131 
1132  return $h->execute($params);
1133  }
1134 
1135 
1136  public static function getPositionIds(...$params)
1137  {
1138  $h = new PositionIds();
1139 
1140  return $h->execute($params);
1141  }
1142 
1143 
1144  public static function getPositionTitle(...$params)
1145  {
1146  $h = new PositionTitle();
1147 
1148  return $h->execute($params);
1149  }
1150 
1151 
1152  public static function removeUserFromPositionInOrgUnit(...$params)
1153  {
1155 
1156  return $h->execute($params);
1157  }
1158 
1159 
1160  public static function getSuperiorPositionId(...$params)
1161  {
1162  $h = new SuperiorPositionId();
1163 
1164  return $h->execute($params);
1165  }
1166 
1167 
1168  public static function getUserIdsOfPosition(...$params)
1169  {
1170  $h = new UserIdsOfPosition();
1171 
1172  return $h->execute($params);
1173  }
1174 
1175 
1176  public function getUserIdsOfPositionAndOrgUnit(...$params)
1177  {
1178  $h = new UserIdsOfPositionAndOrgUnit();
1179 
1180  return $h->execute($params);
1181  }
1182 
1189  public function __call($name, $arguments)
1190  {
1191  // SoapHookPlugins need the client-ID submitted
1192  if (!isset($_GET['client_id'])) {
1193  throw new SoapFault('SOAP-ENV:Server', "Function '{$name}' does not exist");
1194  }
1195  // Note: We need to bootstrap ILIAS in order to get $ilPluginAdmin and load the soap plugins.
1196  // We MUST use a context that does not handle authentication at this point (session is checked by SOAP).
1200  global $DIC;
1201  $soapHook = new ilSoapHook($DIC['ilPluginAdmin']);
1202  // Method name may be invoked with namespace e.g. 'myMethod' vs 'ns:myMethod'
1203  if (strpos($name, ':') !== false) {
1204  list($_, $name) = explode(':', $name);
1205  }
1206  $method = $soapHook->getMethodByName($name);
1207  if ($method) {
1208  try {
1209  return $method->execute($arguments);
1210  } catch (ilSoapPluginException $e) {
1211  throw new SoapFault('SOAP-ENV:Server', $e->getMessage());
1212  }
1213  }
1214  throw new SoapFault('SOAP-ENV:Server', "Function '{$name}' does not exist");
1215  }
1216 }
static removeFromSystemByImportId($sid, $import_id)
static isAssignedToGroup($sid, $group_id, $user_id)
static getLocalRoles($sid, $ref_id)
static getObjIdsByRefIds($sid, $ref_ids)
static getOperations($sid)
static deleteUser($sid, $user_id)
static updateExercise($sid, $ref_id, $xml)
static getUserIdsOfPosition(... $params)
static searchRoles($sid, $key, $combination, $role_type)
static loginStudipUser($sid, $user_id)
static getUserRoles($sid, $user_id)
static getInstallationInfoXML()
static grantPermissions($sid, $ref_id, $role_id, $permissions)
static getPositionOfQuestion($sid, $active_id, $question_id, $pass)
This class handles all DB changes necessary for fraunhofer.
static getUsersForContainer($sid, $ref_id, $attach_roles, $active)
$type
static login($client, $username, $password)
static getUsersForRole($sid, $role_id, $attach_roles, $active)
static removeTestResults($sid, $ref_id, $a_user_ids)
Remove test results of user.
$_GET["client_id"]
static getClientInfoXML($clientid)
static deleteUserRoleEntry($sid, $user_id, $role_id)
static revokePermissions($sid, $ref_id, $role_id)
static getSCORMCompletionStatus($sid, $usr_id, $a_ref_id)
static ilClone($sid, $copy_identifier)
static getGroup($sid, $ref_id)
static getQuestionSolution($sid, $active_id, $question_id, $pass)
static importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail)
static getSuperiorPositionId(... $params)
static excludeGroupMember($sid, $group_id, $user_id)
static getCourseXML($sid, $course_id)
static deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter)
Delete progress.
if($_SERVER['argc']< 4) $client
Definition: cron.php:12
static updateObjects($sid, $obj_xml)
static createWebLink($sid, $ref_id, $xml)
$target_id
Definition: goto.php:49
static searchUser($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active)
static getEmployeePositionId(... $params)
static getRefIdsByImportId($sid, $import_id)
const CONTEXT_SOAP_NO_AUTH
static saveQuestionResult($sid, $user_id, $test_id, $question_id, $pass, $solution)
static assignCourseMember($sid, $course_id, $user_id, $type)
static handleECSTasks($sid, $a_server_id)
static assignGroupMember($sid, $group_id, $user_id, $type)
static readWebLink($sid, $ref_id)
static deleteObject($sid, $reference_id)
static getObjectTreeOperations($sid, $ref_id, $user_id)
static addGroup($sid, $target_id, $group_xml)
static getPositionIds(... $params)
static addCourse($sid, $target_id, $crs_xml)
static getUser($sid, $user_id)
static copyObject($sid, $copy_settings_xml)
copy object in repository $sid session id $settings_xml contains copy wizard settings following ilias...
static deleteRole($sid, $role_id)
static loginCAS($client, $PT, $user)
static addReference($sid, $a_source_id, $a_target_id)
static moveObject($sid, $ref_id, $target_id)
move object in repository
static getOrgUnitsSimpleXML(... $params)
static searchObjects($sid, $types, $key, $combination, $user_id)
static buildHTTPPath()
builds http path if no client is available
static deleteExpiredDualOptInUserObjects($sid, $usr_id)
Static method for soap webservice: deleteExpiredDualOptInUserObjects.
static getIMSManifestXML($sid, $ref_id)
static hasNewMail($sid)
$a_type
Definition: workflow.php:92
static addUserRoleEntry($sid, $user_id, $role_id)
if($format !==null) $name
Definition: metadata.php:230
static getGroupsForUser($sid, $parameters)
return courses for users depending on the status
static initILIAS()
ilias initialisation
static removeUserFromPositionInOrgUnit(... $params)
static distributeMails($sid, $mail_xml)
static getUserXML($sid, $user_ids, $attach_roles)
static getStructureObjects($sid, $ref_id)
static getRoles($sid, $role_type, $id)
static deleteCourse($sid, $course_id)
static lookupUser($sid, $user_name)
static getPositionTitle(... $params)
static getTestResults($sid, $ref_id, $sum_only)
get results of test
static getMobsOfObject($sid, $a_type, $a_id)
Soap methods for adminstrating web links.
static saveQuestionSolution($sid, $active_id, $question_id, $pass, $solution)
static addFile($sid, $ref_id, $xml)
Class ilSoapHook.
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
static getFileXML($sid, $ref_id, $attachFileContentsMode)
static hasSCORMCertificate($sid, $ref_id, $usr_id)
static excludeCourseMember($sid, $course_id, $user_id)
static groupExists($sid, $title)
$format
Definition: metadata.php:218
$xml
Definition: metadata.php:332
static getExerciseXML($sid, $ref_id, $attachFileContentsMode)
static getRefIdsByObjId($sid, $object_id)
static getLearningProgressChanges($sid, $timestamp, $include_ref_ids, $type_filter)
static getObjectByReference($sid, $a_ref_id, $user_id)
static removeTrailingPathSeparators($path)
static loginLDAP($client, $username, $password)
static addExercise($sid, $ref_id, $xml)
static saveQuestion($sid, $active_id, $question_id, $pass, $solution)
static getUserIdBySid($sid)
static getPreviousReachedPoints($sid, $active_id, $question_id, $pass)
static getProgressInfo($sid, $ref_id, $progress_filter)
Get learning progress info.
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81
static getXMLTree($sid, $ref_id, $types, $user_id)
static addRoleFromTemplate($sid, $target_id, $obj_xml, $template_id)
static init($a_type)
Init context by type.
$password
Definition: cron.php:14
static getObjectsByTitle($sid, $a_title, $user_id)
static updateCourse($sid, $course_id, $xml)
static ilCloneDependencies($sid, $copy_identifier)
static getPathForRefId($sid, $ref_id)
static removeDesktopItems($sid, $user_id, $reference_ids)
Add desktop items for user.
__call($name, $arguments)
static getObjIdByImportId($sid, $import_id)
static updateWebLink($sid, $ref_id, $xml)
$DIC
Definition: xapitoken.php:46
const ILIAS_MODULE
Definition: server.php:14
static getTreeChilds($sid, $ref_id, $types, $user_id)
static getCoursesForUser($sid, $parameters)
return courses for users depending on the status
static importOrgUnitsSimpleXML(... $params)
const CONTEXT_SOAP
static exportDataCollectionContent($sid, $data_collection_id, $table_id=null, $format="xls", $filepath=null)
Exports a given table of a datacollection into xls.
static addObject($sid, $a_target_id, $a_xml)
static getTestUserData($sid, $active_id)
static isAssignedToCourse($sid, $course_id, $user_id)
static getNrOfQuestionsInPass($sid, $active_id, $pass)
static updateGroup($sid, $ref_id, $grp_xml)
getUserIdsOfPositionAndOrgUnit(... $params)
static saveTempFileAsMediaObject($sid, $name, $tmp_name)
static addRole($sid, $target_id, $obj_xml)
static updateFile($sid, $ref_id, $xml)
static addUserToPositionInOrgUnit(... $params)
static startBackgroundTaskWorker($sid)