lmsace / lmsace-connect-lms

Moodle plugin to create Access token and basic setup for Moodle + WooCommerce integration.
2 stars 2 forks source link

More then 700 moodle courses #2

Open insiFra opened 8 months ago

insiFra commented 8 months ago

On the moodle I have more than 1000 courses. When I go to associate the moodle course with the product in Woocommerce, no records are returned to me. I found that the moodle API is called core_course_get_courses_by_field but I can't find where and how to add a condition perhaps filtering the category or even the course IDs. Can you help me?

image

MauricioTRP commented 7 months ago

Hi, I've realized that, if the server is running php8.2 or later, it doen't retrieve courses information.

You can try a POST method with postman, to see if you're getting the correct information.

the route is

moodle_domain/webservice/rest/server.php?wstoken={{your_token}}&moodlewsrestformat=json&wsfunction=get_courses

Here's a sample of a server with php8.2 image

And another example with php8.1 image

Hope it can lead to a solution