@pie-qti/assessment-player 0.1.1 → 0.1.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/dist/core/AssessmentPlayer.d.ts +14 -7
- package/dist/core/AssessmentPlayer.d.ts.map +1 -1
- package/dist/core/AssessmentPlayer.js +33 -34
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/integration/ReferenceBackendAdapter.d.ts +2 -2
- package/dist/integration/ReferenceBackendAdapter.d.ts.map +1 -1
- package/dist/integration/ReferenceBackendAdapter.js +5 -5
- package/dist/integration/api-contract.d.ts +16 -16
- package/dist/integration/api-contract.d.ts.map +1 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/integration/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +100 -80
- package/src/components/AssessmentShell.svelte +8 -8
- package/src/components/ItemRenderer.svelte +8 -8
- package/src/components/NavigationBar.svelte +3 -1
- package/src/components/RubricDisplay.svelte +2 -2
- package/src/core/AssessmentPlayer.ts +51 -44
- package/src/index.ts +1 -1
- package/src/integration/ReferenceBackendAdapter.ts +13 -13
- package/src/integration/api-contract.ts +16 -16
- package/src/integration/index.ts +5 -5
- package/src/types/index.ts +1 -1
- package/.turbo/turbo-build.log +0 -1
- package/BACKEND-INTEGRATION.md +0 -620
- package/CHANGELOG.md +0 -11
- package/EXTENSIBILITY.md +0 -551
- package/svelte.config.js +0 -8
- package/tests/ReferenceBackendAdapter.spec.ts +0 -309
- package/tests/setup.ts +0 -103
- package/tests/smoke.test.ts +0 -7
- package/tsconfig.json +0 -20
- package/tsconfig.svelte.json +0 -10
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Apply backend navigation decisions + session state
|
|
9
9
|
*/
|
|
10
10
|
import type { QTIRole } from '@pie-qti/item-player';
|
|
11
|
-
import type { BackendAdapter, InitSessionRequest
|
|
11
|
+
import type { AssessmentRubricBlock, AssessmentSessionState, BackendAdapter, InitSessionRequest } from '../integration/api-contract.js';
|
|
12
12
|
import type { AssessmentResults, ItemResult, NavigationState } from '../types/index.js';
|
|
13
13
|
export interface BackendAssessmentPlayerConfig {
|
|
14
14
|
backend: BackendAdapter;
|
|
@@ -38,6 +38,12 @@ export interface BackendAssessmentPlayerConfig {
|
|
|
38
38
|
onResponseChange?: (responses: Record<string, unknown>) => void;
|
|
39
39
|
onComplete?: () => void;
|
|
40
40
|
}
|
|
41
|
+
type CurrentItemView = {
|
|
42
|
+
identifier: string;
|
|
43
|
+
title?: string;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
itemXml: string;
|
|
46
|
+
};
|
|
41
47
|
export declare class AssessmentPlayer {
|
|
42
48
|
private config;
|
|
43
49
|
static create(config: BackendAssessmentPlayerConfig): Promise<AssessmentPlayer>;
|
|
@@ -49,7 +55,7 @@ export declare class AssessmentPlayer {
|
|
|
49
55
|
private navigationManager;
|
|
50
56
|
private sessionController;
|
|
51
57
|
private timeManager;
|
|
52
|
-
private
|
|
58
|
+
private items;
|
|
53
59
|
private currentItemIndex;
|
|
54
60
|
private currentItemPlayer;
|
|
55
61
|
private responses;
|
|
@@ -64,7 +70,7 @@ export declare class AssessmentPlayer {
|
|
|
64
70
|
private timeTickListeners;
|
|
65
71
|
private constructor();
|
|
66
72
|
private hasAnyResponse;
|
|
67
|
-
private
|
|
73
|
+
private flattenItems;
|
|
68
74
|
getAllSections(): Array<{
|
|
69
75
|
id: string;
|
|
70
76
|
title?: string;
|
|
@@ -72,8 +78,8 @@ export declare class AssessmentPlayer {
|
|
|
72
78
|
index: number;
|
|
73
79
|
}>;
|
|
74
80
|
getNavigationState(): NavigationState;
|
|
75
|
-
|
|
76
|
-
getCurrentRubricBlocks():
|
|
81
|
+
getCurrentItem(): CurrentItemView | null;
|
|
82
|
+
getCurrentRubricBlocks(): AssessmentRubricBlock[];
|
|
77
83
|
getVisibleFeedback(): Array<{
|
|
78
84
|
identifier: string;
|
|
79
85
|
content: string;
|
|
@@ -96,11 +102,11 @@ export declare class AssessmentPlayer {
|
|
|
96
102
|
* Get the current session state snapshot (client-side view).
|
|
97
103
|
* Note: backend remains authoritative; this is intended for simple save/resume.
|
|
98
104
|
*/
|
|
99
|
-
getState():
|
|
105
|
+
getState(): AssessmentSessionState;
|
|
100
106
|
/**
|
|
101
107
|
* Restore a previously saved session state.
|
|
102
108
|
*/
|
|
103
|
-
restoreState(state:
|
|
109
|
+
restoreState(state: AssessmentSessionState): Promise<void>;
|
|
104
110
|
navigateTo(index: number): Promise<void>;
|
|
105
111
|
navigateToSection(sectionId: string): Promise<void>;
|
|
106
112
|
next(): Promise<void>;
|
|
@@ -148,4 +154,5 @@ export declare class AssessmentPlayer {
|
|
|
148
154
|
*/
|
|
149
155
|
private createDefaultI18nProvider;
|
|
150
156
|
}
|
|
157
|
+
export {};
|
|
151
158
|
//# sourceMappingURL=AssessmentPlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssessmentPlayer.d.ts","sourceRoot":"","sources":["../../src/core/AssessmentPlayer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,KAAK,EACX,cAAc,EAEd,kBAAkB,
|
|
1
|
+
{"version":3,"file":"AssessmentPlayer.d.ts","sourceRoot":"","sources":["../../src/core/AssessmentPlayer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EAEtB,cAAc,EAEd,kBAAkB,EAOlB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,MAAM,mBAAmB,CAAC;AAK3B,MAAM,WAAW,6BAA6B;IAC7C,OAAO,EAAE,c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IAAI,GAAG,MAAM,IAAI;IAK5C,aAAa,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAKvE,aAAa,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAK/C,UAAU,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAK5F,OAAO,IAAI,IAAI;IAetB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,cAAc;IAItB;;;OAGG;IACI,eAAe,IAAI,GAAG;IAI7B;;OAEG;IACH,OAAO,CAAC,yBAAyB;CAUjC"}
|
|
@@ -19,7 +19,7 @@ export class AssessmentPlayer {
|
|
|
19
19
|
constructor(config, init) {
|
|
20
20
|
this.config = config;
|
|
21
21
|
this.timeManager = null;
|
|
22
|
-
this.
|
|
22
|
+
this.items = [];
|
|
23
23
|
this.currentItemIndex = -1;
|
|
24
24
|
this.currentItemPlayer = null;
|
|
25
25
|
this.responses = {};
|
|
@@ -46,14 +46,14 @@ export class AssessmentPlayer {
|
|
|
46
46
|
itemScores: {},
|
|
47
47
|
timing: { startedAt: Date.now(), itemTimes: {}, totalTime: 0 },
|
|
48
48
|
};
|
|
49
|
-
this.
|
|
49
|
+
this.items = this.flattenItems(this.assessment);
|
|
50
50
|
const navigationMode = this.assessment.navigationMode || 'nonlinear';
|
|
51
|
-
this.navigationManager = new NavigationManager(navigationMode, this.
|
|
51
|
+
this.navigationManager = new NavigationManager(navigationMode, this.items.length);
|
|
52
52
|
// Item session control is a UI hint; backend remains authoritative.
|
|
53
53
|
const itemSessionControl = this.assessment.testParts?.[0]?.itemSessionControl;
|
|
54
54
|
this.sessionController = new ItemSessionController(itemSessionControl);
|
|
55
55
|
// Initialize per-item session state so itemSessionControl checks work immediately.
|
|
56
|
-
for (const q of this.
|
|
56
|
+
for (const q of this.items) {
|
|
57
57
|
this.sessionController.initializeItem(q.identifier);
|
|
58
58
|
}
|
|
59
59
|
// Initialize time manager if time limits exist
|
|
@@ -68,7 +68,7 @@ export class AssessmentPlayer {
|
|
|
68
68
|
}
|
|
69
69
|
// Restore to backend-provided current item if present
|
|
70
70
|
const startId = this.state.currentItemIdentifier;
|
|
71
|
-
const idx = startId ? this.
|
|
71
|
+
const idx = startId ? this.items.findIndex((q) => q.identifier === startId) : -1;
|
|
72
72
|
if (idx >= 0) {
|
|
73
73
|
this.navigateTo(idx).catch(() => { });
|
|
74
74
|
}
|
|
@@ -92,14 +92,14 @@ export class AssessmentPlayer {
|
|
|
92
92
|
}
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
flattenItems(assessment) {
|
|
96
96
|
const out = [];
|
|
97
97
|
const testParts = assessment.testParts || [];
|
|
98
98
|
let idx = 0;
|
|
99
99
|
let secIdx = 0;
|
|
100
100
|
for (const tp of testParts) {
|
|
101
101
|
for (const section of tp.sections || []) {
|
|
102
|
-
for (const item of section.
|
|
102
|
+
for (const item of section.assessmentItemRefs || []) {
|
|
103
103
|
out.push({
|
|
104
104
|
identifier: item.identifier,
|
|
105
105
|
item,
|
|
@@ -128,10 +128,10 @@ export class AssessmentPlayer {
|
|
|
128
128
|
return out;
|
|
129
129
|
}
|
|
130
130
|
getNavigationState() {
|
|
131
|
-
const total = this.
|
|
131
|
+
const total = this.items.length;
|
|
132
132
|
const canPrevious = this.canPrevious();
|
|
133
133
|
const canNext = this.canNext();
|
|
134
|
-
const q = this.
|
|
134
|
+
const q = this.items[this.currentItemIndex];
|
|
135
135
|
const totalSections = this.getAllSections().length;
|
|
136
136
|
return {
|
|
137
137
|
currentIndex: this.currentItemIndex,
|
|
@@ -145,11 +145,10 @@ export class AssessmentPlayer {
|
|
|
145
145
|
totalSections,
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
const q = this.
|
|
148
|
+
getCurrentItem() {
|
|
149
|
+
const q = this.items[this.currentItemIndex];
|
|
150
150
|
if (!q)
|
|
151
151
|
return null;
|
|
152
|
-
// Keep the legacy QuestionRef-ish shape expected by ItemRenderer.svelte
|
|
153
152
|
return {
|
|
154
153
|
identifier: q.item.identifier,
|
|
155
154
|
title: q.section.title,
|
|
@@ -158,17 +157,17 @@ export class AssessmentPlayer {
|
|
|
158
157
|
};
|
|
159
158
|
}
|
|
160
159
|
getCurrentRubricBlocks() {
|
|
161
|
-
const q = this.
|
|
160
|
+
const q = this.items[this.currentItemIndex];
|
|
162
161
|
if (!q)
|
|
163
162
|
return [];
|
|
164
|
-
return q.section.
|
|
163
|
+
return q.section.rubricBlocks || q.testPart.rubricBlocks || [];
|
|
165
164
|
}
|
|
166
165
|
getVisibleFeedback() {
|
|
167
166
|
return this.visibleFeedback;
|
|
168
167
|
}
|
|
169
168
|
updateResponse(responseId, value) {
|
|
170
169
|
this.responses = { ...this.responses, [responseId]: value };
|
|
171
|
-
const q = this.
|
|
170
|
+
const q = this.items[this.currentItemIndex];
|
|
172
171
|
if (q) {
|
|
173
172
|
this.state.itemResponses[q.identifier] = this.responses;
|
|
174
173
|
this.sessionController.markAnswered(q.identifier, this.hasAnyResponse(this.responses));
|
|
@@ -186,7 +185,7 @@ export class AssessmentPlayer {
|
|
|
186
185
|
const next = { ...prev, [responseId]: value };
|
|
187
186
|
this.state.itemResponses[itemIdentifier] = next;
|
|
188
187
|
// If this is the active item, keep the live response state + UI hints in sync.
|
|
189
|
-
const active = this.
|
|
188
|
+
const active = this.items[this.currentItemIndex];
|
|
190
189
|
if (active?.identifier === itemIdentifier) {
|
|
191
190
|
this.responses = next;
|
|
192
191
|
this.sessionController.markAnswered(itemIdentifier, this.hasAnyResponse(this.responses));
|
|
@@ -225,7 +224,7 @@ export class AssessmentPlayer {
|
|
|
225
224
|
this.state = state;
|
|
226
225
|
// Restore visited state for UI navigation hints.
|
|
227
226
|
const visitedIdx = (state.visitedItems || [])
|
|
228
|
-
.map((id) => this.
|
|
227
|
+
.map((id) => this.items.findIndex((q) => q.identifier === id))
|
|
229
228
|
.filter((i) => i >= 0);
|
|
230
229
|
this.navigationManager.restoreState(visitedIdx);
|
|
231
230
|
// Rehydrate itemResults from scores if present, so submit() can behave sensibly.
|
|
@@ -241,16 +240,16 @@ export class AssessmentPlayer {
|
|
|
241
240
|
}
|
|
242
241
|
}
|
|
243
242
|
const currentId = state.currentItemIdentifier;
|
|
244
|
-
const idx = currentId ? this.
|
|
243
|
+
const idx = currentId ? this.items.findIndex((q) => q.identifier === currentId) : -1;
|
|
245
244
|
if (idx >= 0) {
|
|
246
245
|
await this.navigateTo(idx);
|
|
247
246
|
}
|
|
248
|
-
else if (this.
|
|
247
|
+
else if (this.items.length > 0) {
|
|
249
248
|
await this.navigateTo(0);
|
|
250
249
|
}
|
|
251
250
|
}
|
|
252
251
|
async navigateTo(index) {
|
|
253
|
-
if (index < 0 || index >= this.
|
|
252
|
+
if (index < 0 || index >= this.items.length)
|
|
254
253
|
throw new Error(`Invalid item index: ${index}`);
|
|
255
254
|
// Enforce navigation rules (UI hints, still backend-authoritative for real deployments).
|
|
256
255
|
if (this.currentItemIndex >= 0 && !this.navigationManager.canNavigateTo(index, this.currentItemIndex)) {
|
|
@@ -259,12 +258,12 @@ export class AssessmentPlayer {
|
|
|
259
258
|
}
|
|
260
259
|
throw new Error('Navigation is not allowed.');
|
|
261
260
|
}
|
|
262
|
-
const target = this.
|
|
261
|
+
const target = this.items[index];
|
|
263
262
|
if (target && !this.sessionController.canReview(target.identifier)) {
|
|
264
263
|
throw new Error('You cannot go back to previous questions in this assessment.');
|
|
265
264
|
}
|
|
266
265
|
this.currentItemIndex = index;
|
|
267
|
-
const q = this.
|
|
266
|
+
const q = this.items[index];
|
|
268
267
|
this.state.currentItemIdentifier = q.identifier;
|
|
269
268
|
// Restore responses
|
|
270
269
|
this.responses = { ...(this.state.itemResponses[q.identifier] || {}) };
|
|
@@ -279,7 +278,7 @@ export class AssessmentPlayer {
|
|
|
279
278
|
this.notifySectionChange();
|
|
280
279
|
}
|
|
281
280
|
async navigateToSection(sectionId) {
|
|
282
|
-
const idx = this.
|
|
281
|
+
const idx = this.items.findIndex((q) => q.section.identifier === sectionId);
|
|
283
282
|
if (idx >= 0)
|
|
284
283
|
await this.navigateTo(idx);
|
|
285
284
|
}
|
|
@@ -287,7 +286,7 @@ export class AssessmentPlayer {
|
|
|
287
286
|
const state = this.getNavigationState();
|
|
288
287
|
if (!state.canNext)
|
|
289
288
|
return;
|
|
290
|
-
const q = this.
|
|
289
|
+
const q = this.items[this.currentItemIndex];
|
|
291
290
|
if (q) {
|
|
292
291
|
const hasResponses = this.hasAnyResponse(this.responses);
|
|
293
292
|
this.sessionController.markAnswered(q.identifier, hasResponses);
|
|
@@ -314,7 +313,7 @@ export class AssessmentPlayer {
|
|
|
314
313
|
}
|
|
315
314
|
/** Submit current item (server-side scoring) */
|
|
316
315
|
async submitCurrentItem() {
|
|
317
|
-
const q = this.
|
|
316
|
+
const q = this.items[this.currentItemIndex];
|
|
318
317
|
if (!q)
|
|
319
318
|
throw new Error('No current item');
|
|
320
319
|
const submittedAt = Date.now();
|
|
@@ -356,7 +355,7 @@ export class AssessmentPlayer {
|
|
|
356
355
|
this.navigationManager.markVisited(this.currentItemIndex);
|
|
357
356
|
// Apply backend branching decision if provided
|
|
358
357
|
if (res.nextItemIdentifier) {
|
|
359
|
-
const nextIdx = this.
|
|
358
|
+
const nextIdx = this.items.findIndex((x) => x.identifier === res.nextItemIdentifier);
|
|
360
359
|
if (nextIdx >= 0) {
|
|
361
360
|
await this.navigateTo(nextIdx);
|
|
362
361
|
}
|
|
@@ -366,7 +365,7 @@ export class AssessmentPlayer {
|
|
|
366
365
|
canPrevious() {
|
|
367
366
|
if (this.currentItemIndex <= 0)
|
|
368
367
|
return false;
|
|
369
|
-
const prev = this.
|
|
368
|
+
const prev = this.items[this.currentItemIndex - 1];
|
|
370
369
|
if (!prev)
|
|
371
370
|
return false;
|
|
372
371
|
if (!this.navigationManager.canNavigateTo(this.currentItemIndex - 1, this.currentItemIndex))
|
|
@@ -377,7 +376,7 @@ export class AssessmentPlayer {
|
|
|
377
376
|
if (this.currentItemIndex < 0)
|
|
378
377
|
return false;
|
|
379
378
|
const nextIdx = this.currentItemIndex + 1;
|
|
380
|
-
if (nextIdx >= this.
|
|
379
|
+
if (nextIdx >= this.items.length)
|
|
381
380
|
return false;
|
|
382
381
|
if (!this.navigationManager.canNavigateTo(nextIdx, this.currentItemIndex))
|
|
383
382
|
return false;
|
|
@@ -394,7 +393,7 @@ export class AssessmentPlayer {
|
|
|
394
393
|
// responses for items that have been submitted so far, which would otherwise
|
|
395
394
|
// wipe out responses for later items during this loop.
|
|
396
395
|
const allItemResponses = { ...(this.state.itemResponses || {}) };
|
|
397
|
-
for (const q of this.
|
|
396
|
+
for (const q of this.items) {
|
|
398
397
|
if (this.itemResults.has(q.identifier))
|
|
399
398
|
continue;
|
|
400
399
|
const submittedAt = Date.now();
|
|
@@ -430,7 +429,7 @@ export class AssessmentPlayer {
|
|
|
430
429
|
}
|
|
431
430
|
else {
|
|
432
431
|
// Ensure current item is submitted (individual submission mode)
|
|
433
|
-
const q = this.
|
|
432
|
+
const q = this.items[this.currentItemIndex];
|
|
434
433
|
if (q && !this.itemResults.has(q.identifier)) {
|
|
435
434
|
await this.submitCurrentItem();
|
|
436
435
|
}
|
|
@@ -465,7 +464,7 @@ export class AssessmentPlayer {
|
|
|
465
464
|
// Session info + time helpers
|
|
466
465
|
// ---------------------------------------------------------------------------
|
|
467
466
|
getItemSessionInfo(_itemIdentifier) {
|
|
468
|
-
const q = this.
|
|
467
|
+
const q = this.items[this.currentItemIndex];
|
|
469
468
|
if (!q)
|
|
470
469
|
return null;
|
|
471
470
|
const id = q.identifier;
|
|
@@ -540,11 +539,11 @@ export class AssessmentPlayer {
|
|
|
540
539
|
// ---------------------------------------------------------------------------
|
|
541
540
|
notifyItemChange() {
|
|
542
541
|
for (const l of this.itemChangeListeners)
|
|
543
|
-
l(this.currentItemIndex, this.
|
|
544
|
-
this.config.onItemChange?.(this.currentItemIndex, this.
|
|
542
|
+
l(this.currentItemIndex, this.items.length);
|
|
543
|
+
this.config.onItemChange?.(this.currentItemIndex, this.items.length);
|
|
545
544
|
}
|
|
546
545
|
notifySectionChange() {
|
|
547
|
-
const q = this.
|
|
546
|
+
const q = this.items[this.currentItemIndex];
|
|
548
547
|
const sectionIndex = q?.sectionIndex ?? 0;
|
|
549
548
|
const totalSections = this.getAllSections().length;
|
|
550
549
|
for (const l of this.sectionChangeListeners)
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export type { BackendAssessmentPlayerConfig } from './core/AssessmentPlayer.js';
|
|
|
2
2
|
export type { NavigationMode } from './core/index.js';
|
|
3
3
|
export { AssessmentPlayer, NavigationManager } from './core/index.js';
|
|
4
4
|
export * from './integration/index.js';
|
|
5
|
-
export type { AssessmentResults, ItemResult, NavigationState, QTIRole
|
|
5
|
+
export type { AssessmentResults, ItemRef, ItemResult, NavigationState, QTIRole } from './types/index.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,cAAc,wBAAwB,CAAC;AAEvC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,cAAc,wBAAwB,CAAC;AAEvC,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* - Validates all requests with authentication
|
|
27
27
|
* - Filters sensitive data based on role
|
|
28
28
|
*/
|
|
29
|
-
import type { BackendAdapter, FinalizeAssessmentRequest, FinalizeAssessmentResponse, InitSessionRequest, InitSessionResponse, QueryItemBankRequest, QueryItemBankResponse,
|
|
29
|
+
import type { BackendAdapter, FinalizeAssessmentRequest, FinalizeAssessmentResponse, InitSessionRequest, InitSessionResponse, QueryItemBankRequest, QueryItemBankResponse, SaveAssessmentStateRequest, SaveAssessmentStateResponse, SecureAssessment, SessionId, SubmitResponsesRequest, SubmitResponsesResponse } from './api-contract.js';
|
|
30
30
|
/**
|
|
31
31
|
* Reference Backend Adapter using localStorage
|
|
32
32
|
*
|
|
@@ -61,7 +61,7 @@ export declare class ReferenceBackendAdapter implements BackendAdapter {
|
|
|
61
61
|
/**
|
|
62
62
|
* Save session state (for auto-save)
|
|
63
63
|
*/
|
|
64
|
-
saveState(request:
|
|
64
|
+
saveState(request: SaveAssessmentStateRequest): Promise<SaveAssessmentStateResponse>;
|
|
65
65
|
/**
|
|
66
66
|
* Finalize assessment and compute final scores
|
|
67
67
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceBackendAdapter.d.ts","sourceRoot":"","sources":["../../src/integration/ReferenceBackendAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;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IAanB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAuCjB;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAmH5B,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,YAAY;IAgBpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAWvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAqBrB;;OAEG;IACH,OAAO,CAAC,aAAa;IAQrB;;;;;OAKG;YACW,kBAAkB;IAkLhC;;OAEG;IACH,OAAO,CAAC,KAAK;CAGb"}
|
|
@@ -90,7 +90,7 @@ export class ReferenceBackendAdapter {
|
|
|
90
90
|
// For reference implementation, we'll use demo data
|
|
91
91
|
const assessment = this.getAssessment(request.assessmentId);
|
|
92
92
|
const state = {
|
|
93
|
-
currentItemIdentifier: assessment.testParts[0].sections[0].
|
|
93
|
+
currentItemIdentifier: assessment.testParts[0].sections[0].assessmentItemRefs[0].identifier,
|
|
94
94
|
visitedItems: [],
|
|
95
95
|
itemResponses: {},
|
|
96
96
|
itemScores: {},
|
|
@@ -306,7 +306,7 @@ export class ReferenceBackendAdapter {
|
|
|
306
306
|
findItemXml(assessment, itemIdentifier) {
|
|
307
307
|
for (const part of assessment.testParts) {
|
|
308
308
|
for (const section of part.sections) {
|
|
309
|
-
for (const item of section.
|
|
309
|
+
for (const item of section.assessmentItemRefs) {
|
|
310
310
|
if (item.identifier === itemIdentifier) {
|
|
311
311
|
return item.itemXml;
|
|
312
312
|
}
|
|
@@ -372,7 +372,7 @@ export class ReferenceBackendAdapter {
|
|
|
372
372
|
testParts: [
|
|
373
373
|
{
|
|
374
374
|
identifier: 'part1',
|
|
375
|
-
|
|
375
|
+
rubricBlocks: [],
|
|
376
376
|
itemSessionControl: {
|
|
377
377
|
maxAttempts: 1,
|
|
378
378
|
showFeedback: true,
|
|
@@ -387,7 +387,7 @@ export class ReferenceBackendAdapter {
|
|
|
387
387
|
identifier: 'section1',
|
|
388
388
|
title: 'Section 1',
|
|
389
389
|
visible: true,
|
|
390
|
-
|
|
390
|
+
assessmentItemRefs: [
|
|
391
391
|
{
|
|
392
392
|
identifier: 'item1',
|
|
393
393
|
role: 'candidate',
|
|
@@ -508,7 +508,7 @@ export class ReferenceBackendAdapter {
|
|
|
508
508
|
const out = [];
|
|
509
509
|
for (const part of assessment.testParts || []) {
|
|
510
510
|
for (const section of part.sections || []) {
|
|
511
|
-
for (const item of section.
|
|
511
|
+
for (const item of section.assessmentItemRefs || []) {
|
|
512
512
|
out.push(item.identifier);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
@@ -41,7 +41,7 @@ export interface InitSessionResponse {
|
|
|
41
41
|
/** Assessment structure WITHOUT sensitive data */
|
|
42
42
|
assessment: SecureAssessment;
|
|
43
43
|
/** Restored state if resuming, undefined if new session */
|
|
44
|
-
restoredState?:
|
|
44
|
+
restoredState?: AssessmentSessionState;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Assessment structure safe for client consumption
|
|
@@ -68,7 +68,7 @@ export interface SecureTestPart {
|
|
|
68
68
|
/** Sections contain items */
|
|
69
69
|
sections: SecureSection[];
|
|
70
70
|
/** Candidate instructions (safe for display) */
|
|
71
|
-
|
|
71
|
+
rubricBlocks?: AssessmentRubricBlock[];
|
|
72
72
|
/**
|
|
73
73
|
* Item session control (QTI testPart/itemSessionControl).
|
|
74
74
|
* Server is authoritative; client uses this for UI hints only.
|
|
@@ -88,14 +88,14 @@ export interface SecureSection {
|
|
|
88
88
|
title?: string;
|
|
89
89
|
/** Visible determines if section appears in navigation */
|
|
90
90
|
visible: boolean;
|
|
91
|
-
/**
|
|
92
|
-
|
|
91
|
+
/** Assessment item references */
|
|
92
|
+
assessmentItemRefs: SecureItemRef[];
|
|
93
93
|
/** Section-level time limit */
|
|
94
94
|
timeLimits?: {
|
|
95
95
|
maxTime?: number;
|
|
96
96
|
};
|
|
97
97
|
/** Candidate instructions (safe for display) */
|
|
98
|
-
|
|
98
|
+
rubricBlocks?: AssessmentRubricBlock[];
|
|
99
99
|
}
|
|
100
100
|
export interface SecureItemRef {
|
|
101
101
|
/** Unique item identifier */
|
|
@@ -107,7 +107,7 @@ export interface SecureItemRef {
|
|
|
107
107
|
/** Required=true means item must be attempted */
|
|
108
108
|
required?: boolean;
|
|
109
109
|
}
|
|
110
|
-
export interface
|
|
110
|
+
export interface AssessmentRubricBlock {
|
|
111
111
|
/** Optional rubric identifier (QTI rubricBlock@identifier) */
|
|
112
112
|
identifier?: string;
|
|
113
113
|
/** Rubric content (HTML) */
|
|
@@ -141,7 +141,7 @@ export interface SubmitResponsesResponse {
|
|
|
141
141
|
/** Was submission accepted? */
|
|
142
142
|
success: boolean;
|
|
143
143
|
/** Scoring result (if submission mode allows immediate scoring) */
|
|
144
|
-
result?:
|
|
144
|
+
result?: AssessmentScoringResult;
|
|
145
145
|
/**
|
|
146
146
|
* Backend-authoritative next item (branching/navigation decision).
|
|
147
147
|
* If omitted, client may fall back to linear next/previous UI navigation.
|
|
@@ -151,7 +151,7 @@ export interface SubmitResponsesResponse {
|
|
|
151
151
|
* Backend-authoritative session state snapshot after applying the submission.
|
|
152
152
|
* If provided, client should replace its local state with this.
|
|
153
153
|
*/
|
|
154
|
-
updatedState?:
|
|
154
|
+
updatedState?: AssessmentSessionState;
|
|
155
155
|
/** Error message if success=false */
|
|
156
156
|
error?: string;
|
|
157
157
|
}
|
|
@@ -160,7 +160,7 @@ export interface SubmitResponsesResponse {
|
|
|
160
160
|
*
|
|
161
161
|
* Security: Server computes this, client never sees scoring rules
|
|
162
162
|
*/
|
|
163
|
-
export interface
|
|
163
|
+
export interface AssessmentScoringResult {
|
|
164
164
|
/** Item identifier */
|
|
165
165
|
itemIdentifier: string;
|
|
166
166
|
/** Normalized score 0.0-1.0 */
|
|
@@ -187,11 +187,11 @@ export interface FeedbackItem {
|
|
|
187
187
|
*
|
|
188
188
|
* Security: State includes responses but not scores (until finalized)
|
|
189
189
|
*/
|
|
190
|
-
export interface
|
|
190
|
+
export interface SaveAssessmentStateRequest {
|
|
191
191
|
sessionId: SessionId;
|
|
192
|
-
state:
|
|
192
|
+
state: AssessmentSessionState;
|
|
193
193
|
}
|
|
194
|
-
export interface
|
|
194
|
+
export interface SaveAssessmentStateResponse {
|
|
195
195
|
success: boolean;
|
|
196
196
|
/** Server timestamp of save */
|
|
197
197
|
savedAt: number;
|
|
@@ -199,7 +199,7 @@ export interface SaveStateResponse {
|
|
|
199
199
|
/**
|
|
200
200
|
* Session state for persistence
|
|
201
201
|
*/
|
|
202
|
-
export interface
|
|
202
|
+
export interface AssessmentSessionState {
|
|
203
203
|
/** Current item identifier */
|
|
204
204
|
currentItemIdentifier: string;
|
|
205
205
|
/** Visited items (for navigation) */
|
|
@@ -207,7 +207,7 @@ export interface SessionState {
|
|
|
207
207
|
/** Submitted responses per item */
|
|
208
208
|
itemResponses: Record<string, Record<string, ResponseValue>>;
|
|
209
209
|
/** Scoring results per item (populated after submission) */
|
|
210
|
-
itemScores?: Record<string,
|
|
210
|
+
itemScores?: Record<string, AssessmentScoringResult>;
|
|
211
211
|
/** Time tracking */
|
|
212
212
|
timing: {
|
|
213
213
|
/** Session start time */
|
|
@@ -233,7 +233,7 @@ export interface FinalizeAssessmentResponse {
|
|
|
233
233
|
/** Maximum possible score */
|
|
234
234
|
maxScore: number;
|
|
235
235
|
/** Per-item results */
|
|
236
|
-
itemScores: Record<string,
|
|
236
|
+
itemScores: Record<string, AssessmentScoringResult>;
|
|
237
237
|
/** Assessment-level feedback */
|
|
238
238
|
feedback?: string;
|
|
239
239
|
/** Server timestamp */
|
|
@@ -300,7 +300,7 @@ export interface BackendAdapter {
|
|
|
300
300
|
/**
|
|
301
301
|
* Save session state (auto-save during assessment)
|
|
302
302
|
*/
|
|
303
|
-
saveState(request:
|
|
303
|
+
saveState(request: SaveAssessmentStateRequest): Promise<SaveAssessmentStateResponse>;
|
|
304
304
|
/**
|
|
305
305
|
* Finalize assessment and get results
|
|
306
306
|
*/
|
|
@@ -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,
|
|
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,CA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O,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"}
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
*
|
|
43
43
|
* See BACKEND-INTEGRATION.md for complete implementation guide.
|
|
44
44
|
*/
|
|
45
|
-
export type { BackendAdapter, FeedbackItem, FinalizeAssessmentRequest, FinalizeAssessmentResponse, InitSessionRequest, InitSessionResponse, ResponseValue,
|
|
45
|
+
export type { BackendAdapter, FeedbackItem, AssessmentSessionState, AssessmentScoringResult, AssessmentRubricBlock, FinalizeAssessmentRequest, FinalizeAssessmentResponse, InitSessionRequest, InitSessionResponse, ResponseValue, SaveAssessmentStateRequest, SaveAssessmentStateResponse, SecureAssessment, SecureItemRef, SecureSection, SecureTestPart, SessionId, SubmitResponsesRequest, SubmitResponsesResponse, } from './api-contract.js';
|
|
46
46
|
export { ReferenceBackendAdapter } from './ReferenceBackendAdapter.js';
|
|
47
47
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,YAAY,EACX,cAAc,EACd,YAAY,EACZ,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,YAAY,EACX,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,SAAS,EACT,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,OAAO,GAAG,OAAO,sBAAsB,EAAE,OAAO,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,OAAO,GAAG,OAAO,sBAAsB,EAAE,OAAO,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,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