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

Start free trial

LearnDash List Course Users

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

Abilitylearndash/list-course-users
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

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

NameTypeRequiredWhat it is
course_idintegerYesThe course.
include_adminsbooleanNo — defaults to falseInclude administrators, who can open everything.
per_pageintegerNoRows per page.

What comes back

NameTypeWhat it is
usersarrayEach learner with their enrolment date and course status.
totalintegerHow many.
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:

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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading