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

Start free trial

LearnDash Query Activity

learndash/query-activity is the general reporting query across LearnDash activity: who started or completed what, and when.

It reads the same data source as LearnDash’s own reporting screens, so the numbers agree with what an administrator sees.

At a glance

Abilitylearndash/query-activity
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Reporting
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Pro 0.9.16 and later

How it works

That agreement matters more than it sounds. A report computed a different way produces numbers that are defensible and do not match the admin screen, and reconciling the two is work nobody wants.

Filter by courses, users, groups, step type — course, lesson, topic, quiz or access — and completion status, and narrow by date range.

The step type filter is what makes this more than a completion report. access records enrolment events rather than progress, so “who gained access in March” is the same query with a different type.

Users can be given as IDs, logins or emails, which matters when the list came from somewhere other than the site.

For one learner in one course, learndash/get-user-progress is more direct and returns the per-step breakdown this does not.

Input

NameTypeRequiredWhat it is
coursesarrayNoCourse IDs to include.
usersarrayNoUser IDs, logins or emails.
groupsarrayNoGroup IDs to include.
step_typestringNocourse, lesson, topic, quiz or access.
statusstringNoCompletion status.
fromstringNoStart of the date range.
tostringNoEnd of the date range.

What comes back

NameTypeWhat it is
activityarrayMatching activity records.
totalintegerHow many matched.
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 completed anything last month?

It resolves to one call:

{
  "ability": "learndash/query-activity",
  "parameters": {
    "step_type": "course",
    "status": "completed",
    "from": "2026-08-01",
    "to": "2026-08-31"
  }
}

Worth knowing

  • Same data source as LearnDash’s own reporting, so the numbers reconcile.
  • access records enrolment events rather than progress.
  • Users can be addressed by email.
  • For one learner in one course, the progress read is more direct.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading