@pie-qti/assessment-player 0.1.1 → 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 +30 -8
- package/dist/core/AssessmentPlayer.d.ts.map +1 -1
- package/dist/core/AssessmentPlayer.js +134 -40
- 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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/integration/ReferenceBackendAdapter.d.ts +28 -2
- package/dist/integration/ReferenceBackendAdapter.d.ts.map +1 -1
- package/dist/integration/ReferenceBackendAdapter.js +385 -15
- package/dist/integration/api-contract.d.ts +88 -17
- 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/components/index.ts +1 -1
- package/src/core/AssessmentPlayer.ts +164 -51
- package/src/core/TimeManager.ts +20 -3
- package/src/index.ts +1 -1
- package/src/integration/ReferenceBackendAdapter.ts +454 -23
- package/src/integration/api-contract.ts +89 -17
- 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
|
@@ -41,13 +41,24 @@ 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
|
|
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,13 +73,26 @@ 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;
|
|
68
92
|
/** Sections contain items */
|
|
69
93
|
sections: SecureSection[];
|
|
70
94
|
/** Candidate instructions (safe for display) */
|
|
71
|
-
|
|
95
|
+
rubricBlocks?: AssessmentRubricBlock[];
|
|
72
96
|
/**
|
|
73
97
|
* Item session control (QTI testPart/itemSessionControl).
|
|
74
98
|
* Server is authoritative; client uses this for UI hints only.
|
|
@@ -88,14 +112,43 @@ export interface SecureSection {
|
|
|
88
112
|
title?: string;
|
|
89
113
|
/** Visible determines if section appears in navigation */
|
|
90
114
|
visible: boolean;
|
|
91
|
-
/**
|
|
92
|
-
|
|
115
|
+
/** Assessment item references (order reflects selection/ordering already applied server-side) */
|
|
116
|
+
assessmentItemRefs: SecureItemRef[];
|
|
93
117
|
/** Section-level time limit */
|
|
94
118
|
timeLimits?: {
|
|
95
119
|
maxTime?: number;
|
|
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,8 +159,20 @@ 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
|
-
export interface
|
|
175
|
+
export interface AssessmentRubricBlock {
|
|
111
176
|
/** Optional rubric identifier (QTI rubricBlock@identifier) */
|
|
112
177
|
identifier?: string;
|
|
113
178
|
/** Rubric content (HTML) */
|
|
@@ -141,7 +206,7 @@ export interface SubmitResponsesResponse {
|
|
|
141
206
|
/** Was submission accepted? */
|
|
142
207
|
success: boolean;
|
|
143
208
|
/** Scoring result (if submission mode allows immediate scoring) */
|
|
144
|
-
result?:
|
|
209
|
+
result?: AssessmentScoringResult;
|
|
145
210
|
/**
|
|
146
211
|
* Backend-authoritative next item (branching/navigation decision).
|
|
147
212
|
* If omitted, client may fall back to linear next/previous UI navigation.
|
|
@@ -151,7 +216,7 @@ export interface SubmitResponsesResponse {
|
|
|
151
216
|
* Backend-authoritative session state snapshot after applying the submission.
|
|
152
217
|
* If provided, client should replace its local state with this.
|
|
153
218
|
*/
|
|
154
|
-
updatedState?:
|
|
219
|
+
updatedState?: AssessmentSessionState;
|
|
155
220
|
/** Error message if success=false */
|
|
156
221
|
error?: string;
|
|
157
222
|
}
|
|
@@ -160,7 +225,7 @@ export interface SubmitResponsesResponse {
|
|
|
160
225
|
*
|
|
161
226
|
* Security: Server computes this, client never sees scoring rules
|
|
162
227
|
*/
|
|
163
|
-
export interface
|
|
228
|
+
export interface AssessmentScoringResult {
|
|
164
229
|
/** Item identifier */
|
|
165
230
|
itemIdentifier: string;
|
|
166
231
|
/** Normalized score 0.0-1.0 */
|
|
@@ -187,11 +252,11 @@ export interface FeedbackItem {
|
|
|
187
252
|
*
|
|
188
253
|
* Security: State includes responses but not scores (until finalized)
|
|
189
254
|
*/
|
|
190
|
-
export interface
|
|
255
|
+
export interface SaveAssessmentStateRequest {
|
|
191
256
|
sessionId: SessionId;
|
|
192
|
-
state:
|
|
257
|
+
state: AssessmentSessionState;
|
|
193
258
|
}
|
|
194
|
-
export interface
|
|
259
|
+
export interface SaveAssessmentStateResponse {
|
|
195
260
|
success: boolean;
|
|
196
261
|
/** Server timestamp of save */
|
|
197
262
|
savedAt: number;
|
|
@@ -199,7 +264,7 @@ export interface SaveStateResponse {
|
|
|
199
264
|
/**
|
|
200
265
|
* Session state for persistence
|
|
201
266
|
*/
|
|
202
|
-
export interface
|
|
267
|
+
export interface AssessmentSessionState {
|
|
203
268
|
/** Current item identifier */
|
|
204
269
|
currentItemIdentifier: string;
|
|
205
270
|
/** Visited items (for navigation) */
|
|
@@ -207,7 +272,7 @@ export interface SessionState {
|
|
|
207
272
|
/** Submitted responses per item */
|
|
208
273
|
itemResponses: Record<string, Record<string, ResponseValue>>;
|
|
209
274
|
/** Scoring results per item (populated after submission) */
|
|
210
|
-
itemScores?: Record<string,
|
|
275
|
+
itemScores?: Record<string, AssessmentScoringResult>;
|
|
211
276
|
/** Time tracking */
|
|
212
277
|
timing: {
|
|
213
278
|
/** Session start time */
|
|
@@ -233,9 +298,15 @@ export interface FinalizeAssessmentResponse {
|
|
|
233
298
|
/** Maximum possible score */
|
|
234
299
|
maxScore: number;
|
|
235
300
|
/** Per-item results */
|
|
236
|
-
itemScores: Record<string,
|
|
237
|
-
/** Assessment-level feedback */
|
|
301
|
+
itemScores: Record<string, AssessmentScoringResult>;
|
|
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
|
}
|
|
@@ -300,7 +371,7 @@ export interface BackendAdapter {
|
|
|
300
371
|
/**
|
|
301
372
|
* Save session state (auto-save during assessment)
|
|
302
373
|
*/
|
|
303
|
-
saveState(request:
|
|
374
|
+
saveState(request: SaveAssessmentStateRequest): Promise<SaveAssessmentStateResponse>;
|
|
304
375
|
/**
|
|
305
376
|
* Finalize assessment and get results
|
|
306
377
|
*/
|
|
@@ -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,E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AEnE;;;;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,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,aAA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|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
2
|
+
"name": "@pie-qti/assessment-player",
|
|
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
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"test": "bun test --preload ./tests/setup.ts",
|
|
11
|
+
"typecheck": "tsc --noEmit",
|
|
12
|
+
"check": "svelte-check --tsconfig ./tsconfig.svelte.json",
|
|
13
|
+
"lint": "biome check .",
|
|
14
|
+
"lint:fix": "biome check --write .",
|
|
15
|
+
"format": "biome format --write ."
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"qti",
|
|
19
|
+
"qti2",
|
|
20
|
+
"qti3",
|
|
21
|
+
"qti 2.x",
|
|
22
|
+
"qti 3.0",
|
|
23
|
+
"assessment",
|
|
24
|
+
"test",
|
|
25
|
+
"player",
|
|
26
|
+
"navigation",
|
|
27
|
+
"e-learning"
|
|
28
|
+
],
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"dependencies": {
|
|
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
|
+
"node-html-parser": "^7.0.2"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"svelte": "^5.54.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@biomejs/biome": "^2.4.8",
|
|
42
|
+
"@types/node": "^25.0.3",
|
|
43
|
+
"svelte": "^5.54.0",
|
|
44
|
+
"svelte-check": "^4.3.5",
|
|
45
|
+
"typescript": "^5.9.3"
|
|
46
|
+
},
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"types": "./dist/index.d.ts",
|
|
50
|
+
"import": "./dist/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./integration": {
|
|
53
|
+
"types": "./dist/integration/index.d.ts",
|
|
54
|
+
"import": "./dist/integration/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./components": {
|
|
57
|
+
"types": "./src/components/index.ts",
|
|
58
|
+
"import": "./src/components/index.ts",
|
|
59
|
+
"svelte": "./src/components/index.ts"
|
|
60
|
+
},
|
|
61
|
+
"./components/AssessmentShell.svelte": {
|
|
62
|
+
"import": "./src/components/AssessmentShell.svelte",
|
|
63
|
+
"svelte": "./src/components/AssessmentShell.svelte"
|
|
64
|
+
},
|
|
65
|
+
"./components/NavigationBar.svelte": {
|
|
66
|
+
"import": "./src/components/NavigationBar.svelte",
|
|
67
|
+
"svelte": "./src/components/NavigationBar.svelte"
|
|
68
|
+
},
|
|
69
|
+
"./components/SectionMenu.svelte": {
|
|
70
|
+
"import": "./src/components/SectionMenu.svelte",
|
|
71
|
+
"svelte": "./src/components/SectionMenu.svelte"
|
|
72
|
+
},
|
|
73
|
+
"./components/RubricDisplay.svelte": {
|
|
74
|
+
"import": "./src/components/RubricDisplay.svelte",
|
|
75
|
+
"svelte": "./src/components/RubricDisplay.svelte"
|
|
76
|
+
},
|
|
77
|
+
"./components/ItemRenderer.svelte": {
|
|
78
|
+
"import": "./src/components/ItemRenderer.svelte",
|
|
79
|
+
"svelte": "./src/components/ItemRenderer.svelte"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "https://github.com/pie-framework/pie-qti.git",
|
|
85
|
+
"directory": "packages/assessment-player"
|
|
86
|
+
},
|
|
87
|
+
"homepage": "https://github.com/pie-framework/pie-qti/tree/master/packages/assessment-player",
|
|
88
|
+
"bugs": {
|
|
89
|
+
"url": "https://github.com/pie-framework/pie-qti/issues"
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
},
|
|
94
|
+
"sideEffects": false,
|
|
95
|
+
"engines": {
|
|
96
|
+
"node": ">=20.19.0"
|
|
97
|
+
},
|
|
98
|
+
"files": [
|
|
99
|
+
"dist",
|
|
100
|
+
"src"
|
|
101
|
+
]
|
|
82
102
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
currentSection: undefined,
|
|
44
44
|
totalSections: undefined,
|
|
45
45
|
});
|
|
46
|
-
let
|
|
46
|
+
let currentItem = $state<any>(null);
|
|
47
47
|
let currentRubricBlocks = $state<any[]>([]);
|
|
48
48
|
let currentResponses = $state<Record<string, unknown>>({});
|
|
49
49
|
let sections = $state<any[]>([]);
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
if (!player) return;
|
|
163
163
|
|
|
164
164
|
navState = player.getNavigationState();
|
|
165
|
-
|
|
165
|
+
currentItem = player.getCurrentItem();
|
|
166
166
|
currentRubricBlocks = player.getCurrentRubricBlocks();
|
|
167
167
|
currentResponses = player.getResponses();
|
|
168
168
|
}
|
|
@@ -257,8 +257,8 @@
|
|
|
257
257
|
|
|
258
258
|
function handleResponseChange(responseId: string, value: unknown) {
|
|
259
259
|
if (!player) return;
|
|
260
|
-
if (
|
|
261
|
-
player.updateResponseForItem(
|
|
260
|
+
if (currentItem?.identifier) {
|
|
261
|
+
player.updateResponseForItem(currentItem.identifier, responseId, value);
|
|
262
262
|
} else {
|
|
263
263
|
player.updateResponse(responseId, value);
|
|
264
264
|
}
|
|
@@ -387,9 +387,9 @@
|
|
|
387
387
|
<RubricDisplay blocks={nonPassageRubricBlocks} {typeset} />
|
|
388
388
|
{/if}
|
|
389
389
|
|
|
390
|
-
{#if
|
|
390
|
+
{#if currentItem}
|
|
391
391
|
<ItemRenderer
|
|
392
|
-
|
|
392
|
+
itemRef={currentItem}
|
|
393
393
|
responses={currentResponses}
|
|
394
394
|
role={config.role || 'candidate'}
|
|
395
395
|
extendedTextEditor={config.extendedTextEditor || 'tiptap'}
|
|
@@ -407,9 +407,9 @@
|
|
|
407
407
|
{/if}
|
|
408
408
|
|
|
409
409
|
<!-- Current item -->
|
|
410
|
-
{#if
|
|
410
|
+
{#if currentItem}
|
|
411
411
|
<ItemRenderer
|
|
412
|
-
|
|
412
|
+
itemRef={currentItem}
|
|
413
413
|
responses={currentResponses}
|
|
414
414
|
role={config.role || 'candidate'}
|
|
415
415
|
onResponseChange={handleResponseChange}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { Player, type PlayerSecurityConfig, type QTIRole } from '@pie-qti/item-player';
|
|
7
7
|
import type { I18nProvider } from '@pie-qti/i18n';
|
|
8
8
|
import { onMount } from 'svelte';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ItemRef } from '../types/index.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Ensure default interaction web components are registered (browser-only).
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
interface Props {
|
|
33
|
-
|
|
33
|
+
itemRef: ItemRef;
|
|
34
34
|
role?: QTIRole;
|
|
35
35
|
extendedTextEditor?: string;
|
|
36
36
|
/** Responses for the current item (keyed by responseIdentifier). */
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const {
|
|
48
|
-
|
|
48
|
+
itemRef,
|
|
49
49
|
role = 'candidate',
|
|
50
50
|
extendedTextEditor: _extendedTextEditor,
|
|
51
51
|
responses = {},
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
security,
|
|
56
56
|
}: Props = $props();
|
|
57
57
|
|
|
58
|
-
// Derive player from
|
|
58
|
+
// Derive player from itemRef
|
|
59
59
|
let playerData = $derived.by(() => {
|
|
60
|
-
if (!
|
|
60
|
+
if (!itemRef.itemXml) {
|
|
61
61
|
return { player: null, error: 'No item XML provided' };
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
try {
|
|
65
65
|
const newPlayer = new Player({
|
|
66
|
-
itemXml:
|
|
66
|
+
itemXml: itemRef.itemXml,
|
|
67
67
|
role,
|
|
68
68
|
security,
|
|
69
69
|
});
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
</div>
|
|
116
116
|
{:else}
|
|
117
117
|
<div class="item-container">
|
|
118
|
-
{#if
|
|
118
|
+
{#if itemRef.title}
|
|
119
119
|
<div class="item-header">
|
|
120
|
-
<h3 class="text-lg font-semibold mb-4">{
|
|
120
|
+
<h3 class="text-lg font-semibold mb-4">{itemRef.title}</h3>
|
|
121
121
|
</div>
|
|
122
122
|
{/if}
|
|
123
123
|
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
<div class="navigation-buttons">
|
|
57
57
|
<button
|
|
58
58
|
class="btn btn-outline"
|
|
59
|
+
data-testid="assessment-prev"
|
|
59
60
|
onclick={() => onPrevious?.()}
|
|
60
61
|
disabled={!navState.canPrevious || navState.isLoading}
|
|
61
62
|
>
|
|
@@ -75,13 +76,14 @@
|
|
|
75
76
|
|
|
76
77
|
{#if navState.currentIndex === navState.totalItems - 1}
|
|
77
78
|
<!-- Submit button on last item -->
|
|
78
|
-
<button class="btn btn-primary" onclick={() => onSubmit?.()} disabled={navState.isLoading}>
|
|
79
|
+
<button class="btn btn-primary" data-testid="assessment-submit" onclick={() => onSubmit?.()} disabled={navState.isLoading}>
|
|
79
80
|
{translations.submit}
|
|
80
81
|
</button>
|
|
81
82
|
{:else}
|
|
82
83
|
<!-- Next button -->
|
|
83
84
|
<button
|
|
84
85
|
class="btn btn-primary"
|
|
86
|
+
data-testid="assessment-next"
|
|
85
87
|
onclick={() => onNext?.()}
|
|
86
88
|
disabled={!navState.canNext || navState.isLoading}
|
|
87
89
|
>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { typesetAction } from '@pie-qti/default-components/shared';
|
|
3
3
|
import type { I18nProvider } from '@pie-qti/i18n';
|
|
4
|
-
import type {
|
|
4
|
+
import type { AssessmentRubricBlock } from '../integration/api-contract.js';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
blocks:
|
|
7
|
+
blocks: AssessmentRubricBlock[];
|
|
8
8
|
collapsed?: boolean;
|
|
9
9
|
i18n?: I18nProvider;
|
|
10
10
|
/** Math typesetting function (KaTeX, MathJax, etc.) */
|
package/src/components/index.ts
CHANGED