Get User Role In enrolled courses

Get User Role In enrolled courses

von ranu jaiswal -
Anzahl Antworten: 1

I am calling core_enrol_get_users_courses API for getting the courses in which user is enrolled but this API does not return the user role in that course. How can i find out the role of a user in his enrolled courses.

Als Antwort auf ranu jaiswal

Re: Get User Role In enrolled courses

von Sam Chaffee -
Nutzerbild von Core developers
One option would be to make a second API call to core_user_get_course_user_profiles. Look in user/externallib.php for details on parameters and return values.