Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Re: Some help with XML-RPC call

$
0
0
by Michael Simpson.  

My new issue is ofc the classic - how on earth do I structure the enrol request to enrol a user?

The following xml-rpc request works:

    user_criteria ={'key': 'username', 'value': '<username>'}
   

    user_info = proxy.core_user_get_users([user_criteria])

However the following returns "invalid parameter" fault:
enrolment = {
            "roleid": 5,
            "userid": 1301483,
            "courseid": 474,
            "timestart": 1705659088,
            "timeend": 1706569201,
            "suspend": 0
        }

enrolment_result = proxy.enrol_manual_enrol_users([enrolment])

The same parameter values (and similar structure) work on RESTful calls without issue, but for now I'm specifically trying to make the xml-rpc call. (Short story is edwiser bridge is not synchronising courses enrolled via REST API call - I suspect due to their own "filter" function checking the global $_POST variable - I basically want to test the xml-rpc call which shouldnt be using $_POST



Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>