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

Moodle API - get all completions per course - core_completion_get_activities_completion_status

$
0
0
by Ahsan Tejani.  

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. 

Through core_completion_get_activities_completion_status, we need to give userid to fetch data. Can its possible to get all enrolled users completion data at once. 

What to change for this, to get all user data.

userid (Required)
        User ID

General structure
int //User ID
As per 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?


Viewing all articles
Browse latest Browse all 2362

Trending Articles



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