Reputation: 1271
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 :
Upvotes: 2
Views: 6412
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