by Carlos Chiarella.
Hi,
We are using Moodle version 383 and we are trying to update the user enrolment date (start and end dates). We are trying to use core_enrol_submit_user_enrolment_form. If I looked in the documentation, it only says:
"Submit form data for enrolment form"
It does not specify which fields to pass. We calling the function like this:
https://lms.rcmstg.com/lms/webservice/rest/server.php?moodlewsrestformat=json&wstoken=rcmtoken&wsfunction=core_enrol_submit_user_enrolment_form&formdata={"ue":"66422","ifilter":"0","status":"0","timestart":"1610480371","timestart":"1642092064"}
But it returns this error:
{"exception":"dml_missing_record_exception","errorcode":"invalidrecord",
"message":"Can't find data record in database table user_enrolments. (SELECT * FROM {user_enrolments} WHERE id IS NULL\n[array (\n)])",
"debuginfo":"SELECT * FROM {user_enrolments} WHERE id IS NULL\n[array (\n)]"}
The "ue" value is correct. What are we doing wrong?
Can somebody please help us? Thanks, Carlos Chiarella