Closed maryamMOMENII closed 3 years ago
You have an extra array that should not be there. I made a test right now. This is the correct syntax for this webservice function:
$MoodleRest->request('core_course_get_courses_by_field', array('field'=>'idnumber','value'=>'111111111'));
One detail: If your request is a GET, you don't need to explicit it.
Closing this issue, assuming @maryamMOMENII already fixed the syntax and moved on.
hi i want to use this function core_course_get_courses_by_field and send request with examlpe2 in this package doc. $MoodleRest->request('core_course_get_courses_by_field', array( array('field'=>'idnumber','value'=>'111111111')), \MoodleRest::METHOD_GET);
and then get error invalid argument. everyone can help me ... Thank you in advance