Get all users in a course with only courseid as param

Get all users in a course with only courseid as param

by David Lanier -
Number of replies: 1

Is there function to get all users in a course by simply passing a course id?

I am trying to create a web service function that takes courseid as a required param, with userid and gradeformat as optional params.

Also is mdl_course_completions only populated if course completion was setup by the instructor?

Thanks

Average of ratings: -
In reply to David Lanier

Re: Get all users in a course with only courseid as param

by David Lanier -

Never mind. I think I found what I am looking for. There is a function in /enrol/externallib.php called get_enrolled_users that takes courseid as the only required param, but I need to call it locally rather than externally.