learndash/delete-quiz permanently deletes or trashes a quiz.
The ProQuiz half survives, which is unusual among deletions and worth knowing.
Before you run it
The quiz’s questions and any recorded attempts are not deleted by this — LearnDash stores them against the linked ProQuiz record, which survives. The quiz is removed from every course outline that contained it, and the response lists which. Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.
At a glance
| Ability | learndash/delete-quiz |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Lessons, Topics & Quizzes |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Destructive — requires confirm_title. Questions and recorded attempts are not deleted. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
A quiz is a post plus a ProQuiz record. Deleting the post leaves the ProQuiz record, its questions and every recorded attempt in place.
That is not obviously right or wrong. The attempt history is real assessment data and destroying it silently would be worse; leaving it means the site accumulates orphaned ProQuiz records that nothing points at.
Either way it is worth knowing, because “I deleted the quiz” does not mean the learner attempt records are gone — they are still in the statistics tables.
The quiz is removed from every course outline that contained it, which on a shared assessment is more courses than the caller was thinking about.
Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
quiz_id | integer | Yes | The quiz. |
confirm_title | string | Yes | Must exactly match the current title on the live record. |
force | boolean | No | True deletes permanently; false trashes. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
quiz_id | integer | The quiz. |
affected_courses | array | Every course outline it was removed from. |
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:
Delete that quiz.
It resolves to one call:
{
"ability": "learndash/delete-quiz",
"parameters": {
"quiz_id": 640,
"confirm_title": "Final assessment"
}
}Worth knowing
- Questions and attempt records survive against the ProQuiz record.
- Deleting the quiz does not remove learner assessment history.
- Removed from every course it was in.
- Trashing is reversible.
Related abilities
- LearnDash List Quiz Attempts — the records that survive
- LearnDash Detach Step — remove it from one course only
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category