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

create USER via REST or XML-RPC fails with "invalidrecord Can not find data record in database table external_functions"

$
0
0
by Bla Blub.  

Hi,

I want to connect an external website with a moodle-system. I've already set up the webService and created a token to get access.

I've followed http://www.rumours.co.nz/manuals/using_moodle_web_services.htm set up but in contrast i wanted to realise the connection via REST as in https://github.com/moodlehq/sample-ws-clients/find/master

My approach is to have a moodle class which will handle the data exchange. In first place i just wanted to try to create some new hard coded Users via the webService but it fails with the Moodle-Response:

"invalidrecord Can not find data record in database table external_functions. "

Which seems to me as if i the call was successfully but moodle has a problem to find the "core_user_create_users" function. I've checked the local moodle Database and in the table external_functions is an entry for "core_user_create_users" so i'm kind of confused where moodle doesn't know what to do.


The Attached files contain my set up...

main.php gets called when a new User is registering to my other WebSite. There I'll create an object of my moodle class and start a request to my local moodle. 

i've checked if my request is reaching the local moodle and indeed it does.. Does anyone know whats going on here, what's that for an error...? Or are there different approaches for my purpose which i could try?

Thanks in advance for any help!


Viewing all articles
Browse latest Browse all 2364


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