diff --git a/admin/registration/index.php b/admin/registration/index.php index 763ce4a7318..7578642c220 100644 --- a/admin/registration/index.php +++ b/admin/registration/index.php @@ -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 { diff --git a/admin/registration/lib.php b/admin/registration/lib.php index 401228d9151..b1340388490 100644 --- a/admin/registration/lib.php +++ b/admin/registration/lib.php @@ -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 { diff --git a/admin/registration/register.php b/admin/registration/register.php index 798e58874aa..210cdf8e906 100644 --- a/admin/registration/register.php +++ b/admin/registration/register.php @@ -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); diff --git a/course/publish/forms.php b/course/publish/forms.php index f7a235782a9..35b8f3fb528 100644 --- a/course/publish/forms.php +++ b/course/publish/forms.php @@ -119,7 +119,8 @@ class course_publication_form extends moodleform { $options = new stdClass(); $options->ids = array($publication->hubcourseid); $options->allsitecourses = 1; - $params = array('', $share, !$share, $options); + $params = array('search' => '', 'downloadable' => $share, + 'enrollable' => !$share, 'options' => $options); $serverurl = $huburl . "/local/hub/webservice/webservices.php"; require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php"); $xmlrpcclient = new webservice_xmlrpc_client($serverurl, $registeredhub->token); diff --git a/course/publish/index.php b/course/publish/index.php index ec2785155b0..596a6c9bd92 100644 --- a/course/publish/index.php +++ b/course/publish/index.php @@ -69,7 +69,8 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, } else { //get all site courses registered on this hub $function = 'hub_get_courses'; - $params = array('', 1, 1, array( 'allsitecourses' => 1)); + $params = array('search' => '', 'downloadable' => 1, + 'enrollable' => 1, 'options' => array( 'allsitecourses' => 1)); $serverurl = $hub->huburl."/local/hub/webservice/webservices.php"; require_once($CFG->dirroot."/webservice/xmlrpc/lib.php"); $xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token); @@ -128,7 +129,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, //unpublish the publication by web service $registeredhub = $registrationmanager->get_registeredhub($huburl); $function = 'hub_unregister_courses'; - $params = array(array( $publication->hubcourseid)); + $params = array('courseids' => array( $publication->hubcourseid)); $serverurl = $huburl."/local/hub/webservice/webservices.php"; require_once($CFG->dirroot."/webservice/xmlrpc/lib.php"); $xmlrpcclient = new webservice_xmlrpc_client($serverurl, $registeredhub->token); diff --git a/course/publish/metadata.php b/course/publish/metadata.php index 2478b0ee546..61f37c4dd79 100644 --- a/course/publish/metadata.php +++ b/course/publish/metadata.php @@ -172,7 +172,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, //publish the course information $function = 'hub_register_courses'; - $params = array(array($courseinfo)); + $params = array('courses' => array($courseinfo)); $serverurl = $huburl . "/local/hub/webservice/webservices.php"; require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php"); $xmlrpcclient = new webservice_xmlrpc_client($serverurl, $registeredhub->token);