30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

LearnDash List User Courses

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

Abilitylearndash/list-user-courses
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Enrolment & Access
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
learnerstring | integerYesUser ID, login or email.
per_pageintegerNoRows per page.

What comes back

NameTypeWhat it is
coursesarrayEach course with the learner’s status and completion percentage.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading