learndash/list-user-courses lists every course a learner can access, with their status and completion percentage for each.
This is “can access”, not “was enrolled in”.
At a glance
| Ability | learndash/list-user-courses |
| 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
Access to a course can come three ways: direct enrolment, membership of a group that carries the course, or the course being open to everyone. A bare yes-or-no would not tell you which, and changing the wrong one changes nothing.
So a course that is open to everyone appears here for every learner, whether or not anybody enrolled them — which is correct and can be surprising on a site with open courses.
For which of the three applies to one course, learndash/get-access-info is the per-course answer.
The completion percentage makes this a useful progress overview as well as an access list: a learner with nine courses at 4% is a different conversation from one with nine courses at 90%.
The learner can be given as a user ID, login or email.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
learner | string | integer | Yes | User ID, login or email. |
per_page | integer | No | Rows per page. |
What comes back
| Name | Type | What it is |
|---|---|---|
courses | array | Each course with the learner’s status and completion percentage. |
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:
What courses can this learner take?
It resolves to one call:
{
"ability": "learndash/list-user-courses",
"parameters": {
"learner": "sam@example.com"
}
}Worth knowing
- Open courses appear for everybody, enrolled or not.
- Which of the three sources applies is a per-course question.
- Completion percentages make this a progress overview too.
- Read-only.
Related abilities
- LearnDash Get Access Info — which source, for one course
- LearnDash Get User Progress — one course in detail
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category