|
|
|
@ -1,15 +1,14 @@ |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
require_once(dirname(__FILE__).'/../inc/global.inc.php'); |
|
|
|
|
require_once(dirname(__FILE__).'/../forum/forumconfig.inc.php'); |
|
|
|
|
require_once(dirname(__FILE__).'/../forum/forumfunction.inc.php'); |
|
|
|
|
require_once dirname(__FILE__).'/../inc/global.inc.php'; |
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'forum/forumconfig.inc.php'; |
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
|
|
|
|
|
|
|
|
$libpath = api_get_path(LIBRARY_PATH); |
|
|
|
|
|
|
|
|
|
require_once $libpath.'usermanager.lib.php'; |
|
|
|
|
require_once $libpath.'course.lib.php'; |
|
|
|
|
require_once(dirname(__FILE__).'/cm_webservice.php'); |
|
|
|
|
|
|
|
|
|
require_once dirname(__FILE__).'/cm_webservice.php'; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Description of cm_soap_inbox |
|
|
|
@ -21,7 +20,7 @@ class WSCMForum extends WSCM { |
|
|
|
|
public function get_foruns_id($username, $password, $course_code) |
|
|
|
|
{ |
|
|
|
|
if($this->verifyUserPass($username, $password) == "valid") |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
$course_db = CourseManager::get_course_information($course_code); |
|
|
|
|
$foruns_info = get_forums($id='', $course_db['db_name']); |
|
|
|
|
$foruns_id = '#'; |
|
|
|
@ -36,9 +35,9 @@ class WSCMForum extends WSCM { |
|
|
|
|
} else |
|
|
|
|
return get_lang('InvalidId'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function get_forum_title($username, $password, $course_code, $forum_id) |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
if($this->verifyUserPass($username, $password) == "valid") |
|
|
|
|
{ |
|
|
|
|
$course_db = CourseManager::get_course_information($course_code); |
|
|
|
@ -58,10 +57,10 @@ class WSCMForum extends WSCM { |
|
|
|
|
} else |
|
|
|
|
return get_lang('InvalidId'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function get_forum_threads_id($username, $password, $course_code, $forum_id) |
|
|
|
|
{ |
|
|
|
|
if($this->verifyUserPass($username, $password) == "valid") { |
|
|
|
|
if($this->verifyUserPass($username, $password) == "valid") { |
|
|
|
|
$threads_info = get_threads($forum_id, $course_code); |
|
|
|
|
$threads_id = '#'; |
|
|
|
|
foreach ($threads_info as $thread) |
|
|
|
@ -263,7 +262,7 @@ class WSCMForum extends WSCM { |
|
|
|
|
'".Database::escape_string(isset($my_post)?$my_post:null)."', |
|
|
|
|
'".Database::escape_string($visible)."')"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result=Database::query($sql); |
|
|
|
|
return "Post enviado!"; |
|
|
|
|
//return $sql; |
|
|
|
|