Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moodle API - get all completions per course

I have an external app that needs to know which users have completed a course in Moodle via the API. That is to say, it will want to know who completed course 123, and be given back a list. So far, the only way I've found to do this is "core_enrol_get_enrolled_users" to get the enrolled users, then iterating over that and hitting "core_completion_get_course_completion_status" for each enrolled user. Performance is obviously terrible as you end up with a round trip per user.

Is there any way I can get Moodle to give me all the completions for a course in just one request?

like image 573
Chief B Avatar asked Nov 30 '25 19:11

Chief B


1 Answers

Currently the only way is to implement said web service by yourself, since the five completion-related functions currently implemented do not suffice your request.

enter image description here

like image 78
Evgeniy Voevodin Avatar answered Dec 02 '25 07:12

Evgeniy Voevodin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!