@pie-qti/assessment-player 0.1.4 → 0.1.5
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/README.md +19 -16
- package/dist/core/AssessmentPlayer.d.ts +16 -1
- package/dist/core/AssessmentPlayer.d.ts.map +1 -1
- package/dist/core/AssessmentPlayer.js +103 -8
- package/dist/core/TimeManager.d.ts +9 -0
- package/dist/core/TimeManager.d.ts.map +1 -1
- package/dist/core/TimeManager.js +16 -3
- package/dist/integration/ReferenceBackendAdapter.d.ts +27 -1
- package/dist/integration/ReferenceBackendAdapter.d.ts.map +1 -1
- package/dist/integration/ReferenceBackendAdapter.js +380 -10
- package/dist/integration/api-contract.d.ts +73 -2
- package/dist/integration/api-contract.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/components/index.ts +1 -1
- package/src/core/AssessmentPlayer.ts +115 -9
- package/src/core/TimeManager.ts +20 -3
- package/src/integration/ReferenceBackendAdapter.ts +441 -10
- package/src/integration/api-contract.ts +74 -2
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* - Validates all requests with authentication
|
|
27
27
|
* - Filters sensitive data based on role
|
|
28
28
|
*/
|
|
29
|
-
import { buildExpression, DeclarationContext, evalExpr, OperatorRegistry, parseXml, qtiNull, qtiValue, } from '@pie-qti/qti-processing';
|
|
29
|
+
import { buildExpression, buildOutcomeProcessingAst, DeclarationContext, evalExpr, execProgram, OperatorRegistry, parseXml, serializeXml, qtiNull, qtiValue, } from '@pie-qti/qti-processing';
|
|
30
30
|
import { Player } from '@pie-qti/item-player';
|
|
31
31
|
/**
|
|
32
32
|
* Storage key prefix for localStorage
|
|
@@ -36,6 +36,16 @@ const STORAGE_PREFIX = 'qti_session_';
|
|
|
36
36
|
* Cache key for item bank queries
|
|
37
37
|
*/
|
|
38
38
|
const BANK_CACHE_PREFIX = 'qti_bank_cache_';
|
|
39
|
+
function toCanonicalQtiName(name) {
|
|
40
|
+
const withoutPrefix = (name ?? '').replace(/^qti-/, '');
|
|
41
|
+
return withoutPrefix.replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
42
|
+
}
|
|
43
|
+
const qtiElementNameMapper = {
|
|
44
|
+
version: 'qti2x-or-qti3',
|
|
45
|
+
toCanonical: (elementName) => toCanonicalQtiName(elementName).toLowerCase(),
|
|
46
|
+
toNative: (canonicalName) => canonicalName,
|
|
47
|
+
isValidElementName: () => true,
|
|
48
|
+
};
|
|
39
49
|
/**
|
|
40
50
|
* Reference Backend Adapter using localStorage
|
|
41
51
|
*
|
|
@@ -161,14 +171,25 @@ export class ReferenceBackendAdapter {
|
|
|
161
171
|
const order = this.getItemOrder(session.assessment);
|
|
162
172
|
const idx = order.indexOf(request.itemIdentifier);
|
|
163
173
|
let nextItemIdentifier = idx >= 0 ? order[idx + 1] : undefined;
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
174
|
+
// QTI branchRule evaluation (backend-authoritative).
|
|
175
|
+
// Evaluate each rule in order; the first matching rule determines the next item.
|
|
176
|
+
// Special targets EXIT_TEST / EXIT_TESTPART / EXIT_SECTION are returned as-is for
|
|
177
|
+
// the client to interpret.
|
|
178
|
+
const itemRef = this.findItemRef(session.assessment, request.itemIdentifier);
|
|
179
|
+
if (itemRef?.branchRule && itemRef.branchRule.length > 0) {
|
|
180
|
+
const outcomeVars = {
|
|
181
|
+
...result.outcomeValues,
|
|
182
|
+
SCORE: result.score,
|
|
183
|
+
};
|
|
184
|
+
nextItemIdentifier = undefined; // reset — branch rules take full control
|
|
185
|
+
for (const rule of itemRef.branchRule) {
|
|
186
|
+
const matches = rule.conditionXml
|
|
187
|
+
? this.evaluateConditionXml(rule.conditionXml, outcomeVars)
|
|
188
|
+
: true; // unconditional branch
|
|
189
|
+
if (matches) {
|
|
190
|
+
nextItemIdentifier = rule.target;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
172
193
|
}
|
|
173
194
|
}
|
|
174
195
|
return {
|
|
@@ -216,8 +237,11 @@ export class ReferenceBackendAdapter {
|
|
|
216
237
|
this.saveSession(session);
|
|
217
238
|
// Compute total score
|
|
218
239
|
const itemScores = session.state.itemScores || {};
|
|
219
|
-
const
|
|
240
|
+
const fallbackTotal = Object.values(itemScores).reduce((sum, result) => sum + result.score, 0);
|
|
220
241
|
const maxScore = Object.values(itemScores).reduce((sum, result) => sum + result.maxScore, 0);
|
|
242
|
+
// Execute test-level outcome processing if available
|
|
243
|
+
const outcomes = this.runOutcomeProcessing(session.assessment, itemScores);
|
|
244
|
+
const totalScore = outcomes !== null ? (outcomes['SCORE_TOTAL'] ?? outcomes['SCORE'] ?? fallbackTotal) : fallbackTotal;
|
|
221
245
|
return {
|
|
222
246
|
success: true,
|
|
223
247
|
totalScore,
|
|
@@ -226,6 +250,83 @@ export class ReferenceBackendAdapter {
|
|
|
226
250
|
finalizedAt: Date.now(),
|
|
227
251
|
};
|
|
228
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Execute test-level outcome processing (T9/T1).
|
|
255
|
+
* Returns a map of outcome variable values, or null if no outcomeProcessing is defined.
|
|
256
|
+
*/
|
|
257
|
+
runOutcomeProcessing(assessment, itemScores) {
|
|
258
|
+
if (!assessment.outcomeProcessingXml) {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
try {
|
|
262
|
+
// Build declaration map from outcomeDeclarations
|
|
263
|
+
const decls = {};
|
|
264
|
+
for (const d of assessment.outcomeDeclarations || []) {
|
|
265
|
+
const baseType = d.baseType;
|
|
266
|
+
const cardinality = d.cardinality;
|
|
267
|
+
let defaultQtiValue;
|
|
268
|
+
if (d.defaultValue !== undefined) {
|
|
269
|
+
defaultQtiValue = qtiValue(baseType, cardinality, d.defaultValue);
|
|
270
|
+
}
|
|
271
|
+
else if (baseType === 'float' || baseType === 'integer') {
|
|
272
|
+
defaultQtiValue = qtiValue(baseType, 'single', 0);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
defaultQtiValue = qtiNull();
|
|
276
|
+
}
|
|
277
|
+
decls[d.identifier] = {
|
|
278
|
+
identifier: d.identifier,
|
|
279
|
+
baseType,
|
|
280
|
+
cardinality,
|
|
281
|
+
defaultValue: defaultQtiValue,
|
|
282
|
+
value: { ...defaultQtiValue },
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
const ctx = new DeclarationContext(decls);
|
|
286
|
+
const ops = new OperatorRegistry();
|
|
287
|
+
// Build test items array for testVariables expression
|
|
288
|
+
const testItems = Object.entries(itemScores).map(([id, scoring]) => ({
|
|
289
|
+
identifier: id,
|
|
290
|
+
variables: {
|
|
291
|
+
SCORE: qtiValue('float', 'single', scoring.score),
|
|
292
|
+
// Add any other outcome values from the scoring result
|
|
293
|
+
...Object.fromEntries(Object.entries(scoring.outcomeValues || {}).map(([k, v]) => [
|
|
294
|
+
k,
|
|
295
|
+
typeof v === 'number'
|
|
296
|
+
? qtiValue('float', 'single', v)
|
|
297
|
+
: qtiValue('string', 'single', String(v)),
|
|
298
|
+
])),
|
|
299
|
+
},
|
|
300
|
+
}));
|
|
301
|
+
// Parse and execute outcome processing
|
|
302
|
+
const opEl = parseXml(assessment.outcomeProcessingXml).documentElement;
|
|
303
|
+
if (!opEl)
|
|
304
|
+
return null;
|
|
305
|
+
const program = buildOutcomeProcessingAst(opEl, {
|
|
306
|
+
scope: 'test',
|
|
307
|
+
elementNameMapper: qtiElementNameMapper,
|
|
308
|
+
});
|
|
309
|
+
execProgram({
|
|
310
|
+
ctx,
|
|
311
|
+
ops,
|
|
312
|
+
rng: Math.random,
|
|
313
|
+
test: { items: testItems },
|
|
314
|
+
}, program);
|
|
315
|
+
// Extract outcome values
|
|
316
|
+
const result = {};
|
|
317
|
+
for (const d of assessment.outcomeDeclarations || []) {
|
|
318
|
+
const v = ctx.getValue(d.identifier);
|
|
319
|
+
if (v.kind === 'value') {
|
|
320
|
+
result[d.identifier] = v.value;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return result;
|
|
324
|
+
}
|
|
325
|
+
catch (err) {
|
|
326
|
+
console.warn('[ReferenceBackendAdapter] outcomeProcessing failed:', err);
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
229
330
|
/**
|
|
230
331
|
* Resume existing session (alias for initSession with resumeSessionId)
|
|
231
332
|
*/
|
|
@@ -315,6 +416,18 @@ export class ReferenceBackendAdapter {
|
|
|
315
416
|
}
|
|
316
417
|
return null;
|
|
317
418
|
}
|
|
419
|
+
findItemRef(assessment, itemIdentifier) {
|
|
420
|
+
for (const part of assessment.testParts) {
|
|
421
|
+
for (const section of part.sections) {
|
|
422
|
+
for (const item of section.assessmentItemRefs) {
|
|
423
|
+
if (item.identifier === itemIdentifier) {
|
|
424
|
+
return item;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
318
431
|
/**
|
|
319
432
|
* Score an item using the Player
|
|
320
433
|
*
|
|
@@ -475,6 +588,263 @@ export class ReferenceBackendAdapter {
|
|
|
475
588
|
],
|
|
476
589
|
};
|
|
477
590
|
}
|
|
591
|
+
// =========================================================================
|
|
592
|
+
// STATIC: QTI TEST XML PARSER
|
|
593
|
+
// =========================================================================
|
|
594
|
+
/**
|
|
595
|
+
* Parse a QTI assessmentTest XML string into a SecureAssessment structure.
|
|
596
|
+
*
|
|
597
|
+
* Handles:
|
|
598
|
+
* - S1: section-level itemSessionControl
|
|
599
|
+
* - S9: assessmentSectionRef href resolution (requires fileResolver)
|
|
600
|
+
* - T9/T1: outcomeDeclarations + outcomeProcessing extraction
|
|
601
|
+
*
|
|
602
|
+
* @param testXml - Raw QTI assessmentTest XML string
|
|
603
|
+
* @param options.role - Role to assign to items (default: 'candidate')
|
|
604
|
+
* @param options.itemXmlMap - Map of item identifier -> itemXml for pre-loaded items
|
|
605
|
+
* @param options.fileResolver - Async function to load external files by relative href
|
|
606
|
+
* @param options.baseUrl - Base URL for resolving relative hrefs
|
|
607
|
+
*/
|
|
608
|
+
static async parseAssessmentTestXml(testXml, options = {}) {
|
|
609
|
+
const { role = 'candidate', itemXmlMap = {}, fileResolver, baseUrl } = options;
|
|
610
|
+
const doc = parseXml(testXml);
|
|
611
|
+
const root = doc.documentElement;
|
|
612
|
+
if (!root)
|
|
613
|
+
throw new Error('Empty assessmentTest XML');
|
|
614
|
+
const getAttr = (el, name) => {
|
|
615
|
+
const direct = el.getAttribute(name);
|
|
616
|
+
if (direct !== null && direct !== '')
|
|
617
|
+
return direct;
|
|
618
|
+
const mapped = el.getAttribute(name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`));
|
|
619
|
+
return mapped === null || mapped === '' ? undefined : mapped;
|
|
620
|
+
};
|
|
621
|
+
const childElements = (el) => Array.from(el.childNodes).filter((n) => n.nodeType === 1);
|
|
622
|
+
const childrenByTag = (el, tag) => childElements(el).filter((c) => toCanonicalQtiName(c.localName) === tag);
|
|
623
|
+
// Parse itemSessionControl element
|
|
624
|
+
const parseItemSessionControl = (el) => {
|
|
625
|
+
const isc = childrenByTag(el, 'itemSessionControl')[0];
|
|
626
|
+
if (!isc)
|
|
627
|
+
return undefined;
|
|
628
|
+
const boolAttr = (name) => {
|
|
629
|
+
const v = getAttr(isc, name);
|
|
630
|
+
return v === undefined ? undefined : v !== 'false';
|
|
631
|
+
};
|
|
632
|
+
const intAttr = (name) => {
|
|
633
|
+
const v = getAttr(isc, name);
|
|
634
|
+
return v === undefined ? undefined : parseInt(v, 10);
|
|
635
|
+
};
|
|
636
|
+
return {
|
|
637
|
+
maxAttempts: intAttr('maxAttempts'),
|
|
638
|
+
showFeedback: boolAttr('showFeedback') ?? boolAttr('show-feedback'),
|
|
639
|
+
allowReview: boolAttr('allowReview') ?? boolAttr('allow-review'),
|
|
640
|
+
showSolution: boolAttr('showSolution') ?? boolAttr('show-solution'),
|
|
641
|
+
allowComment: boolAttr('allowComment') ?? boolAttr('allow-comment'),
|
|
642
|
+
allowSkipping: boolAttr('allowSkipping') ?? boolAttr('allow-skipping'),
|
|
643
|
+
validateResponses: boolAttr('validateResponses') ?? boolAttr('validate-responses'),
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
// Parse a single assessmentSection element
|
|
647
|
+
const parseSection = (sectionEl) => {
|
|
648
|
+
const identifier = getAttr(sectionEl, 'identifier') ?? 'section';
|
|
649
|
+
const title = getAttr(sectionEl, 'title');
|
|
650
|
+
const visibleRaw = getAttr(sectionEl, 'visible');
|
|
651
|
+
const visible = visibleRaw === undefined ? true : visibleRaw !== 'false';
|
|
652
|
+
const itemSessionControl = parseItemSessionControl(sectionEl);
|
|
653
|
+
// rubricBlocks
|
|
654
|
+
const rubricBlockEls = childrenByTag(sectionEl, 'rubricBlock');
|
|
655
|
+
const rubricBlocks = rubricBlockEls.length > 0
|
|
656
|
+
? rubricBlockEls.map((b, idx) => ({
|
|
657
|
+
identifier: getAttr(b, 'identifier') ?? `${identifier}-rubric-${idx + 1}`,
|
|
658
|
+
view: (getAttr(b, 'view') ?? 'candidate').split(/\s+/).filter(Boolean),
|
|
659
|
+
use: getAttr(b, 'use'),
|
|
660
|
+
content: serializeXml(b),
|
|
661
|
+
}))
|
|
662
|
+
: undefined;
|
|
663
|
+
// assessmentItemRefs
|
|
664
|
+
const itemRefEls = childrenByTag(sectionEl, 'assessmentItemRef');
|
|
665
|
+
const assessmentItemRefs = itemRefEls.map((ref) => {
|
|
666
|
+
const itemId = getAttr(ref, 'identifier') ?? 'item';
|
|
667
|
+
const href = getAttr(ref, 'href');
|
|
668
|
+
// Look up pre-loaded XML by identifier or href
|
|
669
|
+
const resolvedXml = itemXmlMap[itemId] ?? (href ? itemXmlMap[href] : undefined) ?? '';
|
|
670
|
+
const requiredRaw = getAttr(ref, 'required');
|
|
671
|
+
const required = requiredRaw === undefined ? undefined : requiredRaw !== 'false';
|
|
672
|
+
return {
|
|
673
|
+
identifier: itemId,
|
|
674
|
+
itemXml: resolvedXml,
|
|
675
|
+
role,
|
|
676
|
+
required,
|
|
677
|
+
};
|
|
678
|
+
});
|
|
679
|
+
return {
|
|
680
|
+
identifier,
|
|
681
|
+
title,
|
|
682
|
+
visible,
|
|
683
|
+
assessmentItemRefs,
|
|
684
|
+
rubricBlocks,
|
|
685
|
+
itemSessionControl,
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
// Resolve assessmentSectionRef: load and parse referenced section file
|
|
689
|
+
const resolveSectionRef = async (sectionRefEl) => {
|
|
690
|
+
const href = getAttr(sectionRefEl, 'href');
|
|
691
|
+
if (!href) {
|
|
692
|
+
console.warn('[ReferenceBackendAdapter] assessmentSectionRef missing href, skipping');
|
|
693
|
+
return null;
|
|
694
|
+
}
|
|
695
|
+
if (!fileResolver) {
|
|
696
|
+
console.warn(`[ReferenceBackendAdapter] assessmentSectionRef href="${href}" found but no fileResolver provided, skipping`);
|
|
697
|
+
return null;
|
|
698
|
+
}
|
|
699
|
+
try {
|
|
700
|
+
const sectionXml = await fileResolver(href);
|
|
701
|
+
const secDoc = parseXml(sectionXml);
|
|
702
|
+
const secRoot = secDoc.documentElement;
|
|
703
|
+
if (!secRoot || toCanonicalQtiName(secRoot.localName) !== 'assessmentSection') {
|
|
704
|
+
console.warn(`[ReferenceBackendAdapter] assessmentSectionRef href="${href}": root element is not <assessmentSection>, skipping`);
|
|
705
|
+
return null;
|
|
706
|
+
}
|
|
707
|
+
return parseSection(secRoot);
|
|
708
|
+
}
|
|
709
|
+
catch (err) {
|
|
710
|
+
console.warn(`[ReferenceBackendAdapter] Failed to load assessmentSectionRef href="${href}":`, err);
|
|
711
|
+
return null;
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
// Parse testPart children (sections + sectionRefs)
|
|
715
|
+
const parseSectionsForTestPart = async (testPartEl) => {
|
|
716
|
+
const sections = [];
|
|
717
|
+
for (const child of childElements(testPartEl)) {
|
|
718
|
+
if (toCanonicalQtiName(child.localName) === 'assessmentSection') {
|
|
719
|
+
sections.push(parseSection(child));
|
|
720
|
+
}
|
|
721
|
+
else if (toCanonicalQtiName(child.localName) === 'assessmentSectionRef') {
|
|
722
|
+
const resolved = await resolveSectionRef(child);
|
|
723
|
+
if (resolved)
|
|
724
|
+
sections.push(resolved);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return sections;
|
|
728
|
+
};
|
|
729
|
+
// Parse testPart-level itemSessionControl
|
|
730
|
+
const parseTestPartItemSessionControl = (testPartEl) => {
|
|
731
|
+
const isc = childrenByTag(testPartEl, 'itemSessionControl')[0];
|
|
732
|
+
if (!isc)
|
|
733
|
+
return undefined;
|
|
734
|
+
const boolAttr = (name) => {
|
|
735
|
+
const v = getAttr(isc, name);
|
|
736
|
+
return v === undefined ? undefined : v !== 'false';
|
|
737
|
+
};
|
|
738
|
+
const intAttr = (name) => {
|
|
739
|
+
const v = getAttr(isc, name);
|
|
740
|
+
return v === undefined ? undefined : parseInt(v, 10);
|
|
741
|
+
};
|
|
742
|
+
return {
|
|
743
|
+
maxAttempts: intAttr('maxAttempts'),
|
|
744
|
+
showFeedback: boolAttr('showFeedback') ?? boolAttr('show-feedback'),
|
|
745
|
+
allowReview: boolAttr('allowReview') ?? boolAttr('allow-review'),
|
|
746
|
+
showSolution: boolAttr('showSolution') ?? boolAttr('show-solution'),
|
|
747
|
+
allowComment: boolAttr('allowComment') ?? boolAttr('allow-comment'),
|
|
748
|
+
allowSkipping: boolAttr('allowSkipping') ?? boolAttr('allow-skipping'),
|
|
749
|
+
validateResponses: boolAttr('validateResponses') ?? boolAttr('validate-responses'),
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
// Extract outcomeDeclarations
|
|
753
|
+
const outcomeDeclarations = childrenByTag(root, 'outcomeDeclaration').map((d) => {
|
|
754
|
+
const identifier = getAttr(d, 'identifier') ?? 'OUTCOME';
|
|
755
|
+
const baseType = getAttr(d, 'baseType') ?? 'float';
|
|
756
|
+
const cardinality = getAttr(d, 'cardinality') ?? 'single';
|
|
757
|
+
// Parse defaultValue if present
|
|
758
|
+
const defaultValueEl = childrenByTag(d, 'defaultValue')[0];
|
|
759
|
+
let defaultValue = undefined;
|
|
760
|
+
if (defaultValueEl) {
|
|
761
|
+
const valueEl = childrenByTag(defaultValueEl, 'value')[0];
|
|
762
|
+
if (valueEl) {
|
|
763
|
+
const text = valueEl.textContent?.trim() ?? '0';
|
|
764
|
+
if (baseType === 'float' || baseType === 'integer') {
|
|
765
|
+
defaultValue = Number(text);
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
defaultValue = text;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
return { identifier, baseType, cardinality, defaultValue };
|
|
773
|
+
});
|
|
774
|
+
// Extract outcomeProcessing XML
|
|
775
|
+
const outcomeProcessingEl = childrenByTag(root, 'outcomeProcessing')[0];
|
|
776
|
+
const outcomeProcessingXml = outcomeProcessingEl
|
|
777
|
+
? serializeXml(outcomeProcessingEl)
|
|
778
|
+
: undefined;
|
|
779
|
+
// Extract timeLimits
|
|
780
|
+
const timeLimitsEl = childrenByTag(root, 'timeLimit')[0] ?? childrenByTag(root, 'timeLimits')[0];
|
|
781
|
+
const timeLimits = timeLimitsEl
|
|
782
|
+
? {
|
|
783
|
+
maxTime: getAttr(timeLimitsEl, 'maxTime')
|
|
784
|
+
? Number(getAttr(timeLimitsEl, 'maxTime'))
|
|
785
|
+
: undefined,
|
|
786
|
+
allowLateSubmission: getAttr(timeLimitsEl, 'allowLateSubmission') === 'true',
|
|
787
|
+
}
|
|
788
|
+
: undefined;
|
|
789
|
+
// Parse testParts
|
|
790
|
+
const testPartEls = childrenByTag(root, 'testPart');
|
|
791
|
+
const firstTestPart = testPartEls[0];
|
|
792
|
+
// Navigation/submission mode from first testPart (QTI 2.2 spec)
|
|
793
|
+
const navigationMode = (getAttr(firstTestPart ?? root, 'navigationMode') ?? 'nonlinear');
|
|
794
|
+
const submissionMode = (getAttr(firstTestPart ?? root, 'submissionMode') ?? 'simultaneous');
|
|
795
|
+
const testParts = [];
|
|
796
|
+
for (const tp of testPartEls) {
|
|
797
|
+
const tpIdentifier = getAttr(tp, 'identifier') ?? 'part-1';
|
|
798
|
+
const tpItemSessionControl = parseTestPartItemSessionControl(tp);
|
|
799
|
+
const tpRubricBlockEls = childrenByTag(tp, 'rubricBlock');
|
|
800
|
+
const tpRubricBlocks = tpRubricBlockEls.length > 0
|
|
801
|
+
? tpRubricBlockEls.map((b, idx) => ({
|
|
802
|
+
identifier: getAttr(b, 'identifier') ?? `${tpIdentifier}-rubric-${idx + 1}`,
|
|
803
|
+
view: (getAttr(b, 'view') ?? 'candidate').split(/\s+/).filter(Boolean),
|
|
804
|
+
use: getAttr(b, 'use'),
|
|
805
|
+
content: serializeXml(b),
|
|
806
|
+
}))
|
|
807
|
+
: undefined;
|
|
808
|
+
const sections = await parseSectionsForTestPart(tp);
|
|
809
|
+
testParts.push({
|
|
810
|
+
identifier: tpIdentifier,
|
|
811
|
+
sections,
|
|
812
|
+
rubricBlocks: tpRubricBlocks,
|
|
813
|
+
itemSessionControl: tpItemSessionControl,
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
// If no testParts, try top-level sections
|
|
817
|
+
if (testParts.length === 0) {
|
|
818
|
+
const topSections = [];
|
|
819
|
+
for (const child of childElements(root)) {
|
|
820
|
+
if (toCanonicalQtiName(child.localName) === 'assessmentSection') {
|
|
821
|
+
topSections.push(parseSection(child));
|
|
822
|
+
}
|
|
823
|
+
else if (toCanonicalQtiName(child.localName) === 'assessmentSectionRef') {
|
|
824
|
+
const resolved = await resolveSectionRef(child);
|
|
825
|
+
if (resolved)
|
|
826
|
+
topSections.push(resolved);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
if (topSections.length > 0) {
|
|
830
|
+
testParts.push({
|
|
831
|
+
identifier: 'part-1',
|
|
832
|
+
sections: topSections,
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
return {
|
|
837
|
+
identifier: getAttr(root, 'identifier') ?? 'assessment',
|
|
838
|
+
title: getAttr(root, 'title') ?? 'Assessment',
|
|
839
|
+
navigationMode,
|
|
840
|
+
submissionMode,
|
|
841
|
+
testParts,
|
|
842
|
+
timeLimits,
|
|
843
|
+
outcomeDeclarations: outcomeDeclarations.length > 0 ? outcomeDeclarations : undefined,
|
|
844
|
+
outcomeProcessingXml,
|
|
845
|
+
baseUrl,
|
|
846
|
+
};
|
|
847
|
+
}
|
|
478
848
|
evaluateConditionXml(conditionXml, vars) {
|
|
479
849
|
// conditionXml is an operator element like <gt>...</gt> (not wrapped in <expression>).
|
|
480
850
|
const doc = parseXml(conditionXml);
|
|
@@ -48,6 +48,17 @@ export interface InitSessionResponse {
|
|
|
48
48
|
*
|
|
49
49
|
* Security: NO correct answers, NO scoring rules, NO sensitive rubrics
|
|
50
50
|
*/
|
|
51
|
+
export interface TestFeedbackItem {
|
|
52
|
+
identifier: string;
|
|
53
|
+
/** Outcome variable name to evaluate (e.g. "PASS", "GRADE") */
|
|
54
|
+
outcomeIdentifier: string;
|
|
55
|
+
/** 'show' = show when outcome equals identifier; 'hide' = show when it does not */
|
|
56
|
+
showHide: 'show' | 'hide';
|
|
57
|
+
/** 'atEnd' = only after submission; 'during' = also during attempt */
|
|
58
|
+
access: 'atEnd' | 'during';
|
|
59
|
+
/** HTML content to display */
|
|
60
|
+
content: string;
|
|
61
|
+
}
|
|
51
62
|
export interface SecureAssessment {
|
|
52
63
|
identifier: string;
|
|
53
64
|
title: string;
|
|
@@ -62,6 +73,19 @@ export interface SecureAssessment {
|
|
|
62
73
|
maxTime?: number;
|
|
63
74
|
allowLateSubmission?: boolean;
|
|
64
75
|
};
|
|
76
|
+
/** QTI outcomeDeclarations for test-level variables */
|
|
77
|
+
outcomeDeclarations?: Array<{
|
|
78
|
+
identifier: string;
|
|
79
|
+
baseType: string;
|
|
80
|
+
cardinality: string;
|
|
81
|
+
defaultValue?: unknown;
|
|
82
|
+
}>;
|
|
83
|
+
/** Raw <outcomeProcessing> XML string, if present */
|
|
84
|
+
outcomeProcessingXml?: string;
|
|
85
|
+
/** Base URL/path for resolving relative hrefs (e.g. assessmentSectionRef) */
|
|
86
|
+
baseUrl?: string;
|
|
87
|
+
/** QTI testFeedback blocks for post-submission display */
|
|
88
|
+
testFeedback?: TestFeedbackItem[];
|
|
65
89
|
}
|
|
66
90
|
export interface SecureTestPart {
|
|
67
91
|
identifier: string;
|
|
@@ -88,7 +112,7 @@ export interface SecureSection {
|
|
|
88
112
|
title?: string;
|
|
89
113
|
/** Visible determines if section appears in navigation */
|
|
90
114
|
visible: boolean;
|
|
91
|
-
/** Assessment item references */
|
|
115
|
+
/** Assessment item references (order reflects selection/ordering already applied server-side) */
|
|
92
116
|
assessmentItemRefs: SecureItemRef[];
|
|
93
117
|
/** Section-level time limit */
|
|
94
118
|
timeLimits?: {
|
|
@@ -96,6 +120,35 @@ export interface SecureSection {
|
|
|
96
120
|
};
|
|
97
121
|
/** Candidate instructions (safe for display) */
|
|
98
122
|
rubricBlocks?: AssessmentRubricBlock[];
|
|
123
|
+
/**
|
|
124
|
+
* QTI selection: how many items to present from this section.
|
|
125
|
+
* When present the server has already applied selection; client uses this for progress display.
|
|
126
|
+
*/
|
|
127
|
+
selection?: {
|
|
128
|
+
/** Number of items selected for this session */
|
|
129
|
+
select: number;
|
|
130
|
+
withReplacement?: boolean;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* QTI ordering: whether items were shuffled.
|
|
134
|
+
* When true the server has already shuffled assessmentItemRefs.
|
|
135
|
+
*/
|
|
136
|
+
ordering?: {
|
|
137
|
+
shuffle: boolean;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Item session control (QTI assessmentSection/itemSessionControl).
|
|
141
|
+
* Section-level values take precedence over testPart-level when present.
|
|
142
|
+
*/
|
|
143
|
+
itemSessionControl?: {
|
|
144
|
+
maxAttempts?: number;
|
|
145
|
+
showFeedback?: boolean;
|
|
146
|
+
allowReview?: boolean;
|
|
147
|
+
showSolution?: boolean;
|
|
148
|
+
allowComment?: boolean;
|
|
149
|
+
allowSkipping?: boolean;
|
|
150
|
+
validateResponses?: boolean;
|
|
151
|
+
};
|
|
99
152
|
}
|
|
100
153
|
export interface SecureItemRef {
|
|
101
154
|
/** Unique item identifier */
|
|
@@ -106,6 +159,18 @@ export interface SecureItemRef {
|
|
|
106
159
|
role: QTIRole;
|
|
107
160
|
/** Required=true means item must be attempted */
|
|
108
161
|
required?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* QTI branchRule: ordered list of branch rules on this item.
|
|
164
|
+
* The backend evaluates these after scoring and returns nextItemIdentifier in SubmitResponsesResponse.
|
|
165
|
+
* Carried here so reference/demo adapters can evaluate them client-side.
|
|
166
|
+
*/
|
|
167
|
+
branchRule?: Array<{
|
|
168
|
+
/** Identifier of the target item, section, testPart, or one of the special values:
|
|
169
|
+
* EXIT_TEST | EXIT_TESTPART | EXIT_SECTION */
|
|
170
|
+
target: string;
|
|
171
|
+
/** Serialised QTI expression XML (the child of <branchRule>). Absent means unconditional. */
|
|
172
|
+
conditionXml?: string;
|
|
173
|
+
}>;
|
|
109
174
|
}
|
|
110
175
|
export interface AssessmentRubricBlock {
|
|
111
176
|
/** Optional rubric identifier (QTI rubricBlock@identifier) */
|
|
@@ -234,8 +299,14 @@ export interface FinalizeAssessmentResponse {
|
|
|
234
299
|
maxScore: number;
|
|
235
300
|
/** Per-item results */
|
|
236
301
|
itemScores: Record<string, AssessmentScoringResult>;
|
|
237
|
-
/** Assessment-level feedback */
|
|
302
|
+
/** Assessment-level feedback (legacy: single string; prefer outcomes + assessment.testFeedback) */
|
|
238
303
|
feedback?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Test-level outcome variable values after outcomeProcessing.
|
|
306
|
+
* Used to evaluate testFeedback visibility via string equality.
|
|
307
|
+
* Keys are outcome identifiers (e.g. "PASS", "GRADE"); values are their string representations.
|
|
308
|
+
*/
|
|
309
|
+
outcomes?: Record<string, string>;
|
|
239
310
|
/** Server timestamp */
|
|
240
311
|
finalizedAt: number;
|
|
241
312
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-contract.d.ts","sourceRoot":"","sources":["../../src/integration/api-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAMpD;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IACnC,4DAA4D;IAC5D,SAAS,EAAE,SAAS,CAAC;IACrB,kDAAkD;IAClD,UAAU,EAAE,gBAAgB,CAAC;IAC7B,2DAA2D;IAC3D,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACvC;AAMD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,cAAc,EAAE,QAAQ,GAAG,WAAW,CAAC;IACvC,2DAA2D;IAC3D,cAAc,EAAE,YAAY,GAAG,cAAc,CAAC;IAC9C,kCAAkC;IAClC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,+CAA+C;IAC/C,UAAU,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"api-contract.d.ts","sourceRoot":"","sources":["../../src/integration/api-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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IAChC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4DAA4D;IAC5D,OAAO,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;QACxC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,6CAA6C;IAC7C,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;CACnB;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEvE;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEnF;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAErF;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAE5F;;OAEG;IACH,aAAa,CAAC,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEnE;;;;OAIG;IACH,aAAa,CAAC,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC9E"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-qti/assessment-player",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "QTI Assessment Player supporting QTI 2.
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "QTI Assessment Player supporting QTI 2.2 and 3.0 - Multi-item test player with navigation, sections, and rubric blocks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pie-qti/default-components": "0.1.
|
|
32
|
-
"@pie-qti/i18n": "0.1.
|
|
33
|
-
"@pie-qti/item-player": "0.1.
|
|
34
|
-
"@pie-qti/qti-processing": "0.1.
|
|
31
|
+
"@pie-qti/default-components": "0.1.5",
|
|
32
|
+
"@pie-qti/i18n": "0.1.5",
|
|
33
|
+
"@pie-qti/item-player": "0.1.5",
|
|
34
|
+
"@pie-qti/qti-processing": "0.1.5",
|
|
35
35
|
"node-html-parser": "^7.0.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
package/src/components/index.ts
CHANGED