hello,
I have moodle 3.2.
I want to write a function that return all the users that has access to specific context.
if the course's enrolments method include self enrolment the function returns all the users that can enrol themselves and if the course's enrolments method include guest access all the users return.
thanks.