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

Start free trial

LearnDash Mark Step Complete

learndash/mark-step-complete marks one lesson, topic or quiz complete for a learner.

Every requirement LearnDash normally enforces still applies.

At a glance

Abilitylearndash/mark-step-complete
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Progress
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

The refusal is the useful part

Prerequisites, required quizzes, assignment approval and video progression are all still checked. If the step is not legitimately completable yet, this reports completed=false with the reason rather than silently doing nothing.

That reason is usually worth knowing. A learner blocked on assignment approval needs somebody to approve an assignment, not a completion record — and marking it complete anyway leaves the assignment unapproved and the record inconsistent.

dry_run=true recomputes progress and reports the outcome without writing, which is how you check a bulk operation before running it.

learndash/force-complete-step overrides the rules, and it is deliberately a separate ability with its own confirmation — because a completion the learner did not earn is a different kind of record.

Try this first. The reason it gives is the information that decides whether overriding is appropriate.

Idempotent.

Input

NameTypeRequiredWhat it is
learnerstring | integerYesUser ID, login or email.
step_idintegerYesThe lesson, topic or quiz.
course_idintegerYesThe course the step belongs to.
dry_runbooleanNoReport the outcome without writing anything.

What comes back

NameTypeWhat it is
completedbooleanWhether the step was marked complete.
blocked_bystringThe requirement preventing it, when one is.
progressobjectThe learner’s recomputed course progress.
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:

Mark that lesson complete for this learner.

It resolves to one call:

{
  "ability": "learndash/mark-step-complete",
  "parameters": {
    "learner": "sam@example.com",
    "step_id": 520,
    "course_id": 412
  }
}

Worth knowing

  • Requirements are enforced. A refusal names what is blocking.
  • dry_run checks a bulk operation before running it.
  • The blocker is usually the thing that actually needs fixing.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading