@learnosity/lib-qti-converter 0.15.1 → 0.16.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.
Files changed (31) hide show
  1. package/README.md +57 -9
  2. package/docs/EXAMPLES.md +4 -2
  3. package/docs/FAQ.md +20 -0
  4. package/docs/GETTING_STARTED.md +1 -1
  5. package/docs/SUPPORTED_INTERACTIONS.md +1 -1
  6. package/package.json +1 -1
  7. package/packages/cli/dist/{batchProcessors-B6yUImA3.js → batchProcessors-C7czhqX0.js} +73 -10
  8. package/packages/cli/dist/batchProcessors-C7czhqX0.js.map +1 -0
  9. package/packages/cli/dist/batchWorker.js +1 -1
  10. package/packages/cli/dist/{learnosityToQti-DIxeAztu.js → learnosityToQti-D4ddrXaz.js} +4 -4
  11. package/packages/cli/dist/{learnosityToQti-DIxeAztu.js.map → learnosityToQti-D4ddrXaz.js.map} +1 -1
  12. package/packages/cli/dist/{learnosityToQtiPackage-CMFop6H4.js → learnosityToQtiPackage-Bwzm-uLX.js} +5 -5
  13. package/packages/cli/dist/learnosityToQtiPackage-Bwzm-uLX.js.map +1 -0
  14. package/packages/cli/dist/main.js +4 -4
  15. package/packages/cli/dist/{pathUtils-6nZKvVmg.js → pathUtils-D_VsVde8.js} +2 -2
  16. package/packages/cli/dist/{pathUtils-6nZKvVmg.js.map → pathUtils-D_VsVde8.js.map} +1 -1
  17. package/packages/cli/dist/{qtiPackageToLearnosity-Sk_1j12c.js → qtiPackageToLearnosity-CX9htPId.js} +4 -4
  18. package/packages/cli/dist/{qtiPackageToLearnosity-Sk_1j12c.js.map → qtiPackageToLearnosity-CX9htPId.js.map} +1 -1
  19. package/packages/cli/dist/{qtiToLearnosity-_tybImv1.js → qtiToLearnosity-JQYOkNbM.js} +4 -4
  20. package/packages/cli/dist/{qtiToLearnosity-_tybImv1.js.map → qtiToLearnosity-JQYOkNbM.js.map} +1 -1
  21. package/packages/cli/dist/{resolveOptions-6ReJUr-D.js → resolveOptions-BuNN2KMA.js} +3 -3
  22. package/packages/cli/dist/{resolveOptions-6ReJUr-D.js.map → resolveOptions-BuNN2KMA.js.map} +1 -1
  23. package/packages/cli/dist/{table-CLUiytPO.js → table-DsKq-B4-.js} +6001 -2970
  24. package/packages/cli/dist/table-DsKq-B4-.js.map +1 -0
  25. package/packages/core/dist/index.d.ts +28 -1
  26. package/packages/core/dist/index.js +6013 -2973
  27. package/packages/core/dist/node.d.ts +28 -1
  28. package/packages/core/dist/node.js +3882 -788
  29. package/packages/cli/dist/batchProcessors-B6yUImA3.js.map +0 -1
  30. package/packages/cli/dist/learnosityToQtiPackage-CMFop6H4.js.map +0 -1
  31. package/packages/cli/dist/table-CLUiytPO.js.map +0 -1
@@ -137,6 +137,7 @@ export declare const DiagnosticCode: {
137
137
  readonly CONTENT_REMOTE_ASSET_NOT_PACKAGED: "CONTENT_REMOTE_ASSET_NOT_PACKAGED";
138
138
  readonly CONTENT_SIMPLE_FEATURE_CONVERTED: "CONTENT_SIMPLE_FEATURE_CONVERTED";
139
139
  readonly CONTENT_HTML_STIMULUS_WRAPPED: "CONTENT_HTML_STIMULUS_WRAPPED";
140
+ readonly CONTENT_ATTRIBUTE_STRIPPED: "CONTENT_ATTRIBUTE_STRIPPED";
140
141
  readonly QTI_NO_CHOICES: "QTI_NO_CHOICES";
141
142
  readonly QTI_NO_CORRECT_RESPONSE: "QTI_NO_CORRECT_RESPONSE";
142
143
  readonly QTI_MISSING_INTERACTION: "QTI_MISSING_INTERACTION";
@@ -1910,6 +1911,8 @@ export interface QtiGapImg {
1910
1911
  objectType: string;
1911
1912
  altText: string;
1912
1913
  matchMax: number;
1914
+ width?: number | string;
1915
+ height?: number | string;
1913
1916
  }
1914
1917
  /**
1915
1918
  * Directed pair (zone-choice pairing)
@@ -2108,6 +2111,13 @@ export interface QtiResponseProcessing {
2108
2111
  templateUrl?: string;
2109
2112
  ruleGroups?: QtiResponseCondition[];
2110
2113
  penaltyValue?: number;
2114
+ /**
2115
+ * When set, response processing also copies this response variable into the
2116
+ * FEEDBACK outcome so each choice's nested <feedbackBlock> displays when that
2117
+ * choice is selected. A template reference cannot carry extra rules, so the
2118
+ * serializer writes the template out as explicit rules in this case.
2119
+ */
2120
+ feedbackResponseIdentifier?: string;
2111
2121
  }
2112
2122
  /**
2113
2123
  * Response condition (if/elseif/else structure)
@@ -2266,7 +2276,10 @@ export interface QtiAssessmentSection {
2266
2276
  visible: boolean;
2267
2277
  /** Item references in this section */
2268
2278
  itemRefs: QtiItemRef[];
2269
- /** Whether to shuffle items within this section */
2279
+ /**
2280
+ * Whether to shuffle items within this section. QTI has no `shuffle` attribute
2281
+ * on assessmentSection; this is emitted as a child `<ordering shuffle="true"/>`.
2282
+ */
2270
2283
  shuffle?: boolean;
2271
2284
  /** Optional time limits for this section */
2272
2285
  timeLimits?: QtiTimeLimits;
@@ -2532,6 +2545,20 @@ export declare function serializeAssessmentItem(ast: QtiAssessmentItem, options?
2532
2545
  xml?: string;
2533
2546
  diagnostics: Diagnostic[];
2534
2547
  };
2548
+ /**
2549
+ * `id` attributes on content elements must be unique, valid identifiers. Authored
2550
+ * HTML often repeats an id (id="equationview" on every equation image) or uses
2551
+ * characters that identifiers cannot contain (id="trial_1_(grams)"). Invalid
2552
+ * characters become `_` and an id that starts with a digit or hyphen gets an `id_`
2553
+ * prefix; the new name never takes an id already used in the item (a numeric suffix
2554
+ * is added). A later repeat of the same id is removed. Id references (`headers`, `for`,
2555
+ * `aria-describedby` and the other ARIA id lists, `href="#..."`) follow any rename.
2556
+ * This is the only place ids are rewritten, so references stay consistent.
2557
+ */
2558
+ export declare function fixElementIds(xml: string): {
2559
+ xml: string;
2560
+ changes: number;
2561
+ };
2535
2562
  //#endregion
2536
2563
  //#region src/qti-serializer/serializeAssessmentTest.d.ts
2537
2564
  export interface SerializeTestOptions {