@learnosity/lib-qti-converter 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +263 -0
- package/docs/DIAGNOSTICS.md +263 -0
- package/docs/EXAMPLES.md +869 -0
- package/docs/FAQ.md +415 -0
- package/docs/GETTING_STARTED.md +471 -0
- package/docs/LEARNOSITY_BUNDLE_FORMAT.md +338 -0
- package/docs/LEARNOSITY_SECTIONS.md +384 -0
- package/docs/QTI_METADATA_TO_TAGS.md +266 -0
- package/docs/QTI_STRUCTURE.md +353 -0
- package/docs/ROADMAP.md +232 -0
- package/docs/SUPPORTED_INTERACTIONS.md +601 -0
- package/docs/_sidebar.md +13 -0
- package/package.json +90 -0
- package/packages/cli/dist/main.js +45610 -0
- package/packages/core/dist/index.d.ts +2658 -0
- package/packages/core/dist/index.js +31706 -0
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
# Supported Interactions
|
|
2
|
+
|
|
3
|
+
This document lists all supported QTI interaction types and their corresponding Learnosity question types for bidirectional conversion.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The converter supports **11 interaction types** for QTI → Learnosity conversion, and **17 Learnosity question types** for Learnosity → QTI conversion.
|
|
8
|
+
|
|
9
|
+
## QTI → Learnosity Mappings
|
|
10
|
+
|
|
11
|
+
| QTI Interaction Type | Learnosity Question Type | Description |
|
|
12
|
+
| ---------------------------- | -------------------------- | ----------------------------------------------------------------- |
|
|
13
|
+
| `associateInteraction` | `classification` | Drag-and-drop items into category columns |
|
|
14
|
+
| `choiceInteraction` | `mcq` | Multiple choice questions with single or multiple correct answers |
|
|
15
|
+
| `extendedTextInteraction` | `longtextV2` | Essay or extended response questions |
|
|
16
|
+
| `gapMatchInteraction` | `clozeassociation` | Drag-and-drop text into gaps |
|
|
17
|
+
| `graphicGapMatchInteraction` | `imageclozeassociationV2` | Drag image labels onto hotspot areas |
|
|
18
|
+
| `hotspotInteraction` | `hotspot` | Click on areas of an image |
|
|
19
|
+
| `hottextInteraction` | `tokenhighlight` | Select highlighted text within a passage |
|
|
20
|
+
| `inlineChoiceInteraction` | `clozedropdown` | Dropdown selection within text |
|
|
21
|
+
| `matchInteraction` | `choicematrix` | Matching pairs or matrix-based questions |
|
|
22
|
+
| `orderInteraction` | `orderlist` | Ordering items in correct sequence |
|
|
23
|
+
| `textEntryInteraction` | `clozetext` or `shorttext` | Fill-in-the-blank or short answer text entry |
|
|
24
|
+
|
|
25
|
+
The `textEntryInteraction` converts to:
|
|
26
|
+
|
|
27
|
+
- `shorttext` - when there's a single text entry that appears at or near the end of the content (standalone short answer)
|
|
28
|
+
- `clozetext` - when there are multiple text entries OR the text entry is embedded in the middle of content (fill-in-the-blank)
|
|
29
|
+
|
|
30
|
+
## Learnosity → QTI Mappings
|
|
31
|
+
|
|
32
|
+
The reverse direction (Learnosity to QTI) supports additional question types that map to the same QTI interactions:
|
|
33
|
+
|
|
34
|
+
| Learnosity Question Type | QTI Interaction Type | Notes |
|
|
35
|
+
| ------------------------- | ---------------------------- | -------------------------------------------------- |
|
|
36
|
+
| `chemistryessayV2` | `extendedTextInteraction` | Chemistry formula essay (treated as extended text) |
|
|
37
|
+
| `choicematrix` | `matchInteraction` | Matrix of choices per stem/row |
|
|
38
|
+
| `classification` | `associateInteraction` | Drag-and-drop items into category columns |
|
|
39
|
+
| `clozeassociation` | `gapMatchInteraction` | Drag-and-drop text into gaps |
|
|
40
|
+
| `clozedropdown` | `inlineChoiceInteraction` | Dropdown selection within text |
|
|
41
|
+
| `clozetext` | `textEntryInteraction` | Inline text entry (fill-in-the-blank) |
|
|
42
|
+
| `drawing` | `drawingInteraction` | Freehand drawing with optional background image |
|
|
43
|
+
| `fileupload` | `uploadInteraction` | File upload for manual scoring |
|
|
44
|
+
| `formulaessayV2` | `extendedTextInteraction` | Math formula essay (treated as extended text) |
|
|
45
|
+
| `hotspot` | `hotspotInteraction` | Click on image areas |
|
|
46
|
+
| `imageclozeassociationV2` | `graphicGapMatchInteraction` | Drag image labels onto hotspot areas |
|
|
47
|
+
| `longtextV2` | `extendedTextInteraction` | Essay/extended response |
|
|
48
|
+
| `mcq` | `choiceInteraction` | Single or multiple choice |
|
|
49
|
+
| `orderlist` | `orderInteraction` | Ordering items in sequence |
|
|
50
|
+
| `plaintext` | `extendedTextInteraction` | Plain text essay (no rich text) |
|
|
51
|
+
| `shorttext` | `textEntryInteraction` | Standalone short answer |
|
|
52
|
+
| `tokenhighlight` | `hottextInteraction` | Select/highlight text tokens |
|
|
53
|
+
|
|
54
|
+
**Key Points:**
|
|
55
|
+
|
|
56
|
+
- Multiple Learnosity essay types (`longtextV2`, `formulaessayV2`, `chemistryessayV2`, `plaintext`) all map to `extendedTextInteraction`
|
|
57
|
+
- Both `clozetext` and `shorttext` map to `textEntryInteraction` (inline vs standalone)
|
|
58
|
+
- `fileupload` maps to `uploadInteraction` with MIME type support
|
|
59
|
+
- `drawing` maps to `drawingInteraction` with background image support
|
|
60
|
+
- `classification` maps to `associateInteraction` using a flat list of `simpleAssociableChoice` elements and `baseType="pair"` correct responses
|
|
61
|
+
|
|
62
|
+
## Detailed Interaction Descriptions
|
|
63
|
+
|
|
64
|
+
### 1. associateInteraction → classification
|
|
65
|
+
|
|
66
|
+
The IMS QTI `associateInteraction` presents a flat list of `simpleAssociableChoice` elements. The candidate forms **undirected pairs** between any two choices (e.g., drawing a line between them). There are no inherent "categories" or "columns" in the QTI model — every choice is equivalent. The pair `"A P"` is identical to `"P A"`.
|
|
67
|
+
|
|
68
|
+
**QTI Example (IMS Shakespearian Rivals sample):**
|
|
69
|
+
|
|
70
|
+
```xml
|
|
71
|
+
<responseDeclaration identifier="RESPONSE" cardinality="multiple" baseType="pair">
|
|
72
|
+
<correctResponse>
|
|
73
|
+
<value>A P</value>
|
|
74
|
+
<value>C M</value>
|
|
75
|
+
<value>D L</value>
|
|
76
|
+
</correctResponse>
|
|
77
|
+
</responseDeclaration>
|
|
78
|
+
<associateInteraction responseIdentifier="RESPONSE" shuffle="true" maxAssociations="3">
|
|
79
|
+
<prompt>Hidden in this list of characters from famous Shakespeare plays are three pairs
|
|
80
|
+
of rivals. Can you match each character to his adversary?</prompt>
|
|
81
|
+
<simpleAssociableChoice identifier="A" matchMax="1">Antonio</simpleAssociableChoice>
|
|
82
|
+
<simpleAssociableChoice identifier="C" matchMax="1">Capulet</simpleAssociableChoice>
|
|
83
|
+
<simpleAssociableChoice identifier="D" matchMax="1">Demetrius</simpleAssociableChoice>
|
|
84
|
+
<simpleAssociableChoice identifier="L" matchMax="1">Lysander</simpleAssociableChoice>
|
|
85
|
+
<simpleAssociableChoice identifier="M" matchMax="1">Montague</simpleAssociableChoice>
|
|
86
|
+
<simpleAssociableChoice identifier="P" matchMax="1">Prospero</simpleAssociableChoice>
|
|
87
|
+
</associateInteraction>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Learnosity Output:**
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"type": "classification",
|
|
95
|
+
"stimulus": "<p>Hidden in this list of characters from famous Shakespeare plays…</p>",
|
|
96
|
+
"possible_responses": ["Antonio", "Capulet", "Demetrius", "Lysander", "Montague", "Prospero"],
|
|
97
|
+
"column_headers": ["Pair 1", "Pair 2", "Pair 3"],
|
|
98
|
+
"ui_style": { "column_count": 3, "row_count": 2 },
|
|
99
|
+
"shuffle_items": true,
|
|
100
|
+
"validation": {
|
|
101
|
+
"scoring_type": "exactMatch",
|
|
102
|
+
"valid_response": {
|
|
103
|
+
"score": 1,
|
|
104
|
+
"value": [
|
|
105
|
+
[0, 5],
|
|
106
|
+
[1, 4],
|
|
107
|
+
[2, 3]
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Conversion Strategy:**
|
|
115
|
+
|
|
116
|
+
- **QTI → Learnosity**: ALL `simpleAssociableChoice` elements → `possible_responses` (preserving declaration order). Synthetic `column_headers` are generated as `"Pair 1"`, `"Pair 2"`, … (one per correct response pair). `valid_response.value` is a 2D array where each sub-array holds the **two 0-based indices** into `possible_responses` that form that pair. `ui_style.column_count` = number of pairs; `ui_style.row_count` = 2 (fixed — each pair always has exactly 2 choices).
|
|
117
|
+
- **Learnosity → QTI**: ALL `possible_responses` → `simpleAssociableChoice` elements with IDs `RESP_0`, `RESP_1`, … Each sub-array `[idx1, idx2]` in `valid_response.value` → one correct `pair` value `"RESP_idx1 RESP_idx2"`. `column_headers` are **ignored** — they have no QTI equivalent.
|
|
118
|
+
|
|
119
|
+
**Features:**
|
|
120
|
+
|
|
121
|
+
- Bidirectional conversion (QTI ↔ Learnosity)
|
|
122
|
+
- Shuffle support
|
|
123
|
+
- Exact match scoring
|
|
124
|
+
- `baseType="pair"` (undirected) in the QTI `responseDeclaration` — `"A P"` and `"P A"` are equivalent
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### 2. choiceInteraction → mcq
|
|
129
|
+
|
|
130
|
+
**QTI Example:**
|
|
131
|
+
|
|
132
|
+
```xml
|
|
133
|
+
<choiceInteraction responseIdentifier="RESPONSE" shuffle="true" maxChoices="1">
|
|
134
|
+
<prompt>What is the capital of France?</prompt>
|
|
135
|
+
<simpleChoice identifier="A">London</simpleChoice>
|
|
136
|
+
<simpleChoice identifier="B">Paris</simpleChoice>
|
|
137
|
+
<simpleChoice identifier="C">Berlin</simpleChoice>
|
|
138
|
+
</choiceInteraction>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Features:**
|
|
142
|
+
|
|
143
|
+
- Single or multiple correct responses
|
|
144
|
+
- Shuffle options support
|
|
145
|
+
- Per-option feedback (distractor rationale)
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### 3. textEntryInteraction → clozetext | shorttext
|
|
150
|
+
|
|
151
|
+
**QTI Example:**
|
|
152
|
+
|
|
153
|
+
```xml
|
|
154
|
+
<p>The capital of France is <textEntryInteraction responseIdentifier="RESPONSE"/>.</p>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Features:**
|
|
158
|
+
|
|
159
|
+
- Inline text entry (clozetext) or standalone (shorttext)
|
|
160
|
+
- Exact match or pattern-based validation
|
|
161
|
+
- Multiple gaps supported
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### 4. extendedTextInteraction → longtextV2
|
|
166
|
+
|
|
167
|
+
**QTI Example:**
|
|
168
|
+
|
|
169
|
+
```xml
|
|
170
|
+
<extendedTextInteraction responseIdentifier="RESPONSE" expectedLength="500">
|
|
171
|
+
<prompt>Describe the causes of World War I.</prompt>
|
|
172
|
+
</extendedTextInteraction>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Features:**
|
|
176
|
+
|
|
177
|
+
- Long-form essay responses
|
|
178
|
+
- Expected length hints
|
|
179
|
+
- Manual scoring
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### 5. matchInteraction → choicematrix
|
|
184
|
+
|
|
185
|
+
**QTI Example:**
|
|
186
|
+
|
|
187
|
+
```xml
|
|
188
|
+
<matchInteraction responseIdentifier="RESPONSE" shuffle="true">
|
|
189
|
+
<simpleMatchSet>
|
|
190
|
+
<simpleAssociableChoice identifier="S1">Dog</simpleAssociableChoice>
|
|
191
|
+
<simpleAssociableChoice identifier="S2">Cat</simpleAssociableChoice>
|
|
192
|
+
</simpleMatchSet>
|
|
193
|
+
<simpleMatchSet>
|
|
194
|
+
<simpleAssociableChoice identifier="O1">Mammal</simpleAssociableChoice>
|
|
195
|
+
<simpleAssociableChoice identifier="O2">Reptile</simpleAssociableChoice>
|
|
196
|
+
</simpleMatchSet>
|
|
197
|
+
</matchInteraction>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Features:**
|
|
201
|
+
|
|
202
|
+
- Row-based matching (stems → options)
|
|
203
|
+
- Shuffle support
|
|
204
|
+
- Multiple responses per stem
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### 6. gapMatchInteraction → clozeassociation
|
|
209
|
+
|
|
210
|
+
**QTI Example:**
|
|
211
|
+
|
|
212
|
+
```xml
|
|
213
|
+
<gapMatchInteraction responseIdentifier="RESPONSE">
|
|
214
|
+
<prompt>Drag the words into the correct gaps.</prompt>
|
|
215
|
+
<gapText identifier="G1">noun</gapText>
|
|
216
|
+
<gapText identifier="G2">verb</gapText>
|
|
217
|
+
<blockquote>
|
|
218
|
+
<p>A <gap identifier="GAP1"/> is a person, place, or thing.</p>
|
|
219
|
+
<p>A <gap identifier="GAP2"/> is an action word.</p>
|
|
220
|
+
</blockquote>
|
|
221
|
+
</gapMatchInteraction>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Features:**
|
|
225
|
+
|
|
226
|
+
- Drag-and-drop text into gaps
|
|
227
|
+
- Multiple draggable items
|
|
228
|
+
- Reusable or single-use items
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### 7. inlineChoiceInteraction → clozedropdown
|
|
233
|
+
|
|
234
|
+
**QTI Example:**
|
|
235
|
+
|
|
236
|
+
```xml
|
|
237
|
+
<p>The color of the sky is
|
|
238
|
+
<inlineChoiceInteraction responseIdentifier="RESPONSE">
|
|
239
|
+
<inlineChoice identifier="A">red</inlineChoice>
|
|
240
|
+
<inlineChoice identifier="B">blue</inlineChoice>
|
|
241
|
+
<inlineChoice identifier="C">green</inlineChoice>
|
|
242
|
+
</inlineChoiceInteraction>.
|
|
243
|
+
</p>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Features:**
|
|
247
|
+
|
|
248
|
+
- Dropdown selection within text
|
|
249
|
+
- Multiple dropdowns supported
|
|
250
|
+
- Shuffle options
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### 8. orderInteraction → orderlist
|
|
255
|
+
|
|
256
|
+
**QTI Example:**
|
|
257
|
+
|
|
258
|
+
```xml
|
|
259
|
+
<orderInteraction responseIdentifier="RESPONSE" shuffle="true">
|
|
260
|
+
<prompt>Order these events chronologically.</prompt>
|
|
261
|
+
<simpleChoice identifier="A">World War I</simpleChoice>
|
|
262
|
+
<simpleChoice identifier="B">World War II</simpleChoice>
|
|
263
|
+
<simpleChoice identifier="C">Cold War</simpleChoice>
|
|
264
|
+
</orderInteraction>
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Features:**
|
|
268
|
+
|
|
269
|
+
- Drag to reorder items
|
|
270
|
+
- Shuffle initial order
|
|
271
|
+
- Exact sequence validation
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
### 9. hotspotInteraction → hotspot
|
|
276
|
+
|
|
277
|
+
**QTI Example:**
|
|
278
|
+
|
|
279
|
+
```xml
|
|
280
|
+
<hotspotInteraction responseIdentifier="RESPONSE" maxChoices="1">
|
|
281
|
+
<prompt>Click on the capital city.</prompt>
|
|
282
|
+
<object type="image/png" data="map.png" width="600" height="400"/>
|
|
283
|
+
<hotspotChoice identifier="A" shape="circle" coords="100,150,20"/>
|
|
284
|
+
<hotspotChoice identifier="B" shape="rect" coords="200,100,250,140"/>
|
|
285
|
+
</hotspotInteraction>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Features:**
|
|
289
|
+
|
|
290
|
+
- Click on areas of an image
|
|
291
|
+
- Multiple hotspot shapes (circle, rect, poly)
|
|
292
|
+
- Single or multiple selections
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
### 10. hottextInteraction → tokenhighlight
|
|
297
|
+
|
|
298
|
+
**QTI Example:**
|
|
299
|
+
|
|
300
|
+
```xml
|
|
301
|
+
<hottextInteraction responseIdentifier="RESPONSE" maxChoices="2">
|
|
302
|
+
<prompt>Select the nouns in the sentence.</prompt>
|
|
303
|
+
<p>The <hottext identifier="H1">cat</hottext> sat on the
|
|
304
|
+
<hottext identifier="H2">mat</hottext> and ate a
|
|
305
|
+
<hottext identifier="H3">fish</hottext>.</p>
|
|
306
|
+
</hottextInteraction>
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Features:**
|
|
310
|
+
|
|
311
|
+
- Select highlighted text within a passage
|
|
312
|
+
- Multiple selections supported
|
|
313
|
+
- Inline text highlighting
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
### 11. graphicGapMatchInteraction → imageclozeassociationV2
|
|
318
|
+
|
|
319
|
+
**QTI Example:**
|
|
320
|
+
|
|
321
|
+
```xml
|
|
322
|
+
<graphicGapMatchInteraction responseIdentifier="RESPONSE">
|
|
323
|
+
<prompt>Drag the airport codes to the correct cities.</prompt>
|
|
324
|
+
<object type="image/png" data="uk-map.png" width="600" height="400"/>
|
|
325
|
+
<gapImg identifier="GLA" objectLabel="Glasgow">
|
|
326
|
+
<object type="image/png" data="gla.png" width="50" height="30"/>
|
|
327
|
+
</gapImg>
|
|
328
|
+
<gapImg identifier="EDI" objectLabel="Edinburgh">
|
|
329
|
+
<object type="image/png" data="edi.png" width="50" height="30"/>
|
|
330
|
+
</gapImg>
|
|
331
|
+
<associableHotspot identifier="A" shape="rect" coords="100,150,150,180"/>
|
|
332
|
+
<associableHotspot identifier="B" shape="rect" coords="200,100,250,130"/>
|
|
333
|
+
</graphicGapMatchInteraction>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Features:**
|
|
337
|
+
|
|
338
|
+
- Drag image labels onto hotspot areas
|
|
339
|
+
- Background image with multiple drop zones
|
|
340
|
+
- Coordinate-based positioning (converted to percentages for Learnosity)
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Composite Items
|
|
345
|
+
|
|
346
|
+
The converter supports **composite items** containing:
|
|
347
|
+
|
|
348
|
+
- Multiple or mixed interactions
|
|
349
|
+
- Passages
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Unsupported QTI Interactions
|
|
354
|
+
|
|
355
|
+
The following QTI interaction types are **not currently supported**:
|
|
356
|
+
|
|
357
|
+
- `graphicAssociateInteraction`
|
|
358
|
+
- `graphicOrderInteraction`
|
|
359
|
+
- `mediaInteraction`
|
|
360
|
+
- `positionObjectInteraction`
|
|
361
|
+
- `selectPointInteraction`
|
|
362
|
+
- `sliderInteraction`
|
|
363
|
+
|
|
364
|
+
Attempting to convert these will produce a `QTI_UNSUPPORTED_INTERACTION` diagnostic.
|
|
365
|
+
|
|
366
|
+
**Note:** `uploadInteraction` and `drawingInteraction` are supported in the **Learnosity → QTI** direction only (see table above).
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## Supported Learnosity Features
|
|
371
|
+
|
|
372
|
+
In addition to question types (interactions), the converter supports the following **Learnosity features**:
|
|
373
|
+
|
|
374
|
+
| Learnosity Feature Type | QTI Representation | Description | Support Level |
|
|
375
|
+
| ----------------------- | ------------------------------------- | -------------------------------------------------------- | ----------------------------------------------- |
|
|
376
|
+
| `sharedpassage` | `<assessmentStimulus>` | Shared reading passages referenced by multiple questions | ✅ Full support |
|
|
377
|
+
| `audioplayer` | `<qh5:audio>` (QTI 2.2) or `<object>` | Audio media player | ✅ Full support (QTI 2.2), ⚠️ Partial (QTI 2.1) |
|
|
378
|
+
| `videoplayer` | `<qh5:video>` (QTI 2.2) or `<object>` | Video media player (hosted videos only) | ✅ Full support (QTI 2.2), ⚠️ Partial (QTI 2.1) |
|
|
379
|
+
| `calculator` | Not supported | On-screen calculator | ❌ Not supported |
|
|
380
|
+
| `ruler` | Not supported | On-screen ruler | ❌ Not supported |
|
|
381
|
+
| `protractor` | Not supported | On-screen protractor | ❌ Not supported |
|
|
382
|
+
| `linereader` | Not supported | Line reading guide | ❌ Not supported |
|
|
383
|
+
|
|
384
|
+
These are ignored in the **Learnosity → QTI** direction.
|
|
385
|
+
|
|
386
|
+
### Feature Details
|
|
387
|
+
|
|
388
|
+
#### sharedpassage → assessmentStimulus
|
|
389
|
+
|
|
390
|
+
**Learnosity Example:**
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"type": "sharedpassage",
|
|
395
|
+
"reference": "passage-1",
|
|
396
|
+
"data": {
|
|
397
|
+
"heading": "The Solar System",
|
|
398
|
+
"content": "<p>The solar system consists of the Sun and all objects that orbit it...</p>"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**QTI 2.2 Output:**
|
|
404
|
+
|
|
405
|
+
```xml
|
|
406
|
+
<assessmentStimulus identifier="passage-1" title="The Solar System">
|
|
407
|
+
<stimulusBody>
|
|
408
|
+
<p>The solar system consists of the Sun and all objects that orbit it...</p>
|
|
409
|
+
</stimulusBody>
|
|
410
|
+
</assessmentStimulus>
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Features:**
|
|
414
|
+
|
|
415
|
+
- Converted to standalone stimulus resources in QTI packages
|
|
416
|
+
- Referenced by items using `<object>` elements
|
|
417
|
+
- Supports embedded media (audio/video) within passage content
|
|
418
|
+
- Only available when using the `learnosity-to-qti-package` CLI command or `convertLearnosityToQtiPackage()` library function
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
#### audioplayer → qh5:audio
|
|
423
|
+
|
|
424
|
+
**Learnosity Example:**
|
|
425
|
+
|
|
426
|
+
```json
|
|
427
|
+
{
|
|
428
|
+
"type": "audioplayer",
|
|
429
|
+
"reference": "audio-1",
|
|
430
|
+
"data": {
|
|
431
|
+
"src": "https://example.com/audio.mp3"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
**QTI 2.2 Output (HTML5 profile):**
|
|
437
|
+
|
|
438
|
+
```xml
|
|
439
|
+
<qh5:audio controls="true" preload="metadata">
|
|
440
|
+
<qh5:source src="https://example.com/audio.mp3" type="audio/mpeg"/>
|
|
441
|
+
</qh5:audio>
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
**QTI 2.1 Output (fallback):**
|
|
445
|
+
|
|
446
|
+
```xml
|
|
447
|
+
<object data="https://example.com/audio.mp3" type="audio/mpeg">
|
|
448
|
+
<p><a href="https://example.com/audio.mp3">Download audio</a></p>
|
|
449
|
+
</object>
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Features:**
|
|
453
|
+
|
|
454
|
+
- QTI 2.2: Uses HTML5 `<qh5:audio>` elements (QTI-HTML5 namespace)
|
|
455
|
+
- QTI 2.1: Falls back to `<object>` elements with download link
|
|
456
|
+
- Supports MP3, WAV, OGG formats
|
|
457
|
+
- Can be embedded in sharedpassage content or item stimulus
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
#### videoplayer → qh5:video
|
|
462
|
+
|
|
463
|
+
**Learnosity Example:**
|
|
464
|
+
|
|
465
|
+
```json
|
|
466
|
+
{
|
|
467
|
+
"type": "videoplayer",
|
|
468
|
+
"reference": "video-1",
|
|
469
|
+
"data": {
|
|
470
|
+
"src": "https://example.com/video.mp4",
|
|
471
|
+
"player_type": "hosted-video"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
**QTI 2.2 Output (HTML5 profile):**
|
|
477
|
+
|
|
478
|
+
```xml
|
|
479
|
+
<qh5:video controls="true" preload="metadata">
|
|
480
|
+
<qh5:source src="https://example.com/video.mp4" type="video/mp4"/>
|
|
481
|
+
</qh5:video>
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**QTI 2.1 Output (fallback):**
|
|
485
|
+
|
|
486
|
+
```xml
|
|
487
|
+
<object data="https://example.com/video.mp4" type="video/mp4">
|
|
488
|
+
<p><a href="https://example.com/video.mp4">Download video</a></p>
|
|
489
|
+
</object>
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**Features:**
|
|
493
|
+
|
|
494
|
+
- QTI 2.2: Uses HTML5 `<qh5:video>` elements (QTI-HTML5 namespace)
|
|
495
|
+
- QTI 2.1: Falls back to `<object>` elements with download link
|
|
496
|
+
- **Only supports hosted videos** (`player_type: "hosted-video"`)
|
|
497
|
+
- YouTube and Vimeo videos are preserved as data attributes but not playable in QTI
|
|
498
|
+
- Supports MP4, WebM formats
|
|
499
|
+
- Can be embedded in sharedpassage content or item stimulus
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## Conversion Notes
|
|
504
|
+
|
|
505
|
+
### Coordinate Systems
|
|
506
|
+
|
|
507
|
+
- **QTI**: Uses absolute pixel coordinates (e.g., `coords="100,150,200,250"`)
|
|
508
|
+
- **Learnosity**: Uses percentage-based positioning
|
|
509
|
+
- The converter automatically transforms coordinates during conversion
|
|
510
|
+
|
|
511
|
+
### Validation and Scoring
|
|
512
|
+
|
|
513
|
+
- **QTI**: Uses `<responseDeclaration>` and `<responseProcessing>` for scoring
|
|
514
|
+
- **Learnosity**: Uses `validation.valid_response` structure
|
|
515
|
+
- The converter maps correct responses between formats
|
|
516
|
+
|
|
517
|
+
#### Alternate Responses Limit
|
|
518
|
+
|
|
519
|
+
There is a fundamental difference in scoring flexibility between QTI and Learnosity:
|
|
520
|
+
|
|
521
|
+
- **QTI** allows complex `<mapping>` rules that can define hundreds or thousands of valid response combinations, especially when using Cartesian products for multi-gap interactions
|
|
522
|
+
- **Learnosity** uses a simpler `validation.alt_responses` array designed for a curated list of alternatives
|
|
523
|
+
|
|
524
|
+
To prevent excessive JSON file sizes and potential performance issues, the converter **limits `alt_responses` to a maximum of 10 items**. This applies to:
|
|
525
|
+
|
|
526
|
+
- **Text entry interactions** (`textEntryInteraction` → `clozetext`/`shorttext`) with extensive `<mapping>` rules
|
|
527
|
+
- **Multi-gap clozetext** where Cartesian product combinations could generate hundreds of alternatives
|
|
528
|
+
|
|
529
|
+
When alternate responses exceed this limit, the converter:
|
|
530
|
+
|
|
531
|
+
1. Takes the first 10 alternatives
|
|
532
|
+
2. Emits a WARNING diagnostic: `QTI_ALT_RESPONSES_TRIMMED`
|
|
533
|
+
3. Continues conversion successfully
|
|
534
|
+
|
|
535
|
+
**Example scenario:**
|
|
536
|
+
|
|
537
|
+
- QTI item with 3 gaps, each having 5 mapped alternatives
|
|
538
|
+
- Cartesian product: 5 × 5 × 5 = 125 possible combinations
|
|
539
|
+
- Converter generates: 10 alt_responses (trimmed from 124, excluding the valid_response)
|
|
540
|
+
|
|
541
|
+
**Recommendation:** If you need more than 10 alternate responses, consider simplifying your QTI mapping rules to focus on the most common alternatives, or use Learnosity's custom scoring features for complex validation logic.
|
|
542
|
+
|
|
543
|
+
### Asset URLs
|
|
544
|
+
|
|
545
|
+
When converting with `--organisation_id` (CLI) or `organisationId` (library), asset URLs are transformed to use Learnosity CDN:
|
|
546
|
+
|
|
547
|
+
```
|
|
548
|
+
Original: images/photo.png
|
|
549
|
+
Transformed: https://assets.learnosity.com/organisations/<org_id>/<uuid>.png
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Asset URL Options:**
|
|
553
|
+
|
|
554
|
+
- Use `--mediavault` (CLI) or `mediaVault: true` (library) to use the `media-vault` subdomain instead of `assets`:
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
https://media-vault.learnosity.com/organisations/<org_id>/<uuid>.png
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
- Use `--custom-asset-url` (CLI) or `customAssetUrl` (library) to specify your own CDN or asset server:
|
|
561
|
+
|
|
562
|
+
```bash
|
|
563
|
+
# CLI
|
|
564
|
+
lcon qti-to-learnosity --in item.xml --out item.json \
|
|
565
|
+
--organisation_id 12345 \
|
|
566
|
+
--custom-asset-url "https://my-cdn.example.com/assets"
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
```typescript
|
|
570
|
+
// Library
|
|
571
|
+
const result = await convertQtiToLearnosity(qtiXml, {
|
|
572
|
+
organisationId: 12345,
|
|
573
|
+
customAssetUrl: 'https://my-cdn.example.com/assets',
|
|
574
|
+
// ...other required options
|
|
575
|
+
});
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
This produces:
|
|
579
|
+
|
|
580
|
+
```
|
|
581
|
+
https://my-cdn.example.com/assets/<uuid>.png
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
**Note:** When `customAssetUrl` / `--custom-asset-url` is provided, it overrides both the default Learnosity CDN and the `mediaVault` / `--mediavault` setting.
|
|
585
|
+
|
|
586
|
+
### QTI Metadata to Learnosity Tags
|
|
587
|
+
|
|
588
|
+
The converter automatically extracts metadata from QTI packages and converts it to Learnosity tags. This includes support for both LOM (Learning Object Metadata) and Common Cartridge curriculum standards metadata.
|
|
589
|
+
|
|
590
|
+
For detailed information about metadata conversion, see [QTI Metadata to Tags](https://learnosity.github.io/lib-qti-converter/#/QTI_METADATA_TO_TAGS).
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## See Also
|
|
595
|
+
|
|
596
|
+
- [Getting Started](https://learnosity.github.io/lib-qti-converter/#/GETTING_STARTED) - Installation and basic usage
|
|
597
|
+
- [QTI Metadata to Tags](https://learnosity.github.io/lib-qti-converter/#/QTI_METADATA_TO_TAGS) - How QTI metadata is converted to Learnosity tags
|
|
598
|
+
- [Learnosity Bundle Format](https://learnosity.github.io/lib-qti-converter/#/LEARNOSITY_BUNDLE_FORMAT) - Expected input format for Learnosity → QTI conversion
|
|
599
|
+
- [Learnosity Sections](https://learnosity.github.io/lib-qti-converter/#/LEARNOSITY_SECTIONS) - How activity sections map to QTI assessmentTest structure
|
|
600
|
+
- [Examples](https://learnosity.github.io/lib-qti-converter/#/EXAMPLES) - Conversion examples
|
|
601
|
+
- [FAQ](https://learnosity.github.io/lib-qti-converter/#/FAQ) - Common questions
|
package/docs/_sidebar.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
- **Getting Started**
|
|
2
|
+
- [Installation & Quick Start](GETTING_STARTED.md)
|
|
3
|
+
- **Reference**
|
|
4
|
+
- [Supported Interactions](SUPPORTED_INTERACTIONS.md)
|
|
5
|
+
- [QTI Structure](QTI_STRUCTURE.md)
|
|
6
|
+
- [Learnosity Bundle Format](LEARNOSITY_BUNDLE_FORMAT.md)
|
|
7
|
+
- [Learnosity Sections](LEARNOSITY_SECTIONS.md)
|
|
8
|
+
- [QTI Metadata to Tags](QTI_METADATA_TO_TAGS.md)
|
|
9
|
+
- [Diagnostics](DIAGNOSTICS.md)
|
|
10
|
+
- **More**
|
|
11
|
+
- [Examples](EXAMPLES.md)
|
|
12
|
+
- [FAQ](FAQ.md)
|
|
13
|
+
- [Roadmap](ROADMAP.md)
|