cm_soap_forum.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.webservices
  5. */
  6. require_once __DIR__.'/cm_webservice_forum.php';
  7. require_once __DIR__.'/cm_soap.php';
  8. /**
  9. * Configures the WSCourse SOAP service
  10. */
  11. $s = WSCMSoapServer::singleton();
  12. $s->register(
  13. 'WSCMForum.get_foruns_id',
  14. array(
  15. 'username' => 'xsd:string',
  16. 'password' => 'xsd:string',
  17. 'course_code' => 'xsd:string',
  18. ),
  19. array('return' => 'xsd:string'),
  20. 'urn:WSCMService',
  21. '',
  22. '',
  23. '',
  24. 'Retorna o ID dos foruns de uma disciplina.'
  25. );
  26. $s->register(
  27. 'WSCMForum.get_forum_title',
  28. array(
  29. 'username' => 'xsd:string',
  30. 'password' => 'xsd:string',
  31. 'course_code' => 'xsd:string',
  32. 'forum_id' => 'xsd:string',
  33. ),
  34. array('return' => 'xsd:string'),
  35. 'urn:WSCMService',
  36. '',
  37. '',
  38. '',
  39. 'Retorna o valor do titulo de um forum_id.'
  40. );
  41. $s->register(
  42. 'WSCMForum.get_forum_threads_id',
  43. array(
  44. 'username' => 'xsd:string',
  45. 'password' => 'xsd:string',
  46. 'course_code' => 'xsd:string',
  47. 'forum_id' => 'xsd:string',
  48. ),
  49. array('return' => 'xsd:string'),
  50. 'urn:WSCMService',
  51. '',
  52. '',
  53. '',
  54. 'Retorna o ID das threads de um forum_id.'
  55. );
  56. $s->register(
  57. 'WSCMForum.get_forum_thread_data',
  58. array(
  59. 'username' => 'xsd:string',
  60. 'password' => 'xsd:string',
  61. 'course_code' => 'xsd:string',
  62. 'thread_id' => 'xsd:string',
  63. 'field' => 'xsd:string',
  64. ),
  65. array('return' => 'xsd:string'),
  66. 'urn:WSCMService',
  67. '',
  68. '',
  69. '',
  70. 'Retorna o campo field de um thread_id. Campos possiveis: title, date, sender, sender_name.'
  71. );
  72. $s->register(
  73. 'WSCMForum.get_forum_thread_title',
  74. array(
  75. 'username' => 'xsd:string',
  76. 'password' => 'xsd:string',
  77. 'course_code' => 'xsd:string',
  78. 'thread_id' => 'xsd:string',
  79. ),
  80. array('return' => 'xsd:string'),
  81. 'urn:WSCMService',
  82. '',
  83. '',
  84. '',
  85. 'Retorna o campo title de uma thread_id.'
  86. );
  87. $s->register(
  88. 'WSCMForum.get_posts_id',
  89. array(
  90. 'username' => 'xsd:string',
  91. 'password' => 'xsd:string',
  92. 'course_code' => 'xsd:string',
  93. 'thread_id' => 'xsd:string',
  94. ),
  95. array('return' => 'xsd:string'),
  96. 'urn:WSCMService',
  97. '',
  98. '',
  99. '',
  100. 'Retorna o ID dos posts de uma thread.'
  101. );
  102. $s->register(
  103. 'WSCMForum.get_post_data',
  104. array(
  105. 'username' => 'xsd:string',
  106. 'password' => 'xsd:string',
  107. 'course_code' => 'xsd:string',
  108. 'post_id' => 'xsd:string',
  109. 'field' => 'xsd:string',
  110. ),
  111. array('return' => 'xsd:string'),
  112. 'urn:WSCMService',
  113. '',
  114. '',
  115. '',
  116. 'Retorna o campo field de um post_id. Campos possiveis: title, text, date, sender ou sender_name.'
  117. );
  118. $s->register(
  119. 'WSCMForum.send_post',
  120. array(
  121. 'username' => 'xsd:string',
  122. 'password' => 'xsd:string',
  123. 'course_code' => 'xsd:string',
  124. 'forum_id' => 'xsd:string',
  125. 'thread_id' => 'xsd:string',
  126. 'title' => 'xsd:string',
  127. 'content' => 'xsd:string',
  128. ),
  129. array('return' => 'xsd:string'),
  130. 'urn:WSCMService',
  131. '',
  132. '',
  133. '',
  134. 'Envia um novo post ao forum_id.'
  135. );