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