community hub MDL-22976 make community hub ws call compatible to a futur protocol change

This commit is contained in:
jerome mouneyrac
2010-09-09 02:55:11 +00:00
parent 29750492a2
commit 2a4eec826a
6 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ if (empty($cancel) and $unregistration and $confirm and confirm_sesskey()) {
//unpublish the courses by web service
if (!empty($hubcourseids)) {
$function = 'hub_unregister_courses';
$params = array($hubcourseids);
$params = array('courseids' => $hubcourseids);
$serverurl = $huburl . "/local/hub/webservice/webservices.php";
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token);
try {
+1 -1
View File
@@ -64,7 +64,7 @@ class registration_manager {
foreach ($hubs as $hub) {
//update the registration
$siteinfo = $this->get_site_info($hub->huburl);
$params = array($siteinfo);
$params = array('siteinfo' => $siteinfo);
$serverurl = $hub->huburl . "/local/hub/webservice/webservices.php";
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token);
try {
+1 -1
View File
@@ -111,7 +111,7 @@ if ($update and confirm_sesskey()) {
//update the registration
$function = 'hub_update_site_info';
$siteinfo = $registrationmanager->get_site_info($huburl);
$params = array($siteinfo);
$params = array('siteinfo' => $siteinfo);
$serverurl = $huburl . "/local/hub/webservice/webservices.php";
require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php");
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $registeredhub->token);