aceofspadesomelette1 downloadsTurn quaestio code blocks into interactive multiple-choice questions in Reading view, with answers saved in the note.
Turn quaestio code blocks into interactive multiple-choice questions in Obsidian Reading view (and Live Preview). Selections are saved as [x] markers; Check is saved as answer-checked: true|false; Show/Hide answer is saved as answer-revealed: true|false.
.obsidian/plugins/ directory (folder name: quaestio).npm install and npm run build inside the plugin folder.All structure is driven by flags (flag names are never shown in Reading view). Option lines use [ ] / [x]. Flag values support plain text or markdown.
```quaestio
number-of-correct-answers: 1
correct-index: [2]
question-title: Question 1
question-stem: What is 1 + 1?
[ ] A. 1
[ ] B. 2
[ ] C. 3
[ ] D. 4
correct-answer: B. 2
explanation: 1 plus 1 is equal to 2.
```
| Flag | Required | Meaning |
|---|---|---|
number-of-correct-answers: N |
yes | 1 = single-select; N > 1 = multi-select |
correct-index: [...] |
yes | 1-based indexes of correct options (e.g. [2] or [2, 4]) |
question-title: |
yes | Title shown at the top |
question-stem: |
yes | Question body |
correct-answer: |
no | Body under the UI label Correct Answer: |
explanation: |
no | Body under the UI label Explanation: |
answer-revealed: true|false |
no | Whether the answer panel is open (false / omitted = hidden) |
answer-checked: true|false |
no | Whether Check has been applied (false / omitted = not graded). Restores the Correct / Incorrect / Unanswered banner |
Machine flags and content flags may appear in any order before the first option line. correct-answer, explanation, answer-revealed, and answer-checked may also appear after the options. Each flag key may appear only once.
Inline values and multi-line bodies both work:
question-stem: What is 1 + 1?
correct-answer:
B. 2
explanation:
1 plus 1 is equal to 2.
Validation errors (shown in place of the block) if:
N does not match the length of correct-indexN is greater than the number of optionsGrading uses indexes only. Option labels (A. / 1. / anything else) and the correct-answer / explanation bodies are for display.
```quaestio
number-of-correct-answers: 2
correct-index: [2, 4]
question-title: Question 2
question-stem: Which numbers are even?
[ ] A. 1
[ ] B. 2
[ ] C. 3
[ ] D. 4
correct-answer: B. 2, D. 4
explanation: 2 and 4 are divisible by 2.
```
```quaestio
number-of-correct-answers: 1
correct-index: [2]
question-title: Question 3
question-stem: Pick the prime.
[ ] 1. 4
[ ] 2. 7
[ ] 3. 9
[ ] 4. 15
correct-answer: 2. 7
explanation: 7 is prime.
```
answer-checked: true). Does not open Correct Answer or Explanation. Reopening the note restores that banner.answer-revealed). Hide only closes the panel; it does not re-enable picking.[x], sets answer-checked: false, and sets answer-revealed: false).Title, stem, options, Correct Answer body, and Explanation body support markdown; flag names never appear in Reading view.
A quaestio-dashboard block controls and scores every quaestio block in the same note. Flag order is the display order. Several dashboards in one note stay consistent (same counts and the same Check / Show / Reset results) but can list different flags.
```quaestio-dashboard
live-update: true
include-unanswered: true
check-answered
check-all
show-hide-all
reset-all
correct-score: Correct: {count} / {total} ({pct}%)
incorrect-score: Incorrect: {count} / {total} ({pct}%)
unanswered-score: Unanswered: {count} / {total} ({pct}%)
```
| Flag | Meaning |
|---|---|
live-update: true|false |
Config only (not shown). Default true: score lines refresh as answers change. false freezes scores until Update. |
include-unanswered: true|false |
Config only (not shown). Default true. When false, correct and incorrect {total} is answered questions only (correct + incorrect). Unanswered {total} is always every quaestio block. |
check-answered |
Check blocks that already have a selection |
check-all |
Check every block (empty selections become Unanswered) |
show-hide-all |
Show all answers, or hide them if any answer panel is open |
reset-all |
Reset every block |
correct-score |
Correct count. Tokens: {count} numerator, {total} denominator, {pct} percent (at most 2 decimals). {x} and {y} still work as aliases of {count} and {total}. |
incorrect-score |
Incorrect count. Same tokens |
unanswered-score |
Unanswered count. {total} is always the number of quaestio blocks |
Action buttons sit on one wrapping row until a score line. Scores are recomputed from current selections, not from whether Check was pressed. Action buttons always run immediately; only the score lines follow live-update.
npm install
npm run build
npm test
CI runs build + Jest on push/PR. Tag a version matching manifest.json (for example 1.0.0) to create a draft GitHub release with main.js, manifest.json, and styles.css when present.