@openexam/mc
v0.1.0
Published
Multiple-choice widget for OpenExam (spec 0.1).
Downloads
20
Readme
@openexam/mc
The multiple-choice widget. First-party addon, Apache-2.0, targeting spec 0.1 (M1).
Source form
::: response mc { single, shuffle }
- [x] Paris
- [ ] Berlin
- [ ] Rome
:::See spec/0.1/grammar.md §7
for the full grammar.
What this package exports
mcWidget— theWidget01<McParams, McResponse>object that consuming hosts (parser, render-html, render-latex, CLI) dispatch to.parseMc(directive)— the content adapter as a standalone function (for direct testing and tooling reuse).gradeMc(response, params)— a basic grader returning a 0..1 score. Not part of theWidget01contract; exposed as a convenience until the addon-checker hook lands in M2.register(host)— addon entry point per ADR-008. No-op in 0.1; the host registration mechanism is wired up in a later milestone.
License
Apache-2.0. See LICENSE and the repository root
../../LICENSE.
