learn-content-engine - v0.34.0
    Preparing search index...

    Function importQti

    QTI interop for learn-content-engine (subpath export learn-content-engine/qti): the 2.x dialect and, since 0.25.0, the 3.0 dialect (detected on import from the root element, chosen on export via { version: "3.0" }).

    QTI (IMS Question and Test Interoperability) is the established interchange format for assessment content; this adapter bridges the mappable subset to the canonical lesson model at the same source->canonical boundary the core engine draws. It lives behind a subpath so the XML parser dependency (@rgrove/parse-xml) never enters the dependency-free core import.

    See docs/qti.md for the mapping table and fidelity limits. Activity tracking (xAPI) is deliberately NOT part of this - tracking is a consumer responsibility (docs/qti.md#activity-tracking).

    • Parse QTI XML (a single assessmentItem or an assessmentTest with inline items, in the 2.x or the 3.0 dialect, detected from the root) into a canonical ContentLesson. Throws QtiImportError when the root is not a QTI item or test, when any item is unmappable, or when the produced lesson fails validateLesson. meta overrides the lesson id / title otherwise taken from the QTI root.

      Parameters

      • xml: string
      • meta: { id?: string; title?: string } = {}

      Returns ContentLesson