learndash/get-question fetches a single question: its post fields, its LearnDash settings, the quiz it belongs to, and its answers.
The answers are fetched separately, because they are not on the post.
At a glance
| Ability | learndash/get-question |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Questions |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Answers are stored against the linked ProQuiz record rather than as post meta. So a read of the question post returns a question with no answers, which looks like an incomplete question and is not.
This fetches both halves and returns the answers under answers, along with the answer type and the points.
If linked comes back false the ProQuiz record is missing entirely. The question cannot be answered by a learner regardless of how complete the post looks — it has a title, a type and points, and no answers to choose from.
That is worth checking before assuming a quiz is finished.
The answer type decides how scoring works: single choice, multiple choice, free text and the rest all behave differently, and the correct flags mean different things across them.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
question_id | integer | Yes | The question post ID. |
What comes back
| Name | Type | What it is |
|---|---|---|
question | object | Post fields, settings and the quiz it belongs to. |
answers | array | The answers, from the ProQuiz record. |
linked | boolean | Whether the ProQuiz record exists at all. |
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:
Show me this question and its answers.
It resolves to one call:
{
"ability": "learndash/get-question",
"parameters": {
"question_id": 660
}
}Worth knowing
- Answers come from the ProQuiz record, not from post meta.
linked=falsemeans the question cannot be answered, however complete it looks.- The answer type changes what the correct flags mean.
- Read-only.
Related abilities
- LearnDash Manage Question — change it
- LearnDash List Questions — the whole quiz
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category