ID:WORK-009Status:pendingPriority:lowComplexity:unknown
Build quiz Rune
Summary
Assessment with multiple questions, answer options, and scoring. Supports multiple-choice, true/false, and fill-in-the-blank. Schema.org: Quiz.
Attributes
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
title | String | — | No | Quiz title |
passingScore | Number | — | No | Minimum score to pass (percentage) |
shuffle | Boolean | false | No | Randomize question order |
Content Model
- Each
##heading → a question - Unordered list under a question → answer options
- List items marked with
[x]→ correct answer(s) - Blockquotes under a question → explanation shown after answering
- Paragraphs → question context
Transform Output
- typeof:
Quiz - Tag:
<form> - Properties:
title,passingScore,shuffle - Refs:
questions(ol), each containingprompt,options(ul of radio/checkbox inputs),explanation(blockquote)
Implementation Tasks
- Create schema in
runes/learning/src/tags/quiz.ts - Add RuneConfig entry in
runes/learning/src/config.ts - Write CSS in
packages/lumina/styles/runes/quiz.css - Import CSS in
packages/lumina/index.css - Implement interactive form behavior: score calculation, answer checking, result display
- Write tests in
runes/learning/test/tags/quiz.test.ts - Add SEO extractor for
Quiz - Create inspector fixture
Implementation Notes
This is the most complex learning rune — significant JS for interactive form with score calculation, answer checking, and result display. Likely a web component or full behavior in @refrakt-md/behaviors.
The [x] checkbox syntax for correct answers needs custom parsing in the content model — similar to how GFM task lists work but repurposed for quiz answers.