ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
inc.soap_functions.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22  */
23 
24 
35 
36  // These functions are wrappers for soap, since it cannot register methods inside classes
37 
38  // USER ADMINISTRATION
39  public static function login($client,$username,$password)
40  {
41  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
42 
43  $sua =& new ilSoapUserAdministration();
44 
45  return $sua->login($client,$username,$password);
46  }
47 
48  public static function loginCAS($client, $PT, $user)
49  {
50  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
51 
52  $sua =& new ilSoapUserAdministration();
53 
54  return $sua->loginCAS($client, $PT, $user);
55  }
56 
57  public static function loginLDAP($client, $username, $password)
58  {
59  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
60 
61  $sua =& new ilSoapUserAdministration();
62 
63  return $sua->loginLDAP($client, $username, $password);
64  }
65 
66 
67  public static function logout($sid)
68  {
69  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
70 
71  $sua =& new ilSoapUserAdministration();
72 
73  return $sua->logout($sid);
74  }
75  public static function lookupUser($sid,$user_name)
76  {
77  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
78 
79  $sua =& new ilSoapUserAdministration();
80 
81  return $sua->lookupUser($sid,$user_name);
82  }
83 
84  public static function getUser($sid,$user_id)
85  {
86  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
87 
88  $sua =& new ilSoapUserAdministration();
89 
90  return $sua->getUser($sid,$user_id);
91  }
92 
93  public static function updateUser($sid,$user_data)
94  {
95  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
96 
97  $sua =& new ilSoapUserAdministration();
98 
99  return $sua->updateUser($sid,$user_data);
100  }
101 
102  public static function updatePassword($sid,$user_id,$new_password)
103  {
104  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
105 
106  $sua =& new ilSoapUserAdministration();
107 
108  return $sua->updatePassword($sid,$user_id,$new_password);
109  }
110 
111  public static function addUser($sid,$user_data,$global_role_id)
112  {
113  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
114 
115  $sua =& new ilSoapUserAdministration();
116 
117  return $sua->addUser($sid,$user_data,$global_role_id);
118  }
119  public static function deleteUser($sid,$user_id)
120  {
121  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
122 
123  $sua =& new ilSoapUserAdministration();
124 
125  return $sua->deleteUser($sid,$user_id);
126  }
127 
128 
129  // COURSE ADMINSTRATION
130  public static function addCourse($sid,$target_id,$crs_xml)
131  {
132  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
133 
134  $sca =& new ilSoapCourseAdministration();
135 
136  return $sca->addCourse($sid,$target_id,$crs_xml);
137  }
138  public static function deleteCourse($sid,$course_id)
139  {
140  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
141 
142  $sca =& new ilSoapCourseAdministration();
143 
144  return $sca->deleteCourse($sid,$course_id);
145  }
146  public static function assignCourseMember($sid,$course_id,$user_id,$type)
147  {
148  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
149 
150  $sca =& new ilSoapCourseAdministration();
151 
152  return $sca->assignCourseMember($sid,$course_id,$user_id,$type);
153  }
154  public static function isAssignedToCourse($sid,$course_id,$user_id)
155  {
156  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
157 
158  $sca =& new ilSoapCourseAdministration();
159 
160  return $sca->isAssignedToCourse($sid,$course_id,$user_id);
161  }
162 
163  public static function excludeCourseMember($sid,$course_id,$user_id)
164  {
165  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
166 
167  $sca =& new ilSoapCourseAdministration();
168 
169  return $sca->excludeCourseMember($sid,$course_id,$user_id);
170  }
171  public static function getCourseXML($sid,$course_id)
172  {
173  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
174 
175  $sca =& new ilSoapCourseAdministration();
176 
177  return $sca->getCourseXML($sid,$course_id);
178  }
179  public static function updateCourse($sid,$course_id,$xml)
180  {
181  include_once './webservice/soap/classes/class.ilSoapCourseAdministration.php';
182 
183  $sca =& new ilSoapCourseAdministration();
184 
185  return $sca->updateCourse($sid,$course_id,$xml);
186  }
187  // Object admninistration
188  public static function getObjIdByImportId($sid,$import_id)
189  {
190  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
191 
192  $soa =& new ilSoapObjectAdministration();
193 
194  return $soa->getObjIdByImportId($sid,$import_id);
195  }
196 
197  public static function getRefIdsByImportId($sid,$import_id)
198  {
199  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
200 
201  $soa =& new ilSoapObjectAdministration();
202 
203  return $soa->getRefIdsByImportId($sid,$import_id);
204  }
205  public static function getRefIdsByObjId($sid,$object_id)
206  {
207  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
208 
209  $soa =& new ilSoapObjectAdministration();
210 
211  return $soa->getRefIdsByObjId($sid,$object_id);
212  }
213 
214 
215  public static function getObjectByReference($sid,$a_ref_id,$user_id)
216  {
217  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
218 
219  $soa =& new ilSoapObjectAdministration();
220 
221  return $soa->getObjectByReference($sid,$a_ref_id,$user_id);
222  }
223 
224  public static function getObjectsByTitle($sid,$a_title,$user_id)
225  {
226  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
227 
228  $soa =& new ilSoapObjectAdministration();
229 
230  return $soa->getObjectsByTitle($sid,$a_title,$user_id);
231  }
232 
233  public static function addObject($sid,$a_target_id,$a_xml)
234  {
235  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
236 
237  $soa =& new ilSoapObjectAdministration();
238 
239  return $soa->addObject($sid,$a_target_id,$a_xml);
240  }
241 
242  public static function addReference($sid,$a_source_id,$a_target_id)
243  {
244  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
245 
246  $soa =& new ilSoapObjectAdministration();
247 
248  return $soa->addReference($sid,$a_source_id,$a_target_id);
249  }
250 
251  public static function deleteObject($sid,$reference_id)
252  {
253  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
254 
255  $soa =& new ilSoapObjectAdministration();
256 
257  return $soa->deleteObject($sid,$reference_id);
258  }
259 
260  public static function removeFromSystemByImportId($sid,$import_id)
261  {
262  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
263 
264  $soa =& new ilSoapObjectAdministration();
265 
266  return $soa->removeFromSystemByImportId($sid,$import_id);
267  }
268 
269  public static function updateObjects($sid,$obj_xml)
270  {
271  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
272 
273  $soa =& new ilSoapObjectAdministration();
274 
275  return $soa->updateObjects($sid,$obj_xml);
276  }
277  public static function searchObjects($sid,$types,$key,$combination,$user_id)
278  {
279  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
280 
281  $soa =& new ilSoapObjectAdministration();
282 
283  return $soa->searchObjects($sid,$types,$key,$combination,$user_id);
284  }
285 
286  public static function getTreeChilds($sid,$ref_id,$types,$user_id)
287  {
288  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
289 
290  $soa =& new ilSoapObjectAdministration();
291 
292  return $soa->getTreeChilds($sid,$ref_id,$types,$user_id);
293  }
294 
295  public static function getXMLTree($sid,$ref_id,$types,$user_id)
296  {
297  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
298 
299  $soa =& new ilSoapObjectAdministration();
300 
301  return $soa->getXMLTree($sid,$ref_id,$types,$user_id);
302  }
303 
304 
305 
306  // Rbac Tree public static function s
307  public static function getOperations($sid)
308  {
309  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
310 
311  $soa =& new ilSoapRBACAdministration();
312 
313  return $soa->getOperations($sid);
314  }
315 
316 
317  public static function addUserRoleEntry($sid,$user_id,$role_id)
318  {
319  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
320 
321  $soa =& new ilSoapRBACAdministration();
322 
323  return $soa->addUserRoleEntry($sid,$user_id,$role_id);
324  }
325 
326  public static function deleteUserRoleEntry($sid,$user_id,$role_id)
327  {
328  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
329 
330  $soa =& new ilSoapRBACAdministration();
331 
332  return $soa->deleteUserRoleEntry($sid,$user_id,$role_id);
333  }
334 
335  public static function revokePermissions($sid,$ref_id,$role_id)
336  {
337  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
338 
339  $soa =& new ilSoapRBACAdministration();
340 
341  return $soa->revokePermissions($sid,$ref_id,$role_id);
342  }
343 
344  public static function grantPermissions($sid,$ref_id,$role_id,$permissions)
345  {
346  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
347 
348  $soa =& new ilSoapRBACAdministration();
349 
350  return $soa->grantPermissions($sid,$ref_id,$role_id,$permissions);
351  }
352 
353  public static function getLocalRoles($sid,$ref_id)
354  {
355  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
356 
357  $soa =& new ilSoapRBACAdministration();
358 
359  return $soa->getLocalRoles($sid,$ref_id);
360  }
361 
362  public static function getUserRoles($sid,$user_id)
363  {
364  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
365 
366  $soa =& new ilSoapRBACAdministration();
367 
368  return $soa->getUserRoles($sid,$user_id);
369  }
370 
371  public static function deleteRole($sid,$role_id)
372  {
373  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
374 
375  $soa =& new ilSoapRBACAdministration();
376 
377  return $soa->deleteRole($sid,$role_id);
378  }
379 
380  public static function addRole($sid,$target_id,$obj_xml)
381  {
382  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
383 
384  $soa =& new ilSoapRBACAdministration();
385 
386  return $soa->addRole($sid,$target_id,$obj_xml);
387  }
388  public static function addRoleFromTemplate($sid,$target_id,$obj_xml,$template_id)
389  {
390  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
391 
392  $soa =& new ilSoapRBACAdministration();
393 
394  return $soa->addRoleFromTemplate($sid,$target_id,$obj_xml,$template_id);
395  }
396 
397  public static function getObjectTreeOperations($sid,$ref_id,$user_id)
398  {
399  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
400 
401  $soa =& new ilSoapRBACAdministration();
402 
403  return $soa->getObjectTreeOperations($sid,$ref_id,$user_id);
404  }
405 
406  public static function addGroup($sid,$target_id,$group_xml)
407  {
408  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
409 
410  $soa =& new ilSoapGroupAdministration();
411 
412  return $soa->addGroup($sid,$target_id,$group_xml);
413  }
414 
415  public static function groupExists($sid,$title)
416  {
417  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
418 
419  $soa =& new ilSoapGroupAdministration();
420 
421  return $soa->addGroup($sid,$title);
422  }
423  public static function getGroup($sid,$ref_id)
424  {
425  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
426 
427  $soa =& new ilSoapGroupAdministration();
428 
429  return $soa->getGroup($sid,$ref_id);
430  }
431 
432  public static function assignGroupMember($sid,$group_id,$user_id,$type)
433  {
434  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
435 
436  $sca =& new ilSoapGroupAdministration();
437 
438  return $sca->assignGroupMember($sid,$group_id,$user_id,$type);
439  }
440  public static function isAssignedToGroup($sid,$group_id,$user_id)
441  {
442  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
443 
444  $sca =& new ilSoapGroupAdministration();
445 
446  return $sca->isAssignedToGroup($sid,$group_id,$user_id);
447  }
448 
449  public static function excludeGroupMember($sid,$group_id,$user_id)
450  {
451  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
452 
453  $sca =& new ilSoapGroupAdministration();
454 
455  return $sca->excludeGroupMember($sid,$group_id,$user_id,$type);
456  }
457 
458 
459  public static function sendMail($sid,$to,$cc,$bcc,$sender,$subject,$message,$attach)
460  {
461  include_once './webservice/soap/classes/class.ilSoapUtils.php';
462 
463  $sou =& new ilSoapUtils();
464  $sou->disableSOAPCheck();
465  $sou->ignoreUserAbort();
466 
467  return $sou->sendMail($sid,$to,$cc,$bcc,$sender,$subject,$message,$attach);
468  }
469 
470  public static function ilClone($sid,$copy_identifier)
471  {
472  include_once './webservice/soap/classes/class.ilSoapUtils.php';
473 
474  $sou = new ilSoapUtils();
475  $sou->disableSOAPCheck();
476  $sou->ignoreUserAbort();
477 
478  return $sou->ilClone($sid,$copy_identifier);
479  }
480  public static function ilCloneDependencies($sid,$copy_identifier)
481  {
482  include_once './webservice/soap/classes/class.ilSoapUtils.php';
483 
484  $sou = new ilSoapUtils();
485  $sou->disableSOAPCheck();
486  $sou->ignoreUserAbort();
487 
488  return $sou->ilCloneDependencies($sid,$copy_identifier);
489  }
490 
491  public static function handleECSTasks($sid)
492  {
493  include_once './webservice/soap/classes/class.ilSoapUtils.php';
494 
495  $sou = new ilSoapUtils();
496  $sou->disableSoapCheck();
497  $sou->ignoreUserAbort();
498 
499  return $sou->handleECSTasks($sid);
500  }
501 
502  public static function saveQuestionResult($sid,$user_id,$test_id,$question_id,$pass,$solution)
503  {
504  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
505 
506  $sass =& new ilSoapTestAdministration();
507 
508  return $sass->saveQuestionResult($sid,$user_id,$test_id,$question_id,$pass,$solution);
509  }
510 
511  public static function saveQuestion($sid,$active_id,$question_id,$pass,$solution)
512  {
513  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
514 
515  $sass =& new ilSoapTestAdministration();
516 
517  return $sass->saveQuestion($sid,$active_id,$question_id,$pass,$solution);
518  }
519 
520  public static function saveQuestionSolution($sid,$active_id,$question_id,$pass,$solution)
521  {
522  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
523 
524  $sass =& new ilSoapTestAdministration();
525 
526  return $sass->saveQuestionSolution($sid,$active_id,$question_id,$pass,$solution);
527  }
528 
529  public static function getQuestionSolution($sid,$active_id,$question_id,$pass)
530  {
531  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
532 
533  $sass =& new ilSoapTestAdministration();
534 
535  return $sass->getQuestionSolution($sid,$active_id,$question_id,$pass);
536  }
537 
538  public static function getTestUserData($sid,$active_id)
539  {
540  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
541 
542  $sass =& new ilSoapTestAdministration();
543 
544  return $sass->getTestUserData($sid,$active_id);
545  }
546 
547  public static function getNrOfQuestionsInPass($sid, $active_id, $pass)
548  {
549  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
550 
551  $sass =& new ilSoapTestAdministration();
552 
553  return $sass->getNrOfQuestionsInPass($sid, $active_id, $pass);
554  }
555 
556  public static function getPositionOfQuestion($sid, $active_id, $question_id, $pass)
557  {
558  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
559 
560  $sass =& new ilSoapTestAdministration();
561 
562  return $sass->getPositionOfQuestion($sid, $active_id, $question_id, $pass);
563  }
564 
565  public static function getPreviousReachedPoints($sid, $active_id, $question_id, $pass)
566  {
567  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
568 
569  $sass =& new ilSoapTestAdministration();
570 
571  return $sass->getPreviousReachedPoints($sid, $active_id, $question_id, $pass);
572  }
573 
574  public static function saveTempFileAsMediaObject($sid,$name,$tmp_name)
575  {
576  include_once './webservice/soap/classes/class.ilSoapUtils.php';
577 
578  $sou =& new ilSoapUtils();
579  $sou->disableSOAPCheck();
580 
581  return $sou->saveTempFileAsMediaObject($sid, $name, $tmp_name);
582  }
583 
584  public static function getMobsOfObject($sid, $a_type, $a_id)
585  {
586  include_once './webservice/soap/classes/class.ilSoapUtils.php';
587 
588  $sou =& new ilSoapUtils();
589  $sou->disableSOAPCheck();
590 
591  return $sou->getMobsOfObject($sid, $a_type, $a_id);
592  }
593 
594  public static function getStructureObjects ($sid, $ref_id) {
595  include_once './webservice/soap/classes/class.ilSoapStructureObjectAdministration.php';
596 
598 
599  return $sca->getStructureObjects ($sid, $ref_id);
600  }
601 
602  public static function getRoles($sid, $role_type, $id)
603  {
604  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
605 
606  $soa =& new ilSoapRBACAdministration();
607 
608  return $soa->getRoles($sid, $role_type, $id);
609  }
610 
611  public static function importUsers ($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail)
612  {
613  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
614 
615  $sua =& new ilSoapUserAdministration();
616 
617  return $sua->importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail);
618  }
619 
620  public static function getUsersForContainer ($sid, $ref_id, $attach_roles, $active)
621  {
622  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
623 
624  $sua =& new ilSoapUserAdministration();
625 
626  return $sua->getUsersForContainer($sid, $ref_id, $attach_roles, $active);
627  }
628 
629  public static function getUsersForRole ($sid, $role_id, $attach_roles, $active)
630  {
631  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
632 
633  $sua =& new ilSoapUserAdministration();
634 
635  return $sua->getUserForRole($sid, $role_id, $attach_roles, $active);
636  }
637 
638 
639  public static function searchUser ($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active) {
640  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
641 
642  $sua =& new ilSoapUserAdministration();
643 
644  return $sua->searchUser ($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active);
645 
646  }
647 
648  public static function hasNewMail($sid)
649  {
650  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
651 
652  $sua =& new ilSoapUserAdministration();
653 
654  return $sua->hasNewMail($sid);
655  }
656 
657  public static function getNIC($sid) {
658  include_once './webservice/soap/classes/class.ilSoapAdministration.php';
659  $soa = & new ilSoapAdministration();
660  return $soa->getNIC($sid);
661  }
662 
663  public static function getExerciseXML ($sid, $ref_id, $attachFileContentsMode) {
664  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
665  $sta = & new ilSoapExerciseAdministration();
666  return $sta->getExerciseXML($sid, $ref_id, $attachFileContentsMode);
667 
668  }
669 
670 
671  public static function updateExercise ($sid, $ref_id, $xml) {
672  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
673  $sta = & new ilSoapExerciseAdministration();
674  return $sta->updateExercise($sid, $ref_id, $xml);
675 
676  }
677 
678  public static function addExercise ($sid, $ref_id, $xml) {
679  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
680  $sta = & new ilSoapExerciseAdministration();
681  return $sta->addExercise($sid, $ref_id, $xml);
682 
683  }
684 
685  public static function getFileXML ($sid, $ref_id, $attachFileContentsMode)
686  {
687  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
688  $sta = & new ilSoapFileAdministration();
689  return $sta->getFileXML($sid, $ref_id, $attachFileContentsMode);
690 
691  }
692 
693 
694  public static function updateFile ($sid, $ref_id, $xml)
695  {
696  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
697  $sta = & new ilSoapFileAdministration();
698  return $sta->updateFile($sid, $ref_id, $xml);
699 
700  }
701 
702  public static function addFile ($sid, $ref_id, $xml)
703  {
704  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
705  $sta = & new ilSoapFileAdministration();
706  return $sta->addFile($sid, $ref_id, $xml);
707 
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  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
739 
740  $sua =& new ilSoapSCORMAdministration();
741 
742  return $sua->getIMSManifestXML($sid,$ref_id);
743  }
744 
745  public static function hasSCORMCertificate($sid, $ref_id, $usr_id) {
746  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
747 
748  $sua =& new ilSoapSCORMAdministration();
749 
750  return $sua->hasSCORMCertificate($sid,$ref_id,$usr_id);
751  }
752 
758  public static function copyObject($sid, $copy_settings_xml) {
759  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
760 
761  $soa =& new ilSoapObjectAdministration();
762 
763  return $soa->copyObject($sid, $copy_settings_xml);
764 
765  }
766 
773  public static function moveObject($sid, $ref_id, $target_id)
774  {
775  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
776 
777  $soa = new ilSoapObjectAdministration();
778 
779  return $soa->moveObject($sid, $ref_id, $target_id);
780  }
781 
782 
793  public static function getTestResults ($sid, $ref_id,$sum_only) {
794  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
795 
796  $soa = new ilSoapTestAdministration();
797 
798  return $soa->getTestResults($sid, $ref_id,$sum_only);
799 
800  }
801 
811  public static function getTestIdByObjId ($sid, $test_obj_id)
812  {
813  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
814 
815  $soa = new ilSoapTestAdministration();
816 
817  return $soa->getTestIdByObjId ($sid, $test_obj_id);
818  }
819 
830  public static function getTestRunDates ($sid, $obj_id)
831  {
832  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
833 
834  $soa = new ilSoapTestAdministration();
835 
836  return $soa->getTestRunDates ($sid, $obj_id);
837  }
838 
850  public static function packageTestRun ($sid, $obj_id, $date)
851  {
852  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
853 
854  $soa = new ilSoapTestAdministration();
855 
856  return $soa->packageTestRun($sid, $obj_id, $date);
857  }
858 
869  public static function getTestRunPackageDates ($sid, $obj_id)
870  {
871  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
872 
873  $soa = new ilSoapTestAdministration();
874 
875  return $soa->getTestRunPackageDates ($sid, $obj_id);
876  }
877 
882  public static function fetchTestRunPackage ($sid, $obj_id, $date)
883  {
884  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
885 
886  $soa = new ilSoapTestAdministration();
887 
888  return $soa->fetchTestRunPackage ($sid, $obj_id, $date);
889  }
890 
891  // TODO document
892 
893  public static function deleteTestRunPackage ($sid, $obj_id, $date)
894  {
895  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
896 
897  $soa = new ilSoapTestAdministration();
898 
899  return $soa->deleteTestRunPackage($sid, $obj_id, $date);
900  }
901 
902 
903  // TODO document
904 
905  public static function obliterateTestRun ($sid, $obj_id, $date)
906  {
907  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
908 
909  $soa = new ilSoapTestAdministration();
910 
911  return $soa->obliterateTestRun($sid, $obj_id, $date);
912  }
913 
921  public static function getCoursesForUser($sid, $parameters) {
922  include_once 'webservice/soap/classes/class.ilSoapCourseAdministration.php';
923  $soc = new ilSoapCourseAdministration();
924  return $soc->getCoursesForUser($sid, $parameters);
925  }
926 
934  public static function getGroupsForUser($sid, $parameters) {
935  include_once 'webservice/soap/classes/class.ilSoapGroupAdministration.php';
936  $soc = new ilSoapGroupAdministration();
937  return $soc->getGroupsForUser($sid, $parameters);
938  }
939 
940  public static function getPathForRefId($sid, $ref_id) {
941  include_once 'webservice/soap/classes/class.ilSoapObjectAdministration.php';
942  $soa = new ilSoapObjectAdministration();
943  return $soa->getPathForRefId($sid, $ref_id);
944  }
945 
946  public static function searchRoles ($sid, $key, $combination, $role_type)
947  {
948  include_once 'webservice/soap/classes/class.ilSoapRBACAdministration.php';
949  $roa = new ilSoapRBACAdministration();
950  return $roa->searchRoles($sid, $key, $combination, $role_type);
951  }
952 
953 
954  public static function getInstallationInfoXML() {
955  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
956  $roa = new ilSoapAdministration();
957  return $roa->getInstallationInfoXML();
958  }
959 
960  public static function getClientInfoXML($clientid) {
961  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
962  $roa = new ilSoapAdministration();
963  return $roa->getClientInfoXML($clientid);
964  }
965 
971  public static function buildHTTPPath() {
972  if($_SERVER["HTTPS"] == "on")
973  {
974  $protocol = 'https://';
975  }
976  else
977  {
978  $protocol = 'http://';
979  }
980  $host = $_SERVER['HTTP_HOST'];
981 
982  $path = dirname($_SERVER['REQUEST_URI']);
983 
984  //dirname cuts the last directory from a directory path e.g content/classes return content
985  include_once 'Services/Utilities/classes/class.ilUtil.php';
987 
988  $dirs = explode('/',$module);
989  $uri = $path;
990  foreach($dirs as $dir)
991  {
992  $uri = dirname($uri);
993  }
994  return ilUtil::removeTrailingPathSeparators($protocol.$host.$uri);
995  }
996 
997  public static function getSCORMCompletionStatus($sid, $usr_id, $a_ref_id)
998  {
999  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
1000 
1001  $sua =& new ilSoapSCORMAdministration();
1002 
1003  return $sua->getSCORMCompletionStatus($sid, $usr_id, $a_ref_id);
1004  }
1005 
1006  public static function getUserIdBySid($sid)
1007  {
1008  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
1009 
1010  $sua = new ilSoapUserAdministration();
1011 
1012  return $sua->getUserIdBySid($sid);
1013  }
1014 
1015  public static function readWebLink($sid,$ref_id)
1016  {
1017  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
1018 
1019  $swa = new ilSoapWebLinkAdministration();
1020  return $swa->readWebLink($sid, $ref_id);
1021  }
1022 
1023  public static function createWebLink($sid,$ref_id,$xml)
1024  {
1025  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
1026 
1027  $swa = new ilSoapWebLinkAdministration();
1028  return $swa->createWebLink($sid, $ref_id,$xml);
1029  }
1030 
1031  public static function updateWebLink($sid,$ref_id,$xml)
1032  {
1033  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
1034 
1035  $swa = new ilSoapWebLinkAdministration();
1036  return $swa->updateWebLink($sid, $ref_id,$xml);
1037  }
1038 
1052  public static function deleteExpiredDualOptInUserObjects($sid, $usr_id)
1053  {
1054  include_once './webservice/soap/classes/class.ilSoapUtils.php';
1055 
1056  $sou = new ilSoapUtils();
1057  $sou->disableSOAPCheck();
1058  $sou->ignoreUserAbort();
1059 
1060  return $sou->deleteExpiredDualOptInUserObjects($sid, $usr_id);
1061  }
1062 }
1063 
1064 /* function ilClone($sid,$copy_identifier)
1065  {
1066  return ilSoapFunctions::ilClone($sid,$copy_identifier);
1067  }
1068 
1069  function ilCloneDependencies($sid,$copy_identifier)
1070  {
1071  return ilSoapFunctions::ilCloneDependencies($sid,$copy_identifier);
1072  }*/
1073 
1074  ?>