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
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