Skip to main content

QuestionRenderer

Question rendering infrastructure for learning/assessment SaaS β€” Card/Online/Print 3-mode unified + RenderTemplate Registry + Filament Template Gallery.

Status​

KeyValue
Layerfoundation
TierL0
Statusreleased
Version1.4.0
PriceFree (free)
CategoryLearning

Overview​

Overview​

QuestionRenderer is a Foundation Plugin for the learning/assessment domain in multi-saas-kit.

Unified rendering of Question data across 3 modes (Card / Online / Print), independent of data source (template_logic / AI / human-authored).

Key Concept​

Question (data, source-independent)
└─ render_template_key: 'math.fraction-line'
└─ QuestionRenderer (Interface implementation)
└─ supportedModes: [online, print, card]

RenderTemplateRegistry maps render_template_key β†’ Renderer instance. SaaS-side Question models implement QuestionInterface to gain all 3 modes.

Features (Phase A β€” Foundation)​

Renderer Abstractions​

  • QuestionInterface, QuestionRendererInterface, RenderTemplateRegistry

3 Modes​

  • Online (Livewire interactive), Print (A4), Card (mobile)

Mode Toggle UI​

<x-question-renderer::mode-toggle :question :current-mode />
<x-question-renderer::render :question :mode />
  • Catalog management with status (ready / template_missing / needs_mapping) and scope filters

Example Renderers (1.2.0 β€” 7 total)​

Common scope (any grade/subject):

  • common.multiple-choice β€” 4-choice MCQ
  • common.short-answer β€” short answer (1.2.0 NEW)
  • common.true-false β€” true/false (1.2.0 NEW)
  • common.fill-blank β€” fill-in-the-blank (1.2.0 NEW, auto-replaces ____ tokens with input)
  • common.essay β€” essay/long-form (1.2.0 NEW, textarea + read-only model answer)

Subject scope:

  • math.fraction-line β€” fraction number line
  • english.dialogue-fill β€” English dialogue fill

1.4.0 β€” Phase H Card-batch Bulk Grading​

<x-question-renderer::quiz-card-batch /> new component​

  • One-line host call. Plugin handles chrome (header / progress / nav-bar) + slider + bulk grading + result screen.
  • New card-batch mode (BC: existing card mode unchanged).
  • 7 example card-batch views β€” child views dispatch answers to parent via cardbatch:answer, parent controls grading timing.
  • AnswerComparator service β€” unified 5-type comparison (multiple-choice / short-answer / true-false / fill-blank / essay) + subject-scope (math.fraction-line / english.dialogue-fill). JS port included.

Boundary (ADR-051)​

  • Foundation: Renderer Interface + Registry + Mode Toggle UI + QuizCardBatch wrapper
  • Composite (Phase D): QuestionAuthoring, QuestionLogic, QuestionWorkshop
  • SaaS: Question model implements QuestionInterface, mode routing

License​

MIT


πŸ›’ View on Plugin Store: store.codebase.how/plugins/question-renderer