ILIAS  release_4-3 Revision
 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->groupExists($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 distributeMails($sid,$mail_xml)
471  {
472  include_once './webservice/soap/classes/class.ilSoapUtils.php';
473 
474  $sou =& new ilSoapUtils();
475  return $sou->distributeMails($sid,$mail_xml);
476 
477  }
478 
479  public static function ilClone($sid,$copy_identifier)
480  {
481  include_once './webservice/soap/classes/class.ilSoapUtils.php';
482 
483  $sou = new ilSoapUtils();
484  $sou->disableSOAPCheck();
485  $sou->ignoreUserAbort();
486 
487  return $sou->ilClone($sid,$copy_identifier);
488  }
489  public static function ilCloneDependencies($sid,$copy_identifier)
490  {
491  include_once './webservice/soap/classes/class.ilSoapUtils.php';
492 
493  $sou = new ilSoapUtils();
494  $sou->disableSOAPCheck();
495  $sou->ignoreUserAbort();
496 
497  return $sou->ilCloneDependencies($sid,$copy_identifier);
498  }
499 
500  public static function handleECSTasks($sid,$a_server_id)
501  {
502  include_once './webservice/soap/classes/class.ilSoapUtils.php';
503 
504  $sou = new ilSoapUtils();
505  $sou->disableSoapCheck();
506  $sou->ignoreUserAbort();
507 
508  return $sou->handleECSTasks($sid,$a_server_id);
509  }
510 
511  public static function saveQuestionResult($sid,$user_id,$test_id,$question_id,$pass,$solution)
512  {
513  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
514 
515  $sass = new ilSoapTestAdministration();
516 
517  return $sass->saveQuestionResult($sid,$user_id,$test_id,$question_id,$pass,$solution);
518  }
519 
520  public static function saveQuestion($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->saveQuestion($sid,$active_id,$question_id,$pass,$solution);
527  }
528 
529  public static function saveQuestionSolution($sid,$active_id,$question_id,$pass,$solution)
530  {
531  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
532 
533  $sass = new ilSoapTestAdministration();
534 
535  return $sass->saveQuestionSolution($sid,$active_id,$question_id,$pass,$solution);
536  }
537 
538  public static function getQuestionSolution($sid,$active_id,$question_id,$pass)
539  {
540  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
541 
542  $sass = new ilSoapTestAdministration();
543 
544  return $sass->getQuestionSolution($sid,$active_id,$question_id,$pass);
545  }
546 
547  public static function getTestUserData($sid,$active_id)
548  {
549  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
550 
551  $sass = new ilSoapTestAdministration();
552 
553  return $sass->getTestUserData($sid,$active_id);
554  }
555 
556  public static function getNrOfQuestionsInPass($sid, $active_id, $pass)
557  {
558  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
559 
560  $sass = new ilSoapTestAdministration();
561 
562  return $sass->getNrOfQuestionsInPass($sid, $active_id, $pass);
563  }
564 
565  public static function getPositionOfQuestion($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->getPositionOfQuestion($sid, $active_id, $question_id, $pass);
572  }
573 
574  public static function getPreviousReachedPoints($sid, $active_id, $question_id, $pass)
575  {
576  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
577 
578  $sass = new ilSoapTestAdministration();
579 
580  return $sass->getPreviousReachedPoints($sid, $active_id, $question_id, $pass);
581  }
582 
583  public static function saveTempFileAsMediaObject($sid,$name,$tmp_name)
584  {
585  include_once './webservice/soap/classes/class.ilSoapUtils.php';
586 
587  $sou = new ilSoapUtils();
588  $sou->disableSOAPCheck();
589 
590  return $sou->saveTempFileAsMediaObject($sid, $name, $tmp_name);
591  }
592 
593  public static function getMobsOfObject($sid, $a_type, $a_id)
594  {
595  include_once './webservice/soap/classes/class.ilSoapUtils.php';
596 
597  $sou = new ilSoapUtils();
598  $sou->disableSOAPCheck();
599 
600  return $sou->getMobsOfObject($sid, $a_type, $a_id);
601  }
602 
603  public static function getStructureObjects ($sid, $ref_id) {
604  include_once './webservice/soap/classes/class.ilSoapStructureObjectAdministration.php';
605 
607 
608  return $sca->getStructureObjects ($sid, $ref_id);
609  }
610 
611  public static function getRoles($sid, $role_type, $id)
612  {
613  include_once './webservice/soap/classes/class.ilSoapRBACAdministration.php';
614 
615  $soa = new ilSoapRBACAdministration();
616 
617  return $soa->getRoles($sid, $role_type, $id);
618  }
619 
620  public static function importUsers ($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail)
621  {
622  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
623 
624  $sua = new ilSoapUserAdministration();
625 
626  return $sua->importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail);
627  }
628 
629  public static function getUsersForContainer ($sid, $ref_id, $attach_roles, $active)
630  {
631  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
632 
633  $sua = new ilSoapUserAdministration();
634 
635  return $sua->getUsersForContainer($sid, $ref_id, $attach_roles, $active);
636  }
637 
638  public static function getUsersForRole ($sid, $role_id, $attach_roles, $active)
639  {
640  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
641 
642  $sua = new ilSoapUserAdministration();
643 
644  return $sua->getUserForRole($sid, $role_id, $attach_roles, $active);
645  }
646 
647 
648  public static function searchUser ($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active) {
649  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
650 
651  $sua = new ilSoapUserAdministration();
652 
653  return $sua->searchUser ($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active);
654 
655  }
656 
657  public static function hasNewMail($sid)
658  {
659  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
660 
661  $sua = new ilSoapUserAdministration();
662 
663  return $sua->hasNewMail($sid);
664  }
665 
666  public static function getNIC($sid) {
667  include_once './webservice/soap/classes/class.ilSoapAdministration.php';
668  $soa = & new ilSoapAdministration();
669  return $soa->getNIC($sid);
670  }
671 
672  public static function getExerciseXML ($sid, $ref_id, $attachFileContentsMode) {
673  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
674  $sta = & new ilSoapExerciseAdministration();
675  return $sta->getExerciseXML($sid, $ref_id, $attachFileContentsMode);
676 
677  }
678 
679 
680  public static function updateExercise ($sid, $ref_id, $xml) {
681  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
682  $sta = & new ilSoapExerciseAdministration();
683  return $sta->updateExercise($sid, $ref_id, $xml);
684 
685  }
686 
687  public static function addExercise ($sid, $ref_id, $xml) {
688  include_once './webservice/soap/classes/class.ilSoapExerciseAdministration.php';
689  $sta = & new ilSoapExerciseAdministration();
690  return $sta->addExercise($sid, $ref_id, $xml);
691 
692  }
693 
694  public static function getFileXML ($sid, $ref_id, $attachFileContentsMode)
695  {
696  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
697  $sta = & new ilSoapFileAdministration();
698  return $sta->getFileXML($sid, $ref_id, $attachFileContentsMode);
699 
700  }
701 
702 
703  public static function updateFile ($sid, $ref_id, $xml)
704  {
705  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
706  $sta = & new ilSoapFileAdministration();
707  return $sta->updateFile($sid, $ref_id, $xml);
708 
709  }
710 
711  public static function addFile ($sid, $ref_id, $xml)
712  {
713  include_once './webservice/soap/classes/class.ilSoapFileAdministration.php';
714  $sta = & new ilSoapFileAdministration();
715  return $sta->addFile($sid, $ref_id, $xml);
716 
717  }
718 
719  public static function getObjIdsByRefIds($sid, $ref_ids)
720  {
721  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
722 
723  $soa = new ilSoapObjectAdministration();
724 
725  return $soa->getObjIdsByRefIds($sid, $ref_ids);
726  }
727 
728  public static function getUserXML($sid,$user_ids, $attach_roles)
729  {
730  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
731 
732  $sua = new ilSoapUserAdministration();
733 
734  return $sua->getUserXML($sid, $user_ids, $attach_roles);
735  }
736 
737  public static function updateGroup($sid, $ref_id, $grp_xml)
738  {
739  include_once './webservice/soap/classes/class.ilSoapGroupAdministration.php';
740 
741  $sua = new ilSoapGroupAdministration();
742 
743  return $sua->updateGroup($sid,$ref_id, $grp_xml);
744  }
745 
746  public static function getIMSManifestXML($sid, $ref_id) {
747  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
748 
749  $sua = new ilSoapSCORMAdministration();
750 
751  return $sua->getIMSManifestXML($sid,$ref_id);
752  }
753 
754  public static function hasSCORMCertificate($sid, $ref_id, $usr_id) {
755  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
756 
757  $sua = new ilSoapSCORMAdministration();
758 
759  return $sua->hasSCORMCertificate($sid,$ref_id,$usr_id);
760  }
761 
767  public static function copyObject($sid, $copy_settings_xml) {
768  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
769 
770  $soa = new ilSoapObjectAdministration();
771 
772  return $soa->copyObject($sid, $copy_settings_xml);
773 
774  }
775 
782  public static function moveObject($sid, $ref_id, $target_id)
783  {
784  include_once './webservice/soap/classes/class.ilSoapObjectAdministration.php';
785 
786  $soa = new ilSoapObjectAdministration();
787 
788  return $soa->moveObject($sid, $ref_id, $target_id);
789  }
790 
791 
802  public static function getTestResults ($sid, $ref_id,$sum_only) {
803  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
804 
805  $soa = new ilSoapTestAdministration();
806 
807  return $soa->getTestResults($sid, $ref_id,$sum_only);
808 
809  }
810 
820  public static function removeTestResults ($sid, $ref_id, $a_user_ids)
821  {
822  include_once './webservice/soap/classes/class.ilSoapTestAdministration.php';
823 
824  $soa = new ilSoapTestAdministration();
825  return $soa->removeTestResults($sid, $ref_id,$a_user_ids);
826  }
827 
835  public static function getCoursesForUser($sid, $parameters) {
836  include_once 'webservice/soap/classes/class.ilSoapCourseAdministration.php';
837  $soc = new ilSoapCourseAdministration();
838  return $soc->getCoursesForUser($sid, $parameters);
839  }
840 
848  public static function getGroupsForUser($sid, $parameters) {
849  include_once 'webservice/soap/classes/class.ilSoapGroupAdministration.php';
850  $soc = new ilSoapGroupAdministration();
851  return $soc->getGroupsForUser($sid, $parameters);
852  }
853 
854  public static function getPathForRefId($sid, $ref_id) {
855  include_once 'webservice/soap/classes/class.ilSoapObjectAdministration.php';
856  $soa = new ilSoapObjectAdministration();
857  return $soa->getPathForRefId($sid, $ref_id);
858  }
859 
860  public static function searchRoles ($sid, $key, $combination, $role_type)
861  {
862  include_once 'webservice/soap/classes/class.ilSoapRBACAdministration.php';
863  $roa = new ilSoapRBACAdministration();
864  return $roa->searchRoles($sid, $key, $combination, $role_type);
865  }
866 
867 
868  public static function getInstallationInfoXML() {
869  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
870  $roa = new ilSoapAdministration();
871  return $roa->getInstallationInfoXML();
872  }
873 
874  public static function getClientInfoXML($clientid) {
875  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
876  $roa = new ilSoapAdministration();
877  return $roa->getClientInfoXML($clientid);
878  }
879 
880  public static function getClientDetailsXML($sid, $clientid) {
881  include_once 'webservice/soap/classes/class.ilSoapAdministration.php';
882  $roa = new ilSoapAdministration();
883  return $roa->getClientDetailsXML($sid, $clientid);
884  }
885 
891  public static function buildHTTPPath() {
892  if($_SERVER["HTTPS"] == "on")
893  {
894  $protocol = 'https://';
895  }
896  else
897  {
898  $protocol = 'http://';
899  }
900  $host = $_SERVER['HTTP_HOST'];
901 
902  $path = dirname($_SERVER['REQUEST_URI']);
903 
904  //dirname cuts the last directory from a directory path e.g content/classes return content
905  include_once 'Services/Utilities/classes/class.ilUtil.php';
907 
908  $dirs = explode('/',$module);
909  $uri = $path;
910  foreach($dirs as $dir)
911  {
912  $uri = dirname($uri);
913  }
914  return ilUtil::removeTrailingPathSeparators($protocol.$host.$uri);
915  }
916 
917  public static function getSCORMCompletionStatus($sid, $usr_id, $a_ref_id)
918  {
919  include_once './webservice/soap/classes/class.ilSoapSCORMAdministration.php';
920 
921  $sua = new ilSoapSCORMAdministration();
922 
923  return $sua->getSCORMCompletionStatus($sid, $usr_id, $a_ref_id);
924  }
925 
926  public static function getUserIdBySid($sid)
927  {
928  include_once './webservice/soap/classes/class.ilSoapUserAdministration.php';
929 
930  $sua = new ilSoapUserAdministration();
931 
932  return $sua->getUserIdBySid($sid);
933  }
934 
935  public static function readWebLink($sid,$ref_id)
936  {
937  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
938 
939  $swa = new ilSoapWebLinkAdministration();
940  return $swa->readWebLink($sid, $ref_id);
941  }
942 
943  public static function createWebLink($sid,$ref_id,$xml)
944  {
945  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
946 
947  $swa = new ilSoapWebLinkAdministration();
948  return $swa->createWebLink($sid, $ref_id,$xml);
949  }
950 
951  public static function updateWebLink($sid,$ref_id,$xml)
952  {
953  include_once './webservice/soap/classes/class.ilSoapWebLinkAdministration.php';
954 
955  $swa = new ilSoapWebLinkAdministration();
956  return $swa->updateWebLink($sid, $ref_id,$xml);
957  }
958 
972  public static function deleteExpiredDualOptInUserObjects($sid, $usr_id)
973  {
974  include_once './webservice/soap/classes/class.ilSoapUtils.php';
975 
976  $sou = new ilSoapUtils();
977  $sou->disableSOAPCheck();
978  $sou->ignoreUserAbort();
979 
980  return $sou->deleteExpiredDualOptInUserObjects($sid, $usr_id);
981  }
982 
983  /*
984  public static function getSkillCompletionDateForTriggerRefId($sid, $usr_id, $a_ref_id)
985  {
986  include_once './webservice/soap/classes/class.ilSoapSkillAdministration.php';
987  $s = new ilSoapSkillAdministration();
988 
989  $res = $s->getCompletionDateForTriggerRefId($sid, $usr_id, $a_ref_id);
990  return $res;
991  }
992 
993  public static function checkSkillUserCertificateForTriggerRefId($sid, $usr_id, $a_ref_id)
994  {
995  include_once './webservice/soap/classes/class.ilSoapSkillAdministration.php';
996 
997  $s = new ilSoapSkillAdministration();
998  return $s->checkUserCertificateForTriggerRefId($sid, $usr_id, $a_ref_id);
999  }
1000 
1001  public static function getSkillTriggerOfAllCertificates($sid, $usr_id)
1002  {
1003  include_once './webservice/soap/classes/class.ilSoapSkillAdministration.php';
1004 
1005  $s = new ilSoapSkillAdministration();
1006  return $s->getTriggerOfAllCertificates($sid, $usr_id);
1007  }
1008  */
1009 
1018  public static function deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter)
1019  {
1020  include_once './webservice/soap/classes/class.ilSoapLearningProgressAdministration.php';
1022  return $sla->deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter);
1023  }
1024 }
1025 
1026 /* function ilClone($sid,$copy_identifier)
1027  {
1028  return ilSoapFunctions::ilClone($sid,$copy_identifier);
1029  }
1030 
1031  function ilCloneDependencies($sid,$copy_identifier)
1032  {
1033  return ilSoapFunctions::ilCloneDependencies($sid,$copy_identifier);
1034  }*/
1035 
1036  ?>