Pankaj
Pankaj

Reputation: 1271

Moodle REST API to get all the course list and users enrolled for that particular courses

There is any Moodle REST API available to get all the course name list and all the users enrolled for that particular courses.

Someone suggest the answer using SQl query. But I need any Moodle API available for that.

API is available for get all the users enrolled for single course by passing courseId in core_enrolled_get_enrolled_users . But I have to display all the courses and number of users enrolled for that course in charts . Please find below the sample charts :

enter image description here

Upvotes: 2

Views: 6412

Answers (1)

Evgeniy Voevodin
Evgeniy Voevodin

Reputation: 241

You may first get courses through core_course_get_courses and then iterate resulting array and apply core_enrolled_get_enrolled_users to each course id.

Upvotes: 2

Related Questions