@longsightgroup/qti3-player 0.3.0 → 0.4.0

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 CHANGED
@@ -39,6 +39,13 @@ player?.addEventListener("qti-statechange", (event) => {
39
39
  });
40
40
  ```
41
41
 
42
+ ## Scoring Trust Boundary
43
+
44
+ The player can score attempts locally through `@longsightgroup/qti3-core`, but browser
45
+ scoring is a convenience for validation, feedback, previews, and response snapshots.
46
+ High-stakes assessment systems must treat browser outcomes as untrusted and recompute
47
+ scores server-side from authoritative QTI XML and trusted response variables.
48
+
42
49
  ## Player Chrome Messages
43
50
 
44
51
  The player keeps authored QTI content language separate from player chrome such as
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longsightgroup/qti3-player",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Style-neutral web component player for rendering and scoring QTI 3 assessment items.",
5
5
  "keywords": [
6
6
  "assessment",
@@ -45,8 +45,8 @@
45
45
  "registry": "https://registry.npmjs.org"
46
46
  },
47
47
  "dependencies": {
48
- "@longsightgroup/qti3-fixtures": "0.3.0",
49
- "@longsightgroup/qti3-core": "0.3.0"
48
+ "@longsightgroup/qti3-core": "0.4.0",
49
+ "@longsightgroup/qti3-fixtures": "0.4.0"
50
50
  },
51
51
  "scripts": {}
52
52
  }
@@ -36,7 +36,18 @@ export function isFeedbackVisible(
36
36
  return node.showHide === "show" ? hasIdentifier : !hasIdentifier;
37
37
  }
38
38
 
39
- export function isTemplateContentVisible(element: HTMLElement, value: QtiValue): boolean {
39
+ interface TemplateContentVisibilityElement {
40
+ dataset: {
41
+ templateIdentifier?: string;
42
+ templateValueIdentifier?: string;
43
+ showHide?: string;
44
+ };
45
+ }
46
+
47
+ export function isTemplateContentVisible(
48
+ element: TemplateContentVisibilityElement,
49
+ value: QtiValue,
50
+ ): boolean {
40
51
  const templateIdentifier = element.dataset.templateIdentifier;
41
52
  const identifier = element.dataset.templateValueIdentifier;
42
53
  if (!templateIdentifier || !identifier) return true;