learndash/list-course-users lists everyone enrolled in a course, including learners whose access comes from a group rather than direct enrolment.
Administrators are excluded by default.
At a glance
| Ability | learndash/list-course-users |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Enrolment & Access |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Administrators can open every course on the site, so including them would add the same handful of people to every course’s enrolment count — which makes small courses look larger and cohort reporting meaningless.
Pass include_admins=true when the full technical answer is what you want.
Including group-derived access is the other deliberate choice. A learner who reaches the course through a group is enrolled in every sense that matters to them, and a listing that showed only direct enrolments would under-report a site that uses groups at all.
Each learner comes back with their enrolment date and course status, which is enough for cohort work without a progress call per person.
learndash/get-user-progress is the detail for one learner, and learndash/course-progress-report is the cohort version with completion figures.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
course_id | integer | Yes | The course. |
include_admins | boolean | No — defaults to false | Include administrators, who can open everything. |
per_page | integer | No | Rows per page. |
What comes back
| Name | Type | What it is |
|---|---|---|
users | array | Each learner with their enrolment date and course status. |
total | integer | How many. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Who is enrolled in this course?
It resolves to one call:
{
"ability": "learndash/list-course-users",
"parameters": {
"course_id": 412
}
}Worth knowing
- Administrators are excluded, because they can open everything.
- Group-derived access counts as enrolment here.
- Enrolment date and status come with each row.
- Read-only.
Related abilities
- LearnDash Course Progress Report — the cohort with progress
- LearnDash Get User Progress — one learner in detail
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category