QTI export
Already writing quizzes in your docs? You can reuse them in a Learning Management System (LMS) instead of rebuilding
them by hand. The export-qti command turns every quiz on your site into QTI
(Question & Test Interoperability), the standard interchange format that Canvas, Moodle, Blackboard, D2L Brightspace
and most other platforms can import.
The quiz manifest
Section titled “The quiz manifest”Like the terminal runner, the exporter reads a quiz manifest, never your MDX. The
manifest is a single quiz-manifest.json file describing every quiz on your site (question, answers, which are
correct, page path), and the plugin writes it by default. See the
CLI guide for what the manifest is and where it lives, and
Configuration for the option.
Export
Section titled “Export”Point export-qti at your site’s manifest — its URL or a local build directory — and choose an output directory:
# QTI 2.1 (the default)npx starlight-quiz export-qti https://ewels.github.io/starlight-quiz/quiz-manifest.json --out ./qtiWrote 28 file(s) to ./qti/That writes one XML assessment item per quiz, plus an imsmanifest.xml index, into the output directory:
imsmanifest.xml ← the package indexdemo-single.xml ← one item per quiz, named by its iddemo-multiple.xmlblank-single.xml…Single-choice, multiple-choice and fill-in-the-blank questions are all supported.
Import into your LMS
Section titled “Import into your LMS”The output directory is an unzipped IMS Content Package. To import it:
- Zip the output directory so
imsmanifest.xmlsits at the root of the archive. - In your LMS, import it as a QTI / IMS content package (for example Canvas: Settings → Import Course Content → QTI .zip file).
Options
Section titled “Options”| Flag | Description |
|---|---|
<source> |
A manifest URL or file, a directory containing one, or a page URL (scraped). |
--out |
Output directory (default qti). |
--version |
2.1 (default) or 1.2. |
--filename |
Manifest filename to look for (default quiz-manifest.json). |
answered: 0 / 0 (0%)