Overview
The@timeback/qti package provides a client for the QTI (Question and Test Interoperability) API, enabling:
- Assessment Items: Query and manage question items
- Assessment Tests: Query tests with nested structure
- Stimuli: Query shared content for questions
- Lessons: Submit and retrieve lesson feedback
- Validation: Validate QTI XML content
Installation
Quick Start
Assessment Items
List & Get Items
| Method | Returns | Description |
|---|---|---|
list() | { items, total, page, pages } | List with pagination metadata |
get() | AssessmentItem | Get item by ID |
stream() | AsyncIterable<Item> | Memory-efficient streaming |
.toArray() | Item[] | Collect streamed items |
Create, Update, Upsert & Delete
Assessment Tests
Test Parts
Assessment tests contain test parts, which contain sections:Sections
Sections live within a test part:Section Items
Manage items within a section:Stimuli
Stimuli are shared content blocks referenced by multiple items:upsert() is available on all three writable QTI resources.update(id, data): strict (throws if the resource doesn’t exist)upsert(id, data): loose (creates the resource if it doesn’t exist)
Lessons
Submit and retrieve lesson feedback:Validation
Validate QTI XML content:| Schema | Description |
|---|---|
item | QTI 3.0 assessment item |
test | QTI 3.0 assessment test |
stimulus | QTI 3.0 stimulus |
{ valid: boolean, errors?: string[] }
Item Types
QTI supports various interaction types:| Type | Description |
|---|---|
choiceInteraction | Multiple choice (single or multiple select) |
textEntryInteraction | Text input |
extendedTextInteraction | Long text/essay |
inlineChoiceInteraction | Dropdown select |
orderInteraction | Ordering/ranking |
matchInteraction | Matching pairs |
gapMatchInteraction | Fill in the blank |
hotspotInteraction | Image hotspots |
Next Steps
PowerPath
Adaptive assessments
OneRoster
Link assessments to gradebook
Types
QTI type definitions