Student unable to list their own courses!

Student unable to list their own courses!

by Petar Nikolovski -
Number of replies: 0

Hi, I've set a "student" role for a user, and enrolled them in the course. The user is able to successfully obtain token, however when trying to fetch courses using "core_enrol_get_users_courses" the following exception is raised:


{'exception': 'webservice_access_exception', 'errorcode': 'accessexception', 'message': 'Access control exception'}


I've looked into source code (https://github.com/moodle/moodle/blob/MOODLE_34_STABLE/lib/db/services.php#L548-L555), and the privilege that is required for this role is already selected in my role. Why is student still unable to fetch the list of courses they are enrolled in? Do I have to change Student role to be system wide?

Average of ratings: -