@learnosity/lib-qti-converter 0.12.6 → 0.12.8
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/package.json +10 -9
- package/packages/cli/dist/batchProcessors-CUJoQD8a.js +3753 -0
- package/packages/cli/dist/batchProcessors-CUJoQD8a.js.map +1 -0
- package/packages/cli/dist/batchWorker.js +1 -1
- package/packages/cli/dist/{create-prompt-DU9wLVhI.js → create-prompt-DyNnKXYU.js} +63 -53
- package/packages/cli/dist/create-prompt-DyNnKXYU.js.map +1 -0
- package/packages/cli/dist/{dist-DjpU2mIj.js → dist-D3v6G5F8.js} +6 -6
- package/packages/cli/dist/{dist-DjpU2mIj.js.map → dist-D3v6G5F8.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js → learnosityToQti-CvfVQ6Kl.js} +4 -4
- package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js.map → learnosityToQti-CvfVQ6Kl.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js → learnosityToQtiPackage-CXMsJNQD.js} +7 -8
- package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js.map → learnosityToQtiPackage-CXMsJNQD.js.map} +1 -1
- package/packages/cli/dist/main.js +7 -7
- package/packages/cli/dist/main.js.map +1 -1
- package/packages/cli/dist/nodeFileAccess-BhCoGDOi.js +294 -0
- package/packages/cli/dist/nodeFileAccess-BhCoGDOi.js.map +1 -0
- package/packages/cli/dist/{pathUtils-CgoDQyJk.js → pathUtils-DmtCfutO.js} +27 -167
- package/packages/cli/dist/pathUtils-DmtCfutO.js.map +1 -0
- package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js → qtiPackageToLearnosity-FhfNr7gf.js} +5 -5
- package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js.map → qtiPackageToLearnosity-FhfNr7gf.js.map} +1 -1
- package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js → qtiToLearnosity-5lQ5f3-t.js} +5 -5
- package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js.map → qtiToLearnosity-5lQ5f3-t.js.map} +1 -1
- package/packages/cli/dist/resolveOptions-lHxSyq9F.js +2879 -0
- package/packages/cli/dist/resolveOptions-lHxSyq9F.js.map +1 -0
- package/packages/cli/dist/{resolveOptions-ehwJSkQy.js → table-7b-8MN2z.js} +2520 -2883
- package/packages/cli/dist/table-7b-8MN2z.js.map +1 -0
- package/packages/core/dist/index.d.ts +184 -184
- package/packages/core/dist/index.js +90 -64
- package/packages/core/dist/node.d.ts +196 -196
- package/packages/core/dist/node.js +95 -66
- package/packages/cli/dist/batchProcessors-C8k2v0o_.js +0 -217
- package/packages/cli/dist/batchProcessors-C8k2v0o_.js.map +0 -1
- package/packages/cli/dist/create-prompt-DU9wLVhI.js.map +0 -1
- package/packages/cli/dist/pathUtils-CgoDQyJk.js.map +0 -1
- package/packages/cli/dist/resolveOptions-ehwJSkQy.js.map +0 -1
- package/packages/cli/dist/table-DYcNeyJ_.js +0 -2306
- package/packages/cli/dist/table-DYcNeyJ_.js.map +0 -1
|
@@ -53,7 +53,7 @@ type DiagnosticLevel = 'error' | 'warning' | 'info';
|
|
|
53
53
|
/**
|
|
54
54
|
* Common diagnostic codes
|
|
55
55
|
*/
|
|
56
|
-
declare const DiagnosticCode: {
|
|
56
|
+
export declare const DiagnosticCode: {
|
|
57
57
|
readonly NOT_IMPLEMENTED: "NOT_IMPLEMENTED";
|
|
58
58
|
readonly CONFIG_FILE_NOT_FOUND: "CONFIG_FILE_NOT_FOUND";
|
|
59
59
|
readonly CONFIG_FILE_INVALID_JSON: "CONFIG_FILE_INVALID_JSON";
|
|
@@ -313,7 +313,7 @@ interface FormatDiagnosticsReportOptions {
|
|
|
313
313
|
/**
|
|
314
314
|
* Format diagnostics array into structured report with metadata
|
|
315
315
|
*/
|
|
316
|
-
declare function formatDiagnosticsReport(diagnostics: Diagnostic[], options: FormatDiagnosticsReportOptions): DiagnosticsReport;
|
|
316
|
+
export declare function formatDiagnosticsReport(diagnostics: Diagnostic[], options: FormatDiagnosticsReportOptions): DiagnosticsReport;
|
|
317
317
|
//#endregion
|
|
318
318
|
//#region src/utils/diagnosticHelpers.d.ts
|
|
319
319
|
/**
|
|
@@ -329,7 +329,7 @@ declare function formatDiagnosticsReport(diagnostics: Diagnostic[], options: For
|
|
|
329
329
|
* const contextual = addFileContext(parsed.diagnostics, 'item_001.xml');
|
|
330
330
|
* allDiagnostics.push(...contextual);
|
|
331
331
|
*/
|
|
332
|
-
declare function addFileContext(diagnostics: Diagnostic[], sourceFile: string): Diagnostic[];
|
|
332
|
+
export declare function addFileContext(diagnostics: Diagnostic[], sourceFile: string): Diagnostic[];
|
|
333
333
|
/**
|
|
334
334
|
* Add file context to diagnostics if sourceFile is provided
|
|
335
335
|
* Convenience wrapper for optional file context
|
|
@@ -343,7 +343,7 @@ declare function addFileContext(diagnostics: Diagnostic[], sourceFile: string):
|
|
|
343
343
|
* const contextual = addFileContextIfProvided(parsed.diagnostics, opts.sourceFile);
|
|
344
344
|
* allDiagnostics.push(...contextual);
|
|
345
345
|
*/
|
|
346
|
-
declare function addFileContextIfProvided(diagnostics: Diagnostic[], sourceFile?: string): Diagnostic[];
|
|
346
|
+
export declare function addFileContextIfProvided(diagnostics: Diagnostic[], sourceFile?: string): Diagnostic[];
|
|
347
347
|
/**
|
|
348
348
|
* Check if diagnostics contain any errors
|
|
349
349
|
*
|
|
@@ -355,7 +355,7 @@ declare function addFileContextIfProvided(diagnostics: Diagnostic[], sourceFile?
|
|
|
355
355
|
* return { diagnostics };
|
|
356
356
|
* }
|
|
357
357
|
*/
|
|
358
|
-
declare function hasErrors(diagnostics: Diagnostic[]): boolean;
|
|
358
|
+
export declare function hasErrors(diagnostics: Diagnostic[]): boolean;
|
|
359
359
|
/**
|
|
360
360
|
* Filter diagnostics by level
|
|
361
361
|
*
|
|
@@ -367,7 +367,7 @@ declare function hasErrors(diagnostics: Diagnostic[]): boolean;
|
|
|
367
367
|
* const errors = filterByLevel(diagnostics, 'error');
|
|
368
368
|
* const warnings = filterByLevel(diagnostics, 'warning');
|
|
369
369
|
*/
|
|
370
|
-
declare function filterByLevel(diagnostics: Diagnostic[], level: 'error' | 'warning' | 'info'): Diagnostic[];
|
|
370
|
+
export declare function filterByLevel(diagnostics: Diagnostic[], level: 'error' | 'warning' | 'info'): Diagnostic[];
|
|
371
371
|
/**
|
|
372
372
|
* Filter diagnostics by code
|
|
373
373
|
*
|
|
@@ -379,7 +379,7 @@ declare function filterByLevel(diagnostics: Diagnostic[], level: 'error' | 'warn
|
|
|
379
379
|
* // Filter out redundant diagnostics
|
|
380
380
|
* const filtered = filterOutCodes(diagnostics, ['QTI_UNSUPPORTED_INTERACTION', 'QTI_MISSING_INTERACTION']);
|
|
381
381
|
*/
|
|
382
|
-
declare function filterOutCodes(diagnostics: Diagnostic[], codes: string[]): Diagnostic[];
|
|
382
|
+
export declare function filterOutCodes(diagnostics: Diagnostic[], codes: string[]): Diagnostic[];
|
|
383
383
|
/**
|
|
384
384
|
* Count diagnostics by level
|
|
385
385
|
*
|
|
@@ -390,7 +390,7 @@ declare function filterOutCodes(diagnostics: Diagnostic[], codes: string[]): Dia
|
|
|
390
390
|
* const counts = countByLevel(diagnostics);
|
|
391
391
|
* console.log(`Errors: ${counts.errors}, Warnings: ${counts.warnings}`);
|
|
392
392
|
*/
|
|
393
|
-
declare function countByLevel(diagnostics: Diagnostic[]): {
|
|
393
|
+
export declare function countByLevel(diagnostics: Diagnostic[]): {
|
|
394
394
|
errors: number;
|
|
395
395
|
warnings: number;
|
|
396
396
|
info: number;
|
|
@@ -408,7 +408,7 @@ declare function countByLevel(diagnostics: Diagnostic[]): {
|
|
|
408
408
|
* @example
|
|
409
409
|
* diagnostics.push(createDiagnostic('error', 'QTI_INVALID_XML', 'Malformed XML', 'item.xml'));
|
|
410
410
|
*/
|
|
411
|
-
declare function createDiagnostic(level: 'error' | 'warning' | 'info', code: string, message: string, file: string, context?: Record<string, unknown>): Diagnostic;
|
|
411
|
+
export declare function createDiagnostic(level: 'error' | 'warning' | 'info', code: string, message: string, file: string, context?: Record<string, unknown>): Diagnostic;
|
|
412
412
|
/**
|
|
413
413
|
* Merge multiple diagnostic arrays
|
|
414
414
|
*
|
|
@@ -418,7 +418,7 @@ declare function createDiagnostic(level: 'error' | 'warning' | 'info', code: str
|
|
|
418
418
|
* @example
|
|
419
419
|
* const allDiagnostics = mergeDiagnostics(parseResult.diagnostics, mapResult.diagnostics, serializeResult.diagnostics);
|
|
420
420
|
*/
|
|
421
|
-
declare function mergeDiagnostics(...diagnosticArrays: Diagnostic[][]): Diagnostic[];
|
|
421
|
+
export declare function mergeDiagnostics(...diagnosticArrays: Diagnostic[][]): Diagnostic[];
|
|
422
422
|
//#endregion
|
|
423
423
|
//#region src/learnosity-model/types.d.ts
|
|
424
424
|
/**
|
|
@@ -430,31 +430,31 @@ declare function mergeDiagnostics(...diagnosticArrays: Diagnostic[][]): Diagnost
|
|
|
430
430
|
/**
|
|
431
431
|
* Widget type in item definition
|
|
432
432
|
*/
|
|
433
|
-
type LearnosityWidgetType = 'response' | 'feature';
|
|
433
|
+
export type LearnosityWidgetType = 'response' | 'feature';
|
|
434
434
|
/**
|
|
435
435
|
* Widget blueprint entry
|
|
436
436
|
*/
|
|
437
|
-
interface LearnosityWidgetBlueprint {
|
|
437
|
+
export interface LearnosityWidgetBlueprint {
|
|
438
438
|
reference: string;
|
|
439
439
|
widget_type: LearnosityWidgetType;
|
|
440
440
|
}
|
|
441
441
|
/**
|
|
442
442
|
* Item tag
|
|
443
443
|
*/
|
|
444
|
-
interface LearnosityTag {
|
|
444
|
+
export interface LearnosityTag {
|
|
445
445
|
type: string;
|
|
446
446
|
name: string;
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
449
449
|
* Item definition
|
|
450
450
|
*/
|
|
451
|
-
interface LearnosityItemDefinition {
|
|
451
|
+
export interface LearnosityItemDefinition {
|
|
452
452
|
widgets: LearnosityWidgetBlueprint[];
|
|
453
453
|
}
|
|
454
454
|
/**
|
|
455
455
|
* Item metadata
|
|
456
456
|
*/
|
|
457
|
-
interface LearnosityItemMetadata {
|
|
457
|
+
export interface LearnosityItemMetadata {
|
|
458
458
|
reference: string;
|
|
459
459
|
content: string;
|
|
460
460
|
title?: string | null;
|
|
@@ -468,14 +468,14 @@ interface LearnosityItemMetadata {
|
|
|
468
468
|
/**
|
|
469
469
|
* MCQ option
|
|
470
470
|
*/
|
|
471
|
-
interface LearnosityMcqOption {
|
|
471
|
+
export interface LearnosityMcqOption {
|
|
472
472
|
label: string;
|
|
473
473
|
value: string | number;
|
|
474
474
|
}
|
|
475
475
|
/**
|
|
476
476
|
* MCQ validation
|
|
477
477
|
*/
|
|
478
|
-
interface LearnosityMcqValidation {
|
|
478
|
+
export interface LearnosityMcqValidation {
|
|
479
479
|
scoring_type?: string;
|
|
480
480
|
valid_response?: {
|
|
481
481
|
value?: (string | number)[];
|
|
@@ -486,25 +486,25 @@ interface LearnosityMcqValidation {
|
|
|
486
486
|
/**
|
|
487
487
|
* MCQ UI style
|
|
488
488
|
*/
|
|
489
|
-
interface LearnosityMcqUiStyle {
|
|
489
|
+
export interface LearnosityMcqUiStyle {
|
|
490
490
|
type?: string;
|
|
491
491
|
}
|
|
492
492
|
/**
|
|
493
493
|
* Common metadata for all question types
|
|
494
494
|
*/
|
|
495
|
-
interface LearnosityQuestionMetadata {
|
|
495
|
+
export interface LearnosityQuestionMetadata {
|
|
496
496
|
distractor_rationale?: string;
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
499
|
* MCQ metadata for feedback (extends common metadata with per-option feedback)
|
|
500
500
|
*/
|
|
501
|
-
interface LearnosityMcqMetadata extends LearnosityQuestionMetadata {
|
|
501
|
+
export interface LearnosityMcqMetadata extends LearnosityQuestionMetadata {
|
|
502
502
|
distractor_rationale_response_level?: string[] | Record<string, string>;
|
|
503
503
|
}
|
|
504
504
|
/**
|
|
505
505
|
* MCQ question data (only supported type in v1)
|
|
506
506
|
*/
|
|
507
|
-
interface LearnosityMcqData {
|
|
507
|
+
export interface LearnosityMcqData {
|
|
508
508
|
type: 'mcq';
|
|
509
509
|
stimulus?: string;
|
|
510
510
|
instructor_stimulus?: string;
|
|
@@ -520,7 +520,7 @@ interface LearnosityMcqData {
|
|
|
520
520
|
/**
|
|
521
521
|
* Clozetext validation
|
|
522
522
|
*/
|
|
523
|
-
interface LearnosityClozetextValidation {
|
|
523
|
+
export interface LearnosityClozetextValidation {
|
|
524
524
|
scoring_type?: string;
|
|
525
525
|
valid_response?: {
|
|
526
526
|
value?: (string | null)[];
|
|
@@ -531,14 +531,14 @@ interface LearnosityClozetextValidation {
|
|
|
531
531
|
/**
|
|
532
532
|
* Clozetext response container (shared settings for all response fields)
|
|
533
533
|
*/
|
|
534
|
-
interface LearnosityClozetextResponseContainer {
|
|
534
|
+
export interface LearnosityClozetextResponseContainer {
|
|
535
535
|
input_type?: 'text' | 'number';
|
|
536
536
|
max_length?: number;
|
|
537
537
|
}
|
|
538
538
|
/**
|
|
539
539
|
* Clozetext question data (vNext)
|
|
540
540
|
*/
|
|
541
|
-
interface LearnosityClozetextData {
|
|
541
|
+
export interface LearnosityClozetextData {
|
|
542
542
|
type: 'clozetext';
|
|
543
543
|
stimulus?: string;
|
|
544
544
|
instructor_stimulus?: string;
|
|
@@ -557,7 +557,7 @@ interface LearnosityClozetextData {
|
|
|
557
557
|
* Math cloze types that use {{response}} placeholders within a template.
|
|
558
558
|
* Converted to unscored textEntryInteraction in QTI (no scoring equivalent exists).
|
|
559
559
|
*/
|
|
560
|
-
interface LearnosityClozeformulaData {
|
|
560
|
+
export interface LearnosityClozeformulaData {
|
|
561
561
|
type: 'clozeformula' | 'clozeformulaV2' | 'formulaV2';
|
|
562
562
|
stimulus?: string;
|
|
563
563
|
/**
|
|
@@ -592,7 +592,7 @@ interface LearnosityClozeformulaData {
|
|
|
592
592
|
* Image-based math cloze type with positioned response blanks over a background image.
|
|
593
593
|
* Converted to unscored textEntryInteraction in QTI (no scoring equivalent exists).
|
|
594
594
|
*/
|
|
595
|
-
interface LearnosityImageClozeformulaV2Data {
|
|
595
|
+
export interface LearnosityImageClozeformulaV2Data {
|
|
596
596
|
type: 'imageclozeformulaV2';
|
|
597
597
|
stimulus?: string;
|
|
598
598
|
instructor_stimulus?: string;
|
|
@@ -631,13 +631,13 @@ interface LearnosityImageClozeformulaV2Data {
|
|
|
631
631
|
/**
|
|
632
632
|
* LongtextV2 validation
|
|
633
633
|
*/
|
|
634
|
-
interface LearnosityLongtextV2Validation {
|
|
634
|
+
export interface LearnosityLongtextV2Validation {
|
|
635
635
|
max_score?: number;
|
|
636
636
|
}
|
|
637
637
|
/**
|
|
638
638
|
* LongtextV2 question data (vNext, essay/extended response)
|
|
639
639
|
*/
|
|
640
|
-
interface LearnosityLongtextV2Data {
|
|
640
|
+
export interface LearnosityLongtextV2Data {
|
|
641
641
|
type: 'longtextV2';
|
|
642
642
|
stimulus?: string;
|
|
643
643
|
instructor_stimulus?: string;
|
|
@@ -650,7 +650,7 @@ interface LearnosityLongtextV2Data {
|
|
|
650
650
|
/**
|
|
651
651
|
* FormulaessayV2 question data (alias of longtextV2, produces extendedTextInteraction)
|
|
652
652
|
*/
|
|
653
|
-
interface LearnosityFormulaessayV2Data {
|
|
653
|
+
export interface LearnosityFormulaessayV2Data {
|
|
654
654
|
type: 'formulaessayV2';
|
|
655
655
|
stimulus?: string;
|
|
656
656
|
instructor_stimulus?: string;
|
|
@@ -662,7 +662,7 @@ interface LearnosityFormulaessayV2Data {
|
|
|
662
662
|
/**
|
|
663
663
|
* ChemistryessayV2 question data (alias of longtextV2, produces extendedTextInteraction)
|
|
664
664
|
*/
|
|
665
|
-
interface LearnosityChemistryessayV2Data {
|
|
665
|
+
export interface LearnosityChemistryessayV2Data {
|
|
666
666
|
type: 'chemistryessayV2';
|
|
667
667
|
stimulus?: string;
|
|
668
668
|
instructor_stimulus?: string;
|
|
@@ -674,14 +674,14 @@ interface LearnosityChemistryessayV2Data {
|
|
|
674
674
|
/**
|
|
675
675
|
* Plaintext UI style
|
|
676
676
|
*/
|
|
677
|
-
interface LearnosityPlaintextUiStyle {
|
|
677
|
+
export interface LearnosityPlaintextUiStyle {
|
|
678
678
|
min_height?: string;
|
|
679
679
|
max_height?: string;
|
|
680
680
|
}
|
|
681
681
|
/**
|
|
682
682
|
* Plaintext question data (plain text input, no formatting)
|
|
683
683
|
*/
|
|
684
|
-
interface LearnosityPlaintextData {
|
|
684
|
+
export interface LearnosityPlaintextData {
|
|
685
685
|
type: 'plaintext';
|
|
686
686
|
stimulus?: string;
|
|
687
687
|
instructor_stimulus?: string;
|
|
@@ -698,7 +698,7 @@ interface LearnosityPlaintextData {
|
|
|
698
698
|
/**
|
|
699
699
|
* Shorttext validation
|
|
700
700
|
*/
|
|
701
|
-
interface LearnosityShorttextValidation {
|
|
701
|
+
export interface LearnosityShorttextValidation {
|
|
702
702
|
scoring_type?: string;
|
|
703
703
|
valid_response?: {
|
|
704
704
|
value?: string | string[];
|
|
@@ -709,7 +709,7 @@ interface LearnosityShorttextValidation {
|
|
|
709
709
|
/**
|
|
710
710
|
* Shorttext question data (single short answer)
|
|
711
711
|
*/
|
|
712
|
-
interface LearnosityShorttextData {
|
|
712
|
+
export interface LearnosityShorttextData {
|
|
713
713
|
type: 'shorttext';
|
|
714
714
|
stimulus?: string;
|
|
715
715
|
instructor_stimulus?: string;
|
|
@@ -723,7 +723,7 @@ interface LearnosityShorttextData {
|
|
|
723
723
|
/**
|
|
724
724
|
* Clozedropdown validation
|
|
725
725
|
*/
|
|
726
|
-
interface LearnosityClozedropdownValidation {
|
|
726
|
+
export interface LearnosityClozedropdownValidation {
|
|
727
727
|
scoring_type?: string;
|
|
728
728
|
valid_response?: {
|
|
729
729
|
value?: string[];
|
|
@@ -734,7 +734,7 @@ interface LearnosityClozedropdownValidation {
|
|
|
734
734
|
/**
|
|
735
735
|
* Clozedropdown question data (inline dropdown/select menus in text)
|
|
736
736
|
*/
|
|
737
|
-
interface LearnosityClozedropdownData {
|
|
737
|
+
export interface LearnosityClozedropdownData {
|
|
738
738
|
type: 'clozedropdown';
|
|
739
739
|
stimulus?: string;
|
|
740
740
|
instructor_stimulus?: string;
|
|
@@ -748,7 +748,7 @@ interface LearnosityClozedropdownData {
|
|
|
748
748
|
/**
|
|
749
749
|
* Clozeassociation validation
|
|
750
750
|
*/
|
|
751
|
-
interface LearnosityClozeassociationValidation {
|
|
751
|
+
export interface LearnosityClozeassociationValidation {
|
|
752
752
|
scoring_type?: string;
|
|
753
753
|
valid_response?: {
|
|
754
754
|
value?: string[];
|
|
@@ -759,14 +759,14 @@ interface LearnosityClozeassociationValidation {
|
|
|
759
759
|
/**
|
|
760
760
|
* Clozeassociation possible response group (for grouped UI display)
|
|
761
761
|
*/
|
|
762
|
-
interface LearnosityClozeassociationResponseGroup {
|
|
762
|
+
export interface LearnosityClozeassociationResponseGroup {
|
|
763
763
|
title: string;
|
|
764
764
|
responses: string[];
|
|
765
765
|
}
|
|
766
766
|
/**
|
|
767
767
|
* Normalized possible responses for clozeassociation (internal representation)
|
|
768
768
|
*/
|
|
769
|
-
interface NormalizedClozeassociationPossibleResponses {
|
|
769
|
+
export interface NormalizedClozeassociationPossibleResponses {
|
|
770
770
|
mode: 'flat' | 'grouped';
|
|
771
771
|
flat: string[];
|
|
772
772
|
groups?: LearnosityClozeassociationResponseGroup[];
|
|
@@ -777,7 +777,7 @@ interface NormalizedClozeassociationPossibleResponses {
|
|
|
777
777
|
* 1. Flat: possible_responses array (legacy)
|
|
778
778
|
* 2. Grouped: group_possible_responses=true + possible_response_groups array
|
|
779
779
|
*/
|
|
780
|
-
interface LearnosityClozeassociationData {
|
|
780
|
+
export interface LearnosityClozeassociationData {
|
|
781
781
|
type: 'clozeassociation';
|
|
782
782
|
stimulus?: string;
|
|
783
783
|
instructor_stimulus?: string;
|
|
@@ -794,7 +794,7 @@ interface LearnosityClozeassociationData {
|
|
|
794
794
|
/**
|
|
795
795
|
* Sharedpassage feature data (rich text passage)
|
|
796
796
|
*/
|
|
797
|
-
interface LearnositySharedpassageData {
|
|
797
|
+
export interface LearnositySharedpassageData {
|
|
798
798
|
type: 'sharedpassage';
|
|
799
799
|
heading?: string;
|
|
800
800
|
content: string;
|
|
@@ -805,7 +805,7 @@ interface LearnositySharedpassageData {
|
|
|
805
805
|
/**
|
|
806
806
|
* Audioplayer feature data
|
|
807
807
|
*/
|
|
808
|
-
interface LearnosityAudioplayerData {
|
|
808
|
+
export interface LearnosityAudioplayerData {
|
|
809
809
|
type: 'audioplayer';
|
|
810
810
|
src: string;
|
|
811
811
|
player?: string;
|
|
@@ -819,7 +819,7 @@ interface LearnosityAudioplayerData {
|
|
|
819
819
|
/**
|
|
820
820
|
* Videoplayer feature data
|
|
821
821
|
*/
|
|
822
|
-
interface LearnosityVideoplayerData {
|
|
822
|
+
export interface LearnosityVideoplayerData {
|
|
823
823
|
type: 'videoplayer';
|
|
824
824
|
src: string;
|
|
825
825
|
player_type?: 'hosted-video' | 'youtube' | 'vimeo';
|
|
@@ -832,7 +832,7 @@ interface LearnosityVideoplayerData {
|
|
|
832
832
|
/**
|
|
833
833
|
* Orderlist validation
|
|
834
834
|
*/
|
|
835
|
-
interface LearnosityOrderlistValidation {
|
|
835
|
+
export interface LearnosityOrderlistValidation {
|
|
836
836
|
scoring_type?: string;
|
|
837
837
|
valid_response?: {
|
|
838
838
|
value: number[];
|
|
@@ -844,7 +844,7 @@ interface LearnosityOrderlistValidation {
|
|
|
844
844
|
/**
|
|
845
845
|
* Orderlist question data (ordering/sequencing)
|
|
846
846
|
*/
|
|
847
|
-
interface LearnosityOrderlistData {
|
|
847
|
+
export interface LearnosityOrderlistData {
|
|
848
848
|
type: 'orderlist';
|
|
849
849
|
stimulus?: string;
|
|
850
850
|
instructor_stimulus?: string;
|
|
@@ -857,7 +857,7 @@ interface LearnosityOrderlistData {
|
|
|
857
857
|
/**
|
|
858
858
|
* Tokenhighlight validation
|
|
859
859
|
*/
|
|
860
|
-
interface LearnosityTokenhighlightValidation {
|
|
860
|
+
export interface LearnosityTokenhighlightValidation {
|
|
861
861
|
scoring_type?: string;
|
|
862
862
|
valid_response?: {
|
|
863
863
|
value: number[];
|
|
@@ -868,7 +868,7 @@ interface LearnosityTokenhighlightValidation {
|
|
|
868
868
|
/**
|
|
869
869
|
* Tokenhighlight question data (highlight selectable tokens in text)
|
|
870
870
|
*/
|
|
871
|
-
interface LearnosityTokenhighlightData {
|
|
871
|
+
export interface LearnosityTokenhighlightData {
|
|
872
872
|
type: 'tokenhighlight';
|
|
873
873
|
stimulus?: string;
|
|
874
874
|
instructor_stimulus?: string;
|
|
@@ -881,7 +881,7 @@ interface LearnosityTokenhighlightData {
|
|
|
881
881
|
/**
|
|
882
882
|
* Choicematrix validation
|
|
883
883
|
*/
|
|
884
|
-
interface LearnosityChoicematrixValidation {
|
|
884
|
+
export interface LearnosityChoicematrixValidation {
|
|
885
885
|
scoring_type?: 'exactMatch';
|
|
886
886
|
valid_response?: {
|
|
887
887
|
value?: number[][];
|
|
@@ -891,14 +891,14 @@ interface LearnosityChoicematrixValidation {
|
|
|
891
891
|
/**
|
|
892
892
|
* Choicematrix UI style
|
|
893
893
|
*/
|
|
894
|
-
interface LearnosityChoicematrixUiStyle {
|
|
894
|
+
export interface LearnosityChoicematrixUiStyle {
|
|
895
895
|
type?: 'table' | 'inline';
|
|
896
896
|
horizontal_lines?: boolean;
|
|
897
897
|
}
|
|
898
898
|
/**
|
|
899
899
|
* Choicematrix question data (matrix of options per stem/row)
|
|
900
900
|
*/
|
|
901
|
-
interface LearnosityChoicematrixData {
|
|
901
|
+
export interface LearnosityChoicematrixData {
|
|
902
902
|
type: 'choicematrix';
|
|
903
903
|
stimulus?: string;
|
|
904
904
|
instructor_stimulus?: string;
|
|
@@ -912,7 +912,7 @@ interface LearnosityChoicematrixData {
|
|
|
912
912
|
}
|
|
913
913
|
/** * Hotspot image
|
|
914
914
|
*/
|
|
915
|
-
interface LearnosityHotspotImage {
|
|
915
|
+
export interface LearnosityHotspotImage {
|
|
916
916
|
source: string;
|
|
917
917
|
width: number;
|
|
918
918
|
height: number;
|
|
@@ -921,14 +921,14 @@ interface LearnosityHotspotImage {
|
|
|
921
921
|
/**
|
|
922
922
|
* Hotspot polygon point (percentages)
|
|
923
923
|
*/
|
|
924
|
-
interface LearnosityHotspotPoint {
|
|
924
|
+
export interface LearnosityHotspotPoint {
|
|
925
925
|
x: number;
|
|
926
926
|
y: number;
|
|
927
927
|
}
|
|
928
928
|
/**
|
|
929
929
|
* Hotspot validation
|
|
930
930
|
*/
|
|
931
|
-
interface LearnosityHotspotValidation {
|
|
931
|
+
export interface LearnosityHotspotValidation {
|
|
932
932
|
scoring_type?: 'exactMatch';
|
|
933
933
|
valid_response?: {
|
|
934
934
|
value?: (string | number)[];
|
|
@@ -938,7 +938,7 @@ interface LearnosityHotspotValidation {
|
|
|
938
938
|
/**
|
|
939
939
|
* Hotspot question data (click areas on image)
|
|
940
940
|
*/
|
|
941
|
-
interface LearnosityHotspotData {
|
|
941
|
+
export interface LearnosityHotspotData {
|
|
942
942
|
type: 'hotspot';
|
|
943
943
|
stimulus?: string;
|
|
944
944
|
instructor_stimulus?: string;
|
|
@@ -951,7 +951,7 @@ interface LearnosityHotspotData {
|
|
|
951
951
|
}
|
|
952
952
|
/** * Imageclozeassociation image definition
|
|
953
953
|
*/
|
|
954
|
-
interface LearnosityImageclozeassociationV2Image {
|
|
954
|
+
export interface LearnosityImageclozeassociationV2Image {
|
|
955
955
|
src: string;
|
|
956
956
|
width?: number;
|
|
957
957
|
height?: number;
|
|
@@ -961,7 +961,7 @@ interface LearnosityImageclozeassociationV2Image {
|
|
|
961
961
|
/**
|
|
962
962
|
* Imageclozeassociation response container (drop zone)
|
|
963
963
|
*/
|
|
964
|
-
interface LearnosityImageclozeassociationV2ResponseContainer {
|
|
964
|
+
export interface LearnosityImageclozeassociationV2ResponseContainer {
|
|
965
965
|
x: number;
|
|
966
966
|
y: number;
|
|
967
967
|
width: string;
|
|
@@ -971,14 +971,14 @@ interface LearnosityImageclozeassociationV2ResponseContainer {
|
|
|
971
971
|
/**
|
|
972
972
|
* Imageclozeassociation possible response group (for grouped UI display)
|
|
973
973
|
*/
|
|
974
|
-
interface LearnosityImageclozeassociationV2ResponseGroup {
|
|
974
|
+
export interface LearnosityImageclozeassociationV2ResponseGroup {
|
|
975
975
|
title: string;
|
|
976
976
|
responses: string[];
|
|
977
977
|
}
|
|
978
978
|
/**
|
|
979
979
|
* Imageclozeassociation validation
|
|
980
980
|
*/
|
|
981
|
-
interface LearnosityImageclozeassociationV2Validation {
|
|
981
|
+
export interface LearnosityImageclozeassociationV2Validation {
|
|
982
982
|
scoring_type?: 'exactMatch' | 'partialMatch' | 'partialMatchV2' | 'partialMatchPerResponse';
|
|
983
983
|
valid_response?: {
|
|
984
984
|
value?: string[][];
|
|
@@ -989,7 +989,7 @@ interface LearnosityImageclozeassociationV2Validation {
|
|
|
989
989
|
/**
|
|
990
990
|
* Imageclozeassociation question data (drag text onto image zones)
|
|
991
991
|
*/
|
|
992
|
-
interface LearnosityImageclozeassociationV2Data {
|
|
992
|
+
export interface LearnosityImageclozeassociationV2Data {
|
|
993
993
|
type: 'imageclozeassociationV2';
|
|
994
994
|
stimulus?: string;
|
|
995
995
|
instructor_stimulus?: string;
|
|
@@ -1009,7 +1009,7 @@ interface LearnosityImageclozeassociationV2Data {
|
|
|
1009
1009
|
/**
|
|
1010
1010
|
* Fileupload question data (file upload)
|
|
1011
1011
|
*/
|
|
1012
|
-
interface LearnosityFileuploadData {
|
|
1012
|
+
export interface LearnosityFileuploadData {
|
|
1013
1013
|
type: 'fileupload';
|
|
1014
1014
|
stimulus?: string;
|
|
1015
1015
|
instructor_stimulus?: string;
|
|
@@ -1048,7 +1048,7 @@ interface LearnosityFileuploadData {
|
|
|
1048
1048
|
/**
|
|
1049
1049
|
* Drawing image specification
|
|
1050
1050
|
*/
|
|
1051
|
-
interface LearnosityDrawingImage {
|
|
1051
|
+
export interface LearnosityDrawingImage {
|
|
1052
1052
|
source?: string;
|
|
1053
1053
|
src?: string;
|
|
1054
1054
|
width?: number;
|
|
@@ -1058,7 +1058,7 @@ interface LearnosityDrawingImage {
|
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Drawing question data (freehand drawing with optional background image)
|
|
1060
1060
|
*/
|
|
1061
|
-
interface LearnosityDrawingData {
|
|
1061
|
+
export interface LearnosityDrawingData {
|
|
1062
1062
|
type: 'drawing';
|
|
1063
1063
|
stimulus?: string;
|
|
1064
1064
|
instructor_stimulus?: string;
|
|
@@ -1072,7 +1072,7 @@ interface LearnosityDrawingData {
|
|
|
1072
1072
|
/**
|
|
1073
1073
|
* Classification validation
|
|
1074
1074
|
*/
|
|
1075
|
-
interface LearnosityClassificationValidation {
|
|
1075
|
+
export interface LearnosityClassificationValidation {
|
|
1076
1076
|
scoring_type?: string;
|
|
1077
1077
|
valid_response?: {
|
|
1078
1078
|
score?: number;
|
|
@@ -1082,7 +1082,7 @@ interface LearnosityClassificationValidation {
|
|
|
1082
1082
|
/**
|
|
1083
1083
|
* Classification question data (maps from QTI associationInteraction)
|
|
1084
1084
|
*/
|
|
1085
|
-
interface LearnosityClassificationData {
|
|
1085
|
+
export interface LearnosityClassificationData {
|
|
1086
1086
|
type: 'classification';
|
|
1087
1087
|
instructor_stimulus?: string;
|
|
1088
1088
|
stimulus?: string;
|
|
@@ -1104,19 +1104,19 @@ interface LearnosityClassificationData {
|
|
|
1104
1104
|
/**
|
|
1105
1105
|
* Supported question types
|
|
1106
1106
|
*/
|
|
1107
|
-
type LearnosityQuestionType = 'mcq' | 'clozetext' | 'clozeformula' | 'clozeformulaV2' | 'formulaV2' | 'imageclozeformulaV2' | 'longtextV2' | 'formulaessayV2' | 'chemistryessayV2' | 'plaintext' | 'shorttext' | 'clozedropdown' | 'clozeassociation' | 'orderlist' | 'tokenhighlight' | 'choicematrix' | 'hotspot' | 'imageclozeassociationV2' | 'fileupload' | 'drawing' | 'classification';
|
|
1107
|
+
export type LearnosityQuestionType = 'mcq' | 'clozetext' | 'clozeformula' | 'clozeformulaV2' | 'formulaV2' | 'imageclozeformulaV2' | 'longtextV2' | 'formulaessayV2' | 'chemistryessayV2' | 'plaintext' | 'shorttext' | 'clozedropdown' | 'clozeassociation' | 'orderlist' | 'tokenhighlight' | 'choicematrix' | 'hotspot' | 'imageclozeassociationV2' | 'fileupload' | 'drawing' | 'classification';
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Supported feature types
|
|
1110
1110
|
*/
|
|
1111
|
-
type LearnosityFeatureType = 'sharedpassage' | 'audioplayer' | 'videoplayer' | string;
|
|
1111
|
+
export type LearnosityFeatureType = 'sharedpassage' | 'audioplayer' | 'videoplayer' | string;
|
|
1112
1112
|
/**
|
|
1113
1113
|
* Question data union
|
|
1114
1114
|
*/
|
|
1115
|
-
type LearnosityQuestionData = LearnosityMcqData | LearnosityClozetextData | LearnosityClozeformulaData | LearnosityImageClozeformulaV2Data | LearnosityLongtextV2Data | LearnosityFormulaessayV2Data | LearnosityChemistryessayV2Data | LearnosityPlaintextData | LearnosityShorttextData | LearnosityClozedropdownData | LearnosityClozeassociationData | LearnosityOrderlistData | LearnosityTokenhighlightData | LearnosityChoicematrixData | LearnosityHotspotData | LearnosityImageclozeassociationV2Data | LearnosityFileuploadData | LearnosityDrawingData | LearnosityClassificationData;
|
|
1115
|
+
export type LearnosityQuestionData = LearnosityMcqData | LearnosityClozetextData | LearnosityClozeformulaData | LearnosityImageClozeformulaV2Data | LearnosityLongtextV2Data | LearnosityFormulaessayV2Data | LearnosityChemistryessayV2Data | LearnosityPlaintextData | LearnosityShorttextData | LearnosityClozedropdownData | LearnosityClozeassociationData | LearnosityOrderlistData | LearnosityTokenhighlightData | LearnosityChoicematrixData | LearnosityHotspotData | LearnosityImageclozeassociationV2Data | LearnosityFileuploadData | LearnosityDrawingData | LearnosityClassificationData;
|
|
1116
1116
|
/**
|
|
1117
1117
|
* Question (response widget)
|
|
1118
1118
|
*/
|
|
1119
|
-
interface LearnosityQuestion {
|
|
1119
|
+
export interface LearnosityQuestion {
|
|
1120
1120
|
reference: string;
|
|
1121
1121
|
widget_type: 'response';
|
|
1122
1122
|
type: LearnosityQuestionType;
|
|
@@ -1126,7 +1126,7 @@ interface LearnosityQuestion {
|
|
|
1126
1126
|
/**
|
|
1127
1127
|
* Feature widget (preserved but not interpreted in v1)
|
|
1128
1128
|
*/
|
|
1129
|
-
interface LearnosityFeature {
|
|
1129
|
+
export interface LearnosityFeature {
|
|
1130
1130
|
reference: string;
|
|
1131
1131
|
widget_type: 'feature';
|
|
1132
1132
|
type: LearnosityFeatureType;
|
|
@@ -1135,7 +1135,7 @@ interface LearnosityFeature {
|
|
|
1135
1135
|
/**
|
|
1136
1136
|
* Layout widget reference (for multi-widget items)
|
|
1137
1137
|
*/
|
|
1138
|
-
type LearnosityLayoutWidget = {
|
|
1138
|
+
export type LearnosityLayoutWidget = {
|
|
1139
1139
|
kind: 'question';
|
|
1140
1140
|
ref: string;
|
|
1141
1141
|
} | {
|
|
@@ -1145,20 +1145,20 @@ type LearnosityLayoutWidget = {
|
|
|
1145
1145
|
/**
|
|
1146
1146
|
* Layout column (for multi-widget items)
|
|
1147
1147
|
*/
|
|
1148
|
-
interface LearnosityLayoutColumn {
|
|
1148
|
+
export interface LearnosityLayoutColumn {
|
|
1149
1149
|
index: 1 | 2;
|
|
1150
1150
|
widgets: LearnosityLayoutWidget[];
|
|
1151
1151
|
}
|
|
1152
1152
|
/**
|
|
1153
1153
|
* Item layout (extracted from item.content HTML)
|
|
1154
1154
|
*/
|
|
1155
|
-
interface LearnosityLayout {
|
|
1155
|
+
export interface LearnosityLayout {
|
|
1156
1156
|
columns: LearnosityLayoutColumn[];
|
|
1157
1157
|
}
|
|
1158
1158
|
/**
|
|
1159
1159
|
* Validated and normalized Learnosity Item Model
|
|
1160
1160
|
*/
|
|
1161
|
-
interface LearnosityItemModel {
|
|
1161
|
+
export interface LearnosityItemModel {
|
|
1162
1162
|
item: LearnosityItemMetadata;
|
|
1163
1163
|
questions: LearnosityQuestion[];
|
|
1164
1164
|
features: LearnosityFeature[];
|
|
@@ -1448,14 +1448,14 @@ interface LearnosityImageclozeassociationV2QuestionJson {
|
|
|
1448
1448
|
* @param opts - Conversion options
|
|
1449
1449
|
* @returns Learnosity JSON and diagnostics
|
|
1450
1450
|
*/
|
|
1451
|
-
declare function convertQtiToLearnosity(input: string, opts: ConversionOptions): Promise<ConversionResult<LearnosityItemJson | undefined>>;
|
|
1451
|
+
export declare function convertQtiToLearnosity(input: string, opts: ConversionOptions): Promise<ConversionResult<LearnosityItemJson | undefined>>;
|
|
1452
1452
|
/**
|
|
1453
1453
|
* Convert Learnosity JSON to QTI XML
|
|
1454
1454
|
* @param input - Learnosity JSON object
|
|
1455
1455
|
* @param opts - Conversion options
|
|
1456
1456
|
* @returns QTI XML string and diagnostics
|
|
1457
1457
|
*/
|
|
1458
|
-
declare function convertLearnosityToQti(input: unknown, opts: ConversionOptions): Promise<ConversionResult<string>>;
|
|
1458
|
+
export declare function convertLearnosityToQti(input: unknown, opts: ConversionOptions): Promise<ConversionResult<string>>;
|
|
1459
1459
|
//#endregion
|
|
1460
1460
|
//#region src/qti-package/types.d.ts
|
|
1461
1461
|
/**
|
|
@@ -1464,7 +1464,7 @@ declare function convertLearnosityToQti(input: unknown, opts: ConversionOptions)
|
|
|
1464
1464
|
/**
|
|
1465
1465
|
* Metadata about a ZIP entry
|
|
1466
1466
|
*/
|
|
1467
|
-
interface ZipEntryMeta {
|
|
1467
|
+
export interface ZipEntryMeta {
|
|
1468
1468
|
/** Normalized path (forward slashes, relative, no ..) */
|
|
1469
1469
|
file: string;
|
|
1470
1470
|
/** Entry size in bytes */
|
|
@@ -1475,7 +1475,7 @@ interface ZipEntryMeta {
|
|
|
1475
1475
|
/**
|
|
1476
1476
|
* Reference to an assessment item XML file
|
|
1477
1477
|
*/
|
|
1478
|
-
interface AssessmentItemRef {
|
|
1478
|
+
export interface AssessmentItemRef {
|
|
1479
1479
|
/** Unique identifier for this item */
|
|
1480
1480
|
identifier: string;
|
|
1481
1481
|
/** Path to the .xml file */
|
|
@@ -1484,7 +1484,7 @@ interface AssessmentItemRef {
|
|
|
1484
1484
|
/**
|
|
1485
1485
|
* Reference to an asset (image, CSS, etc.)
|
|
1486
1486
|
*/
|
|
1487
|
-
interface AssetRef {
|
|
1487
|
+
export interface AssetRef {
|
|
1488
1488
|
/** Unique identifier for this asset */
|
|
1489
1489
|
identifier: string;
|
|
1490
1490
|
/** Path to the asset file */
|
|
@@ -1495,7 +1495,7 @@ interface AssetRef {
|
|
|
1495
1495
|
/**
|
|
1496
1496
|
* A resource in the manifest
|
|
1497
1497
|
*/
|
|
1498
|
-
interface ManifestResource {
|
|
1498
|
+
export interface ManifestResource {
|
|
1499
1499
|
/** Unique identifier for this resource */
|
|
1500
1500
|
identifier: string;
|
|
1501
1501
|
/** Resource type (e.g., "imsqti_item_xmlv2p2", "webcontent") */
|
|
@@ -1514,7 +1514,7 @@ interface ManifestResource {
|
|
|
1514
1514
|
/**
|
|
1515
1515
|
* Parsed QTI Content Package
|
|
1516
1516
|
*/
|
|
1517
|
-
interface QtiContentPackage {
|
|
1517
|
+
export interface QtiContentPackage {
|
|
1518
1518
|
/** Path to the ZIP file (for diagnostics) */
|
|
1519
1519
|
zipPath: string;
|
|
1520
1520
|
/** QTI version of the package (drives manifest namespaces/schemaLocation). Defaults to 2.2 when absent. */
|
|
@@ -1544,7 +1544,7 @@ interface QtiContentPackage {
|
|
|
1544
1544
|
* @param entryPath Raw path from ZIP entry
|
|
1545
1545
|
* @returns Normalized safe path, or null if unsafe
|
|
1546
1546
|
*/
|
|
1547
|
-
declare function validateZipEntryPath(entryPath: string): string | null;
|
|
1547
|
+
export declare function validateZipEntryPath(entryPath: string): string | null;
|
|
1548
1548
|
/**
|
|
1549
1549
|
* Checks if a path is safe for extraction
|
|
1550
1550
|
*
|
|
@@ -1557,7 +1557,7 @@ declare function isPathSafe$1(entryPath: string): boolean;
|
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Result of parsing a manifest
|
|
1559
1559
|
*/
|
|
1560
|
-
interface ParseManifestResult {
|
|
1560
|
+
export interface ParseManifestResult {
|
|
1561
1561
|
/** Parsed resources */
|
|
1562
1562
|
resources: ManifestResource[];
|
|
1563
1563
|
/** Diagnostics from parsing */
|
|
@@ -1575,7 +1575,7 @@ interface ParseManifestResult {
|
|
|
1575
1575
|
* @param zipPath Path to ZIP (for diagnostics)
|
|
1576
1576
|
* @returns Parsed resources and diagnostics
|
|
1577
1577
|
*/
|
|
1578
|
-
declare function parseManifest(manifestXml: string, zipPath: string): ParseManifestResult;
|
|
1578
|
+
export declare function parseManifest(manifestXml: string, zipPath: string): ParseManifestResult;
|
|
1579
1579
|
//#endregion
|
|
1580
1580
|
//#region src/qti-package/buildManifest.d.ts
|
|
1581
1581
|
/**
|
|
@@ -1594,7 +1594,7 @@ declare function parseManifest(manifestXml: string, zipPath: string): ParseManif
|
|
|
1594
1594
|
* @param version QTI version of the package ('2.1' or '2.2'). Defaults to '2.2'.
|
|
1595
1595
|
* @returns XML string for imsmanifest.xml
|
|
1596
1596
|
*/
|
|
1597
|
-
declare function buildManifest(resources: ManifestResource[], version?: '2.1' | '2.2'): string;
|
|
1597
|
+
export declare function buildManifest(resources: ManifestResource[], version?: '2.1' | '2.2'): string;
|
|
1598
1598
|
//#endregion
|
|
1599
1599
|
//#region src/qti-package/testDependencies.d.ts
|
|
1600
1600
|
/**
|
|
@@ -1604,7 +1604,7 @@ declare function buildManifest(resources: ManifestResource[], version?: '2.1' |
|
|
|
1604
1604
|
/**
|
|
1605
1605
|
* Extract assessmentItemRef and assessmentStimulusRef hrefs from test XML
|
|
1606
1606
|
*/
|
|
1607
|
-
declare function extractTestDependencies(testXml: string): {
|
|
1607
|
+
export declare function extractTestDependencies(testXml: string): {
|
|
1608
1608
|
itemHrefs: string[];
|
|
1609
1609
|
stimulusHrefs: string[];
|
|
1610
1610
|
};
|
|
@@ -1616,13 +1616,13 @@ declare function extractTestDependencies(testXml: string): {
|
|
|
1616
1616
|
* - "stimuli/stimulus_xyz789.xml" -> "stimulus_xyz789"
|
|
1617
1617
|
* - "../../items/abc123.xml" -> "item_abc123"
|
|
1618
1618
|
*/
|
|
1619
|
-
declare function mapHrefToResourceId(href: string): string | null;
|
|
1619
|
+
export declare function mapHrefToResourceId(href: string): string | null;
|
|
1620
1620
|
//#endregion
|
|
1621
1621
|
//#region src/learnosity-model/parseLearnosityItem.d.ts
|
|
1622
1622
|
/**
|
|
1623
1623
|
* Result of parsing a Learnosity item
|
|
1624
1624
|
*/
|
|
1625
|
-
interface ParseLearnosityItemResult {
|
|
1625
|
+
export interface ParseLearnosityItemResult {
|
|
1626
1626
|
model?: LearnosityItemModel;
|
|
1627
1627
|
diagnostics: Diagnostic[];
|
|
1628
1628
|
}
|
|
@@ -1632,7 +1632,7 @@ interface ParseLearnosityItemResult {
|
|
|
1632
1632
|
* @param input Unknown input (should be Learnosity Item JSON)
|
|
1633
1633
|
* @returns Validated model if successful, diagnostics in all cases
|
|
1634
1634
|
*/
|
|
1635
|
-
declare function parseLearnosityItem(input: unknown): ParseLearnosityItemResult;
|
|
1635
|
+
export declare function parseLearnosityItem(input: unknown): ParseLearnosityItemResult;
|
|
1636
1636
|
//#endregion
|
|
1637
1637
|
//#region src/learnosity-bundle/types.d.ts
|
|
1638
1638
|
/**
|
|
@@ -1642,20 +1642,20 @@ declare function parseLearnosityItem(input: unknown): ParseLearnosityItemResult;
|
|
|
1642
1642
|
/**
|
|
1643
1643
|
* Item reference entry in manifest activity
|
|
1644
1644
|
*/
|
|
1645
|
-
interface LearnosityManifestItemRef {
|
|
1645
|
+
export interface LearnosityManifestItemRef {
|
|
1646
1646
|
reference: string;
|
|
1647
1647
|
id?: string;
|
|
1648
1648
|
}
|
|
1649
1649
|
/**
|
|
1650
1650
|
* Activity entry in manifest
|
|
1651
1651
|
*/
|
|
1652
|
-
interface LearnosityManifestActivity {
|
|
1652
|
+
export interface LearnosityManifestActivity {
|
|
1653
1653
|
items: LearnosityManifestItemRef[];
|
|
1654
1654
|
}
|
|
1655
1655
|
/**
|
|
1656
1656
|
* Validated Learnosity manifest model (from manifest.json)
|
|
1657
1657
|
*/
|
|
1658
|
-
interface LearnosityManifestModel {
|
|
1658
|
+
export interface LearnosityManifestModel {
|
|
1659
1659
|
activities: Record<string, LearnosityManifestActivity>;
|
|
1660
1660
|
items?: unknown;
|
|
1661
1661
|
assets?: unknown;
|
|
@@ -1663,14 +1663,14 @@ interface LearnosityManifestModel {
|
|
|
1663
1663
|
/**
|
|
1664
1664
|
* Activity index entry (ordered item references)
|
|
1665
1665
|
*/
|
|
1666
|
-
interface LearnosityActivityIndexEntry {
|
|
1666
|
+
export interface LearnosityActivityIndexEntry {
|
|
1667
1667
|
activityRef: string;
|
|
1668
1668
|
itemRefs: string[];
|
|
1669
1669
|
}
|
|
1670
1670
|
/**
|
|
1671
1671
|
* Complete Learnosity bundle model (manifest + loaded JSON files + indices)
|
|
1672
1672
|
*/
|
|
1673
|
-
interface LearnosityBundleModel {
|
|
1673
|
+
export interface LearnosityBundleModel {
|
|
1674
1674
|
/** Validated manifest model */
|
|
1675
1675
|
manifest: LearnosityManifestModel;
|
|
1676
1676
|
/** All activity references from manifest */
|
|
@@ -1694,11 +1694,11 @@ interface LearnosityBundleModel {
|
|
|
1694
1694
|
/**
|
|
1695
1695
|
* Interaction type
|
|
1696
1696
|
*/
|
|
1697
|
-
type InteractionType = 'choice' | 'textEntry' | 'extendedText' | 'inlineChoice' | 'gapMatch' | 'order' | 'hottext' | 'hotspot' | 'graphicGapMatch' | 'match' | 'upload' | 'drawing' | 'associate';
|
|
1697
|
+
export type InteractionType = 'choice' | 'textEntry' | 'extendedText' | 'inlineChoice' | 'gapMatch' | 'order' | 'hottext' | 'hotspot' | 'graphicGapMatch' | 'match' | 'upload' | 'drawing' | 'associate';
|
|
1698
1698
|
/**
|
|
1699
1699
|
* Choice in a choice interaction
|
|
1700
1700
|
*/
|
|
1701
|
-
interface QtiChoice {
|
|
1701
|
+
export interface QtiChoice {
|
|
1702
1702
|
identifier: string;
|
|
1703
1703
|
content: string;
|
|
1704
1704
|
feedbackBlockIdentifier?: string;
|
|
@@ -1706,7 +1706,7 @@ interface QtiChoice {
|
|
|
1706
1706
|
/**
|
|
1707
1707
|
* Modal feedback (general feedback shown after submission)
|
|
1708
1708
|
*/
|
|
1709
|
-
interface QtiModalFeedback {
|
|
1709
|
+
export interface QtiModalFeedback {
|
|
1710
1710
|
identifier: string;
|
|
1711
1711
|
outcomeIdentifier: string;
|
|
1712
1712
|
showHide: 'show' | 'hide';
|
|
@@ -1715,7 +1715,7 @@ interface QtiModalFeedback {
|
|
|
1715
1715
|
/**
|
|
1716
1716
|
* Block feedback (per-choice feedback)
|
|
1717
1717
|
*/
|
|
1718
|
-
interface QtiFeedbackBlock {
|
|
1718
|
+
export interface QtiFeedbackBlock {
|
|
1719
1719
|
identifier: string;
|
|
1720
1720
|
showHide: 'show' | 'hide';
|
|
1721
1721
|
content: string;
|
|
@@ -1723,20 +1723,20 @@ interface QtiFeedbackBlock {
|
|
|
1723
1723
|
/**
|
|
1724
1724
|
* Correct response for an interaction
|
|
1725
1725
|
*/
|
|
1726
|
-
interface QtiCorrectResponse {
|
|
1726
|
+
export interface QtiCorrectResponse {
|
|
1727
1727
|
values: string[];
|
|
1728
1728
|
}
|
|
1729
1729
|
/**
|
|
1730
1730
|
* Map entry for partial credit scoring
|
|
1731
1731
|
*/
|
|
1732
|
-
interface QtiMapEntry {
|
|
1732
|
+
export interface QtiMapEntry {
|
|
1733
1733
|
mapKey: string;
|
|
1734
1734
|
mappedValue: number;
|
|
1735
1735
|
}
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Mapping for partial credit scoring
|
|
1738
1738
|
*/
|
|
1739
|
-
interface QtiMapping {
|
|
1739
|
+
export interface QtiMapping {
|
|
1740
1740
|
lowerBound: number;
|
|
1741
1741
|
upperBound: number;
|
|
1742
1742
|
defaultValue: number;
|
|
@@ -1745,7 +1745,7 @@ interface QtiMapping {
|
|
|
1745
1745
|
/**
|
|
1746
1746
|
* Choice interaction (MCQ)
|
|
1747
1747
|
*/
|
|
1748
|
-
interface QtiChoiceInteraction {
|
|
1748
|
+
export interface QtiChoiceInteraction {
|
|
1749
1749
|
type: 'choice';
|
|
1750
1750
|
responseIdentifier: string;
|
|
1751
1751
|
prompt?: string;
|
|
@@ -1760,7 +1760,7 @@ interface QtiChoiceInteraction {
|
|
|
1760
1760
|
/**
|
|
1761
1761
|
* Text entry in a text entry interaction (clozetext)
|
|
1762
1762
|
*/
|
|
1763
|
-
interface QtiTextEntry {
|
|
1763
|
+
export interface QtiTextEntry {
|
|
1764
1764
|
responseIdentifier: string;
|
|
1765
1765
|
correctResponse?: string;
|
|
1766
1766
|
correctResponses?: string[];
|
|
@@ -1774,7 +1774,7 @@ interface QtiTextEntry {
|
|
|
1774
1774
|
* - Clozetext mode: template required, multiple textEntries
|
|
1775
1775
|
* - Shorttext mode: prompt required, single entry in textEntries
|
|
1776
1776
|
*/
|
|
1777
|
-
interface QtiTextEntryInteraction {
|
|
1777
|
+
export interface QtiTextEntryInteraction {
|
|
1778
1778
|
type: 'textEntry';
|
|
1779
1779
|
responseIdentifier: string;
|
|
1780
1780
|
prompt?: string;
|
|
@@ -1787,7 +1787,7 @@ interface QtiTextEntryInteraction {
|
|
|
1787
1787
|
/**
|
|
1788
1788
|
* Extended text interaction (essay/long answer)
|
|
1789
1789
|
*/
|
|
1790
|
-
interface QtiExtendedTextInteraction {
|
|
1790
|
+
export interface QtiExtendedTextInteraction {
|
|
1791
1791
|
type: 'extendedText';
|
|
1792
1792
|
responseIdentifier: string;
|
|
1793
1793
|
prompt?: string;
|
|
@@ -1798,14 +1798,14 @@ interface QtiExtendedTextInteraction {
|
|
|
1798
1798
|
/**
|
|
1799
1799
|
* Inline choice (single option in a dropdown)
|
|
1800
1800
|
*/
|
|
1801
|
-
interface QtiInlineChoice {
|
|
1801
|
+
export interface QtiInlineChoice {
|
|
1802
1802
|
identifier: string;
|
|
1803
1803
|
content: string;
|
|
1804
1804
|
}
|
|
1805
1805
|
/**
|
|
1806
1806
|
* Inline choice entry (dropdown with options)
|
|
1807
1807
|
*/
|
|
1808
|
-
interface QtiInlineChoiceEntry {
|
|
1808
|
+
export interface QtiInlineChoiceEntry {
|
|
1809
1809
|
responseIdentifier: string;
|
|
1810
1810
|
shuffle: boolean;
|
|
1811
1811
|
inlineChoices: QtiInlineChoice[];
|
|
@@ -1815,7 +1815,7 @@ interface QtiInlineChoiceEntry {
|
|
|
1815
1815
|
/**
|
|
1816
1816
|
* Inline choice interaction (dropdown in text, clozedropdown)
|
|
1817
1817
|
*/
|
|
1818
|
-
interface QtiInlineChoiceInteraction {
|
|
1818
|
+
export interface QtiInlineChoiceInteraction {
|
|
1819
1819
|
type: 'inlineChoice';
|
|
1820
1820
|
responseIdentifier: string;
|
|
1821
1821
|
prompt?: string;
|
|
@@ -1826,21 +1826,21 @@ interface QtiInlineChoiceInteraction {
|
|
|
1826
1826
|
/**
|
|
1827
1827
|
* Gap text (draggable option for gapMatch)
|
|
1828
1828
|
*/
|
|
1829
|
-
interface QtiGapText {
|
|
1829
|
+
export interface QtiGapText {
|
|
1830
1830
|
identifier: string;
|
|
1831
1831
|
content: string;
|
|
1832
1832
|
}
|
|
1833
1833
|
/**
|
|
1834
1834
|
* Gap entry (drop zone in gapMatch)
|
|
1835
1835
|
*/
|
|
1836
|
-
interface QtiGapEntry {
|
|
1836
|
+
export interface QtiGapEntry {
|
|
1837
1837
|
identifier: string;
|
|
1838
1838
|
correctResponse?: string;
|
|
1839
1839
|
}
|
|
1840
1840
|
/**
|
|
1841
1841
|
* Gap match interaction (drag and drop into gaps, clozeassociation)
|
|
1842
1842
|
*/
|
|
1843
|
-
interface QtiGapMatchInteraction {
|
|
1843
|
+
export interface QtiGapMatchInteraction {
|
|
1844
1844
|
type: 'gapMatch';
|
|
1845
1845
|
responseIdentifier: string;
|
|
1846
1846
|
prompt?: string;
|
|
@@ -1853,7 +1853,7 @@ interface QtiGapMatchInteraction {
|
|
|
1853
1853
|
/**
|
|
1854
1854
|
* Order interaction (ordering/sequencing, orderlist)
|
|
1855
1855
|
*/
|
|
1856
|
-
interface QtiOrderInteraction {
|
|
1856
|
+
export interface QtiOrderInteraction {
|
|
1857
1857
|
type: 'order';
|
|
1858
1858
|
responseIdentifier: string;
|
|
1859
1859
|
prompt?: string;
|
|
@@ -1866,14 +1866,14 @@ interface QtiOrderInteraction {
|
|
|
1866
1866
|
/**
|
|
1867
1867
|
* Hottext element (selectable text region in hottextInteraction)
|
|
1868
1868
|
*/
|
|
1869
|
-
interface QtiHottext {
|
|
1869
|
+
export interface QtiHottext {
|
|
1870
1870
|
identifier: string;
|
|
1871
1871
|
content: string;
|
|
1872
1872
|
}
|
|
1873
1873
|
/**
|
|
1874
1874
|
* Hottext interaction (highlight/select text regions, tokenhighlight)
|
|
1875
1875
|
*/
|
|
1876
|
-
interface QtiHottextInteraction {
|
|
1876
|
+
export interface QtiHottextInteraction {
|
|
1877
1877
|
type: 'hottext';
|
|
1878
1878
|
responseIdentifier: string;
|
|
1879
1879
|
prompt?: string;
|
|
@@ -1886,7 +1886,7 @@ interface QtiHottextInteraction {
|
|
|
1886
1886
|
/**
|
|
1887
1887
|
* Associable hotspot (drop zone in graphicGapMatch)
|
|
1888
1888
|
*/
|
|
1889
|
-
interface QtiAssociableHotspot {
|
|
1889
|
+
export interface QtiAssociableHotspot {
|
|
1890
1890
|
identifier: string;
|
|
1891
1891
|
shape: 'rect' | 'circle' | 'poly' | 'ellipse' | 'default';
|
|
1892
1892
|
coords: string;
|
|
@@ -1895,7 +1895,7 @@ interface QtiAssociableHotspot {
|
|
|
1895
1895
|
/**
|
|
1896
1896
|
* Gap image (draggable image choice in graphicGapMatch)
|
|
1897
1897
|
*/
|
|
1898
|
-
interface QtiGapImg {
|
|
1898
|
+
export interface QtiGapImg {
|
|
1899
1899
|
identifier: string;
|
|
1900
1900
|
objectData: string;
|
|
1901
1901
|
objectType: string;
|
|
@@ -1905,7 +1905,7 @@ interface QtiGapImg {
|
|
|
1905
1905
|
/**
|
|
1906
1906
|
* Directed pair (zone-choice pairing)
|
|
1907
1907
|
*/
|
|
1908
|
-
interface QtiDirectedPair {
|
|
1908
|
+
export interface QtiDirectedPair {
|
|
1909
1909
|
sourceId: string;
|
|
1910
1910
|
targetId: string;
|
|
1911
1911
|
}
|
|
@@ -1915,7 +1915,7 @@ interface QtiDirectedPair {
|
|
|
1915
1915
|
/**
|
|
1916
1916
|
* Hotspot choice (polygon area on image)
|
|
1917
1917
|
*/
|
|
1918
|
-
interface QtiHotspotChoice {
|
|
1918
|
+
export interface QtiHotspotChoice {
|
|
1919
1919
|
identifier: string;
|
|
1920
1920
|
shape: 'poly';
|
|
1921
1921
|
coords: string;
|
|
@@ -1923,7 +1923,7 @@ interface QtiHotspotChoice {
|
|
|
1923
1923
|
/**
|
|
1924
1924
|
* Hotspot interaction (click areas on image)
|
|
1925
1925
|
*/
|
|
1926
|
-
interface QtiHotspotInteraction {
|
|
1926
|
+
export interface QtiHotspotInteraction {
|
|
1927
1927
|
type: 'hotspot';
|
|
1928
1928
|
responseIdentifier: string;
|
|
1929
1929
|
prompt?: string;
|
|
@@ -1940,7 +1940,7 @@ interface QtiHotspotInteraction {
|
|
|
1940
1940
|
/**
|
|
1941
1941
|
* Graphic gap match interaction (drag-and-drop onto image zones)
|
|
1942
1942
|
*/
|
|
1943
|
-
interface QtiGraphicGapMatchInteraction {
|
|
1943
|
+
export interface QtiGraphicGapMatchInteraction {
|
|
1944
1944
|
type: 'graphicGapMatch';
|
|
1945
1945
|
responseIdentifier: string;
|
|
1946
1946
|
prompt?: string;
|
|
@@ -1960,7 +1960,7 @@ interface QtiGraphicGapMatchInteraction {
|
|
|
1960
1960
|
/**
|
|
1961
1961
|
* Outcome declaration (for scoring)
|
|
1962
1962
|
*/
|
|
1963
|
-
interface QtiOutcomeDeclaration {
|
|
1963
|
+
export interface QtiOutcomeDeclaration {
|
|
1964
1964
|
identifier: string;
|
|
1965
1965
|
baseType: 'float' | 'integer' | 'string' | 'boolean';
|
|
1966
1966
|
cardinality: 'single' | 'multiple' | 'ordered';
|
|
@@ -1969,7 +1969,7 @@ interface QtiOutcomeDeclaration {
|
|
|
1969
1969
|
/**
|
|
1970
1970
|
* Simple associable choice (for matchInteraction)
|
|
1971
1971
|
*/
|
|
1972
|
-
interface QtiSimpleAssociableChoice {
|
|
1972
|
+
export interface QtiSimpleAssociableChoice {
|
|
1973
1973
|
identifier: string;
|
|
1974
1974
|
content: string;
|
|
1975
1975
|
matchMax: number;
|
|
@@ -1977,14 +1977,14 @@ interface QtiSimpleAssociableChoice {
|
|
|
1977
1977
|
/**
|
|
1978
1978
|
* Directed pair (source-target association for matchInteraction correctResponse)
|
|
1979
1979
|
*/
|
|
1980
|
-
interface QtiDirectedPairMatch {
|
|
1980
|
+
export interface QtiDirectedPairMatch {
|
|
1981
1981
|
sourceId: string;
|
|
1982
1982
|
targetId: string;
|
|
1983
1983
|
}
|
|
1984
1984
|
/**
|
|
1985
1985
|
* Match interaction (matrix/matching question, choicematrix)
|
|
1986
1986
|
*/
|
|
1987
|
-
interface QtiMatchInteraction {
|
|
1987
|
+
export interface QtiMatchInteraction {
|
|
1988
1988
|
type: 'match';
|
|
1989
1989
|
responseIdentifier: string;
|
|
1990
1990
|
prompt?: string;
|
|
@@ -1997,7 +1997,7 @@ interface QtiMatchInteraction {
|
|
|
1997
1997
|
/**
|
|
1998
1998
|
* Upload interaction (file upload, fileupload)
|
|
1999
1999
|
*/
|
|
2000
|
-
interface QtiUploadInteraction {
|
|
2000
|
+
export interface QtiUploadInteraction {
|
|
2001
2001
|
type: 'upload';
|
|
2002
2002
|
responseIdentifier: string;
|
|
2003
2003
|
prompt?: string;
|
|
@@ -2009,7 +2009,7 @@ interface QtiUploadInteraction {
|
|
|
2009
2009
|
* Associable choice (for associateInteraction)
|
|
2010
2010
|
* Represents both column/category choices and draggable item choices.
|
|
2011
2011
|
*/
|
|
2012
|
-
interface QtiAssociableChoice {
|
|
2012
|
+
export interface QtiAssociableChoice {
|
|
2013
2013
|
identifier: string;
|
|
2014
2014
|
content: string;
|
|
2015
2015
|
matchMax: number;
|
|
@@ -2017,7 +2017,7 @@ interface QtiAssociableChoice {
|
|
|
2017
2017
|
/**
|
|
2018
2018
|
* Associate interaction (drag-and-drop classification, classification)
|
|
2019
2019
|
*/
|
|
2020
|
-
interface QtiAssociateInteraction {
|
|
2020
|
+
export interface QtiAssociateInteraction {
|
|
2021
2021
|
type: 'associate';
|
|
2022
2022
|
responseIdentifier: string;
|
|
2023
2023
|
prompt?: string;
|
|
@@ -2032,7 +2032,7 @@ interface QtiAssociateInteraction {
|
|
|
2032
2032
|
/**
|
|
2033
2033
|
* Drawing interaction (freehand drawing, drawing)
|
|
2034
2034
|
*/
|
|
2035
|
-
interface QtiDrawingInteraction {
|
|
2035
|
+
export interface QtiDrawingInteraction {
|
|
2036
2036
|
type: 'drawing';
|
|
2037
2037
|
responseIdentifier: string;
|
|
2038
2038
|
prompt?: string;
|
|
@@ -2049,11 +2049,11 @@ interface QtiDrawingInteraction {
|
|
|
2049
2049
|
/**
|
|
2050
2050
|
* Union type for all interactions
|
|
2051
2051
|
*/
|
|
2052
|
-
type QtiInteraction = QtiChoiceInteraction | QtiTextEntryInteraction | QtiExtendedTextInteraction | QtiInlineChoiceInteraction | QtiGapMatchInteraction | QtiOrderInteraction | QtiHottextInteraction | QtiHotspotInteraction | QtiGraphicGapMatchInteraction | QtiMatchInteraction | QtiUploadInteraction | QtiDrawingInteraction | QtiAssociateInteraction;
|
|
2052
|
+
export type QtiInteraction = QtiChoiceInteraction | QtiTextEntryInteraction | QtiExtendedTextInteraction | QtiInlineChoiceInteraction | QtiGapMatchInteraction | QtiOrderInteraction | QtiHottextInteraction | QtiHotspotInteraction | QtiGraphicGapMatchInteraction | QtiMatchInteraction | QtiUploadInteraction | QtiDrawingInteraction | QtiAssociateInteraction;
|
|
2053
2053
|
/**
|
|
2054
2054
|
* Widget reference for layout (question or feature)
|
|
2055
2055
|
*/
|
|
2056
|
-
interface QtiLayoutWidget {
|
|
2056
|
+
export interface QtiLayoutWidget {
|
|
2057
2057
|
kind: 'question' | 'feature';
|
|
2058
2058
|
ref: string;
|
|
2059
2059
|
interaction?: QtiInteraction;
|
|
@@ -2062,39 +2062,39 @@ interface QtiLayoutWidget {
|
|
|
2062
2062
|
/**
|
|
2063
2063
|
* Column in a multi-column layout
|
|
2064
2064
|
*/
|
|
2065
|
-
interface QtiLayoutColumn {
|
|
2065
|
+
export interface QtiLayoutColumn {
|
|
2066
2066
|
index: 1 | 2;
|
|
2067
2067
|
widgets: QtiLayoutWidget[];
|
|
2068
2068
|
}
|
|
2069
2069
|
/**
|
|
2070
2070
|
* Item layout structure
|
|
2071
2071
|
*/
|
|
2072
|
-
interface QtiLayout {
|
|
2072
|
+
export interface QtiLayout {
|
|
2073
2073
|
columns: QtiLayoutColumn[];
|
|
2074
2074
|
contentHtml: string;
|
|
2075
2075
|
}
|
|
2076
2076
|
/**
|
|
2077
2077
|
* LOM classification for a tag type
|
|
2078
2078
|
*/
|
|
2079
|
-
interface QtiLomClassification {
|
|
2079
|
+
export interface QtiLomClassification {
|
|
2080
2080
|
tagType: string;
|
|
2081
2081
|
tagNames: string[];
|
|
2082
2082
|
}
|
|
2083
2083
|
/**
|
|
2084
2084
|
* LOM metadata for an assessment item
|
|
2085
2085
|
*/
|
|
2086
|
-
interface QtiLomMetadata {
|
|
2086
|
+
export interface QtiLomMetadata {
|
|
2087
2087
|
identifier: string;
|
|
2088
2088
|
classifications: QtiLomClassification[];
|
|
2089
2089
|
}
|
|
2090
2090
|
/**
|
|
2091
2091
|
* Response processing strategy
|
|
2092
2092
|
*/
|
|
2093
|
-
type ResponseProcessingStrategy = 'template' | 'ruleGroup';
|
|
2093
|
+
export type ResponseProcessingStrategy = 'template' | 'ruleGroup';
|
|
2094
2094
|
/**
|
|
2095
2095
|
* Response processing configuration
|
|
2096
2096
|
*/
|
|
2097
|
-
interface QtiResponseProcessing {
|
|
2097
|
+
export interface QtiResponseProcessing {
|
|
2098
2098
|
strategy: ResponseProcessingStrategy;
|
|
2099
2099
|
templateUrl?: string;
|
|
2100
2100
|
ruleGroups?: QtiResponseCondition[];
|
|
@@ -2103,7 +2103,7 @@ interface QtiResponseProcessing {
|
|
|
2103
2103
|
/**
|
|
2104
2104
|
* Response condition (if/elseif/else structure)
|
|
2105
2105
|
*/
|
|
2106
|
-
interface QtiResponseCondition {
|
|
2106
|
+
export interface QtiResponseCondition {
|
|
2107
2107
|
responseIf: QtiResponseIf;
|
|
2108
2108
|
responseElseIf?: QtiResponseElseIf[];
|
|
2109
2109
|
responseElse?: QtiResponseElse;
|
|
@@ -2111,31 +2111,31 @@ interface QtiResponseCondition {
|
|
|
2111
2111
|
/**
|
|
2112
2112
|
* Response if block
|
|
2113
2113
|
*/
|
|
2114
|
-
interface QtiResponseIf {
|
|
2114
|
+
export interface QtiResponseIf {
|
|
2115
2115
|
condition: QtiExpression;
|
|
2116
2116
|
actions: QtiAction[];
|
|
2117
2117
|
}
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Response else-if block
|
|
2120
2120
|
*/
|
|
2121
|
-
interface QtiResponseElseIf {
|
|
2121
|
+
export interface QtiResponseElseIf {
|
|
2122
2122
|
condition: QtiExpression;
|
|
2123
2123
|
actions: QtiAction[];
|
|
2124
2124
|
}
|
|
2125
2125
|
/**
|
|
2126
2126
|
* Response else block
|
|
2127
2127
|
*/
|
|
2128
|
-
interface QtiResponseElse {
|
|
2128
|
+
export interface QtiResponseElse {
|
|
2129
2129
|
actions: QtiAction[];
|
|
2130
2130
|
}
|
|
2131
2131
|
/**
|
|
2132
2132
|
* QTI expression (for conditions)
|
|
2133
2133
|
*/
|
|
2134
|
-
type QtiExpression = QtiStringMatch | QtiVariable | QtiCorrect | QtiBaseValue | QtiSubtract | QtiMax;
|
|
2134
|
+
export type QtiExpression = QtiStringMatch | QtiVariable | QtiCorrect | QtiBaseValue | QtiSubtract | QtiMax;
|
|
2135
2135
|
/**
|
|
2136
2136
|
* String match expression
|
|
2137
2137
|
*/
|
|
2138
|
-
interface QtiStringMatch {
|
|
2138
|
+
export interface QtiStringMatch {
|
|
2139
2139
|
type: 'stringMatch';
|
|
2140
2140
|
caseSensitive: boolean;
|
|
2141
2141
|
variable: string;
|
|
@@ -2144,21 +2144,21 @@ interface QtiStringMatch {
|
|
|
2144
2144
|
/**
|
|
2145
2145
|
* Variable reference
|
|
2146
2146
|
*/
|
|
2147
|
-
interface QtiVariable {
|
|
2147
|
+
export interface QtiVariable {
|
|
2148
2148
|
type: 'variable';
|
|
2149
2149
|
identifier: string;
|
|
2150
2150
|
}
|
|
2151
2151
|
/**
|
|
2152
2152
|
* Correct response reference
|
|
2153
2153
|
*/
|
|
2154
|
-
interface QtiCorrect {
|
|
2154
|
+
export interface QtiCorrect {
|
|
2155
2155
|
type: 'correct';
|
|
2156
2156
|
identifier: string;
|
|
2157
2157
|
}
|
|
2158
2158
|
/**
|
|
2159
2159
|
* Base value (literal)
|
|
2160
2160
|
*/
|
|
2161
|
-
interface QtiBaseValue {
|
|
2161
|
+
export interface QtiBaseValue {
|
|
2162
2162
|
type: 'baseValue';
|
|
2163
2163
|
baseType: 'float' | 'integer' | 'string' | 'boolean';
|
|
2164
2164
|
value: string | number | boolean;
|
|
@@ -2166,25 +2166,25 @@ interface QtiBaseValue {
|
|
|
2166
2166
|
/**
|
|
2167
2167
|
* Subtract expression
|
|
2168
2168
|
*/
|
|
2169
|
-
interface QtiSubtract {
|
|
2169
|
+
export interface QtiSubtract {
|
|
2170
2170
|
type: 'subtract';
|
|
2171
2171
|
operands: [QtiExpression, QtiExpression];
|
|
2172
2172
|
}
|
|
2173
2173
|
/**
|
|
2174
2174
|
* Max expression
|
|
2175
2175
|
*/
|
|
2176
|
-
interface QtiMax {
|
|
2176
|
+
export interface QtiMax {
|
|
2177
2177
|
type: 'max';
|
|
2178
2178
|
operands: QtiExpression[];
|
|
2179
2179
|
}
|
|
2180
2180
|
/**
|
|
2181
2181
|
* QTI action (outcome updates)
|
|
2182
2182
|
*/
|
|
2183
|
-
type QtiAction = QtiSetOutcomeValue;
|
|
2183
|
+
export type QtiAction = QtiSetOutcomeValue;
|
|
2184
2184
|
/**
|
|
2185
2185
|
* Set outcome value action
|
|
2186
2186
|
*/
|
|
2187
|
-
interface QtiSetOutcomeValue {
|
|
2187
|
+
export interface QtiSetOutcomeValue {
|
|
2188
2188
|
type: 'setOutcomeValue';
|
|
2189
2189
|
identifier: string;
|
|
2190
2190
|
expression: QtiExpression;
|
|
@@ -2192,7 +2192,7 @@ interface QtiSetOutcomeValue {
|
|
|
2192
2192
|
/**
|
|
2193
2193
|
* Assessment item AST
|
|
2194
2194
|
*/
|
|
2195
|
-
interface QtiAssessmentItem {
|
|
2195
|
+
export interface QtiAssessmentItem {
|
|
2196
2196
|
identifier: string;
|
|
2197
2197
|
title?: string;
|
|
2198
2198
|
adaptive: boolean;
|
|
@@ -2214,7 +2214,7 @@ interface QtiAssessmentItem {
|
|
|
2214
2214
|
* Assessment stimulus AST (QTI 2.2 shared stimulus)
|
|
2215
2215
|
* Used for sharedpassage features
|
|
2216
2216
|
*/
|
|
2217
|
-
interface QtiAssessmentStimulus {
|
|
2217
|
+
export interface QtiAssessmentStimulus {
|
|
2218
2218
|
identifier: string;
|
|
2219
2219
|
title?: string;
|
|
2220
2220
|
instructorStimulus?: string;
|
|
@@ -2230,7 +2230,7 @@ interface QtiAssessmentStimulus {
|
|
|
2230
2230
|
/**
|
|
2231
2231
|
* Reference to an assessmentItem in the test
|
|
2232
2232
|
*/
|
|
2233
|
-
interface QtiItemRef {
|
|
2233
|
+
export interface QtiItemRef {
|
|
2234
2234
|
/** Unique identifier for this item reference */
|
|
2235
2235
|
identifier: string;
|
|
2236
2236
|
/** Relative path to the assessmentItem XML file */
|
|
@@ -2239,7 +2239,7 @@ interface QtiItemRef {
|
|
|
2239
2239
|
/**
|
|
2240
2240
|
* Selection constraints for random item selection within a section
|
|
2241
2241
|
*/
|
|
2242
|
-
interface QtiSelection {
|
|
2242
|
+
export interface QtiSelection {
|
|
2243
2243
|
/** Number of items to select */
|
|
2244
2244
|
select: number;
|
|
2245
2245
|
/** Whether to allow selecting the same item multiple times */
|
|
@@ -2248,7 +2248,7 @@ interface QtiSelection {
|
|
|
2248
2248
|
/**
|
|
2249
2249
|
* A section within a test part containing item references
|
|
2250
2250
|
*/
|
|
2251
|
-
interface QtiAssessmentSection {
|
|
2251
|
+
export interface QtiAssessmentSection {
|
|
2252
2252
|
/** Unique identifier for this section */
|
|
2253
2253
|
identifier: string;
|
|
2254
2254
|
/** Human-readable title */
|
|
@@ -2267,7 +2267,7 @@ interface QtiAssessmentSection {
|
|
|
2267
2267
|
/**
|
|
2268
2268
|
* A part of an assessment test
|
|
2269
2269
|
*/
|
|
2270
|
-
interface QtiTestPart {
|
|
2270
|
+
export interface QtiTestPart {
|
|
2271
2271
|
/** Unique identifier for this test part */
|
|
2272
2272
|
identifier: string;
|
|
2273
2273
|
/** Navigation mode (linear or nonlinear) */
|
|
@@ -2280,7 +2280,7 @@ interface QtiTestPart {
|
|
|
2280
2280
|
/**
|
|
2281
2281
|
* Time limits for an assessment test
|
|
2282
2282
|
*/
|
|
2283
|
-
interface QtiTimeLimits {
|
|
2283
|
+
export interface QtiTimeLimits {
|
|
2284
2284
|
/** Maximum time allowed in seconds */
|
|
2285
2285
|
maxTime: number;
|
|
2286
2286
|
/** Whether late submission is allowed after time expires */
|
|
@@ -2289,7 +2289,7 @@ interface QtiTimeLimits {
|
|
|
2289
2289
|
/**
|
|
2290
2290
|
* QTI 2.2 assessmentTest structure
|
|
2291
2291
|
*/
|
|
2292
|
-
interface QtiAssessmentTest {
|
|
2292
|
+
export interface QtiAssessmentTest {
|
|
2293
2293
|
/** Unique identifier for the test */
|
|
2294
2294
|
identifier: string;
|
|
2295
2295
|
/** Human-readable title */
|
|
@@ -2301,7 +2301,7 @@ interface QtiAssessmentTest {
|
|
|
2301
2301
|
}
|
|
2302
2302
|
//#endregion
|
|
2303
2303
|
//#region src/qti-ast/downgradeToQti21.d.ts
|
|
2304
|
-
interface DowngradeResult<T> {
|
|
2304
|
+
export interface DowngradeResult<T> {
|
|
2305
2305
|
/** Downgraded AST (modified in place or cloned) */
|
|
2306
2306
|
ast: T;
|
|
2307
2307
|
/** Diagnostics about lossy conversions */
|
|
@@ -2318,14 +2318,14 @@ interface DowngradeResult<T> {
|
|
|
2318
2318
|
* @param item - QTI 2.2 assessmentItem AST
|
|
2319
2319
|
* @returns { downgraded item, diagnostics }
|
|
2320
2320
|
*/
|
|
2321
|
-
declare function downgradeAssessmentItemToQti21(item: QtiAssessmentItem): DowngradeResult<QtiAssessmentItem>;
|
|
2321
|
+
export declare function downgradeAssessmentItemToQti21(item: QtiAssessmentItem): DowngradeResult<QtiAssessmentItem>;
|
|
2322
2322
|
/**
|
|
2323
2323
|
* Downgrade QTI 2.2 assessmentTest to QTI 2.1
|
|
2324
2324
|
*
|
|
2325
2325
|
* @param test - QTI 2.2 assessmentTest AST
|
|
2326
2326
|
* @returns { downgraded test, diagnostics }
|
|
2327
2327
|
*/
|
|
2328
|
-
declare function downgradeAssessmentTestToQti21(test: QtiAssessmentTest): DowngradeResult<QtiAssessmentTest>;
|
|
2328
|
+
export declare function downgradeAssessmentTestToQti21(test: QtiAssessmentTest): DowngradeResult<QtiAssessmentTest>;
|
|
2329
2329
|
//#endregion
|
|
2330
2330
|
//#region src/learnosity-mapper/mapLearnosityToAst.d.ts
|
|
2331
2331
|
/**
|
|
@@ -2334,27 +2334,27 @@ declare function downgradeAssessmentTestToQti21(test: QtiAssessmentTest): Downgr
|
|
|
2334
2334
|
* @param model - Validated Learnosity Item Model
|
|
2335
2335
|
* @returns { ast?, diagnostics[] }
|
|
2336
2336
|
*/
|
|
2337
|
-
declare function mapLearnosityToAst(model: LearnosityItemModel | null | undefined): {
|
|
2337
|
+
export declare function mapLearnosityToAst(model: LearnosityItemModel | null | undefined): {
|
|
2338
2338
|
ast?: QtiAssessmentItem;
|
|
2339
2339
|
diagnostics: Diagnostic[];
|
|
2340
2340
|
};
|
|
2341
2341
|
//#endregion
|
|
2342
2342
|
//#region src/learnosity-mapper/mapActivityToTest.d.ts
|
|
2343
|
-
interface MapActivityToTestResult {
|
|
2343
|
+
export interface MapActivityToTestResult {
|
|
2344
2344
|
test?: QtiAssessmentTest;
|
|
2345
2345
|
diagnostics: Diagnostic[];
|
|
2346
2346
|
}
|
|
2347
2347
|
/**
|
|
2348
2348
|
* Learnosity section configuration for navigation
|
|
2349
2349
|
*/
|
|
2350
|
-
interface LearnositySectionNavigation {
|
|
2350
|
+
export interface LearnositySectionNavigation {
|
|
2351
2351
|
/** Whether backward navigation is allowed (true = nonlinear, false = linear) */
|
|
2352
2352
|
allowBackward?: boolean;
|
|
2353
2353
|
}
|
|
2354
2354
|
/**
|
|
2355
2355
|
* Learnosity section configuration for time limits
|
|
2356
2356
|
*/
|
|
2357
|
-
interface LearnositySectionTime {
|
|
2357
|
+
export interface LearnositySectionTime {
|
|
2358
2358
|
/** Maximum time in seconds */
|
|
2359
2359
|
maxTime?: number;
|
|
2360
2360
|
/** Time limit type (hard or soft) - maps to allowLateSubmission */
|
|
@@ -2363,7 +2363,7 @@ interface LearnositySectionTime {
|
|
|
2363
2363
|
/**
|
|
2364
2364
|
* Learnosity section configuration
|
|
2365
2365
|
*/
|
|
2366
|
-
interface LearnositySectionConfig {
|
|
2366
|
+
export interface LearnositySectionConfig {
|
|
2367
2367
|
/** Navigation settings */
|
|
2368
2368
|
navigation?: LearnositySectionNavigation;
|
|
2369
2369
|
/** Time limit settings */
|
|
@@ -2374,13 +2374,13 @@ interface LearnositySectionConfig {
|
|
|
2374
2374
|
/**
|
|
2375
2375
|
* A section within a Learnosity activity
|
|
2376
2376
|
*/
|
|
2377
|
-
interface LearnositySection {
|
|
2377
|
+
export interface LearnositySection {
|
|
2378
2378
|
/** Ordered list of item references in this section */
|
|
2379
2379
|
items: string[];
|
|
2380
2380
|
/** Optional section configuration */
|
|
2381
2381
|
config?: LearnositySectionConfig;
|
|
2382
2382
|
}
|
|
2383
|
-
interface ActivityData {
|
|
2383
|
+
export interface ActivityData {
|
|
2384
2384
|
/** Activity reference/identifier */
|
|
2385
2385
|
reference: string;
|
|
2386
2386
|
/** Optional title (deprecated - use data.config.title instead) */
|
|
@@ -2408,10 +2408,10 @@ interface ActivityData {
|
|
|
2408
2408
|
* @param activity - Activity data with reference and item list or sections
|
|
2409
2409
|
* @returns { test?, diagnostics[] }
|
|
2410
2410
|
*/
|
|
2411
|
-
declare function mapActivityToTest(activity: ActivityData): MapActivityToTestResult;
|
|
2411
|
+
export declare function mapActivityToTest(activity: ActivityData): MapActivityToTestResult;
|
|
2412
2412
|
//#endregion
|
|
2413
2413
|
//#region src/learnosity-mapper/convertActivity.d.ts
|
|
2414
|
-
interface ConvertedItem {
|
|
2414
|
+
export interface ConvertedItem {
|
|
2415
2415
|
/** Item reference from Learnosity */
|
|
2416
2416
|
reference: string;
|
|
2417
2417
|
/** QTI XML content */
|
|
@@ -2421,7 +2421,7 @@ interface ConvertedItem {
|
|
|
2421
2421
|
/** Diagnostics from this item's conversion */
|
|
2422
2422
|
diagnostics: Diagnostic[];
|
|
2423
2423
|
}
|
|
2424
|
-
interface ConvertActivityResult {
|
|
2424
|
+
export interface ConvertActivityResult {
|
|
2425
2425
|
/** Generated assessmentTest XML */
|
|
2426
2426
|
testXml?: string;
|
|
2427
2427
|
/** QTI assessmentTest AST */
|
|
@@ -2436,7 +2436,7 @@ interface ConvertActivityResult {
|
|
|
2436
2436
|
/** All diagnostics from conversion */
|
|
2437
2437
|
diagnostics: Diagnostic[];
|
|
2438
2438
|
}
|
|
2439
|
-
interface ConvertActivityOptions {
|
|
2439
|
+
export interface ConvertActivityOptions {
|
|
2440
2440
|
/** Format XML with newlines and indentation */
|
|
2441
2441
|
pretty?: boolean;
|
|
2442
2442
|
/** QTI version (2.1 or 2.2) */
|
|
@@ -2456,7 +2456,7 @@ interface ConvertActivityOptions {
|
|
|
2456
2456
|
* @param options - Conversion options
|
|
2457
2457
|
* @returns { testXml?, test?, items[], diagnostics[] }
|
|
2458
2458
|
*/
|
|
2459
|
-
declare function convertActivity(bundle: LearnosityBundleModel, activityRef: string, options?: ConvertActivityOptions): ConvertActivityResult;
|
|
2459
|
+
export declare function convertActivity(bundle: LearnosityBundleModel, activityRef: string, options?: ConvertActivityOptions): ConvertActivityResult;
|
|
2460
2460
|
//#endregion
|
|
2461
2461
|
//#region src/learnosity-mapper/sanitizeFolderName.d.ts
|
|
2462
2462
|
/**
|
|
@@ -2476,7 +2476,7 @@ declare function convertActivity(bundle: LearnosityBundleModel, activityRef: str
|
|
|
2476
2476
|
* @param fallback - Fallback value if sanitization produces empty string
|
|
2477
2477
|
* @returns Sanitized folder name
|
|
2478
2478
|
*/
|
|
2479
|
-
declare function sanitizeFolderName(input: string, fallback?: string): string;
|
|
2479
|
+
export declare function sanitizeFolderName(input: string, fallback?: string): string;
|
|
2480
2480
|
/**
|
|
2481
2481
|
* Ensure folder name uniqueness by tracking used names
|
|
2482
2482
|
*
|
|
@@ -2484,7 +2484,7 @@ declare function sanitizeFolderName(input: string, fallback?: string): string;
|
|
|
2484
2484
|
* @param usedNames - Set of already-used folder names
|
|
2485
2485
|
* @returns Unique folder name (may have suffix like _2, _3)
|
|
2486
2486
|
*/
|
|
2487
|
-
declare function ensureUniqueFolderName(desiredName: string, usedNames: Set<string>): string;
|
|
2487
|
+
export declare function ensureUniqueFolderName(desiredName: string, usedNames: Set<string>): string;
|
|
2488
2488
|
//#endregion
|
|
2489
2489
|
//#region src/learnosity-mapper/buildPackageFromActivityTypes.d.ts
|
|
2490
2490
|
interface BuildPackageFromActivityOptions {
|
|
@@ -2505,7 +2505,7 @@ interface BuildPackageFromActivityResult {
|
|
|
2505
2505
|
* Rewrite item/stimulus/asset hrefs inside an assessmentTest that has been moved
|
|
2506
2506
|
* into tests/<folderName>/ (two levels deep) so they resolve against the package root.
|
|
2507
2507
|
*/
|
|
2508
|
-
declare function rewriteTestHrefs(testXml: string): string;
|
|
2508
|
+
export declare function rewriteTestHrefs(testXml: string): string;
|
|
2509
2509
|
/**
|
|
2510
2510
|
* Merge one activity's package (`packageResult`) into the combined `pkg`.
|
|
2511
2511
|
*
|
|
@@ -2514,7 +2514,7 @@ declare function rewriteTestHrefs(testXml: string): string;
|
|
|
2514
2514
|
* (normalize CSS first, then stimulus then item resources). Item resources gain a
|
|
2515
2515
|
* dependency on the normalize CSS. Duplicate resources (by identifier) are skipped.
|
|
2516
2516
|
*/
|
|
2517
|
-
declare function mergeActivityPackage(pkg: QtiContentPackage, folderName: string, packageResult: BuildPackageFromActivityResult, addedResourceIds: Set<string>): void;
|
|
2517
|
+
export declare function mergeActivityPackage(pkg: QtiContentPackage, folderName: string, packageResult: BuildPackageFromActivityResult, addedResourceIds: Set<string>): void;
|
|
2518
2518
|
//#endregion
|
|
2519
2519
|
//#region src/qti-serializer/serializeAssessmentItem.d.ts
|
|
2520
2520
|
/**
|
|
@@ -2524,7 +2524,7 @@ declare function mergeActivityPackage(pkg: QtiContentPackage, folderName: string
|
|
|
2524
2524
|
* @param options - Serialization options
|
|
2525
2525
|
* @returns { xml?, diagnostics[] }
|
|
2526
2526
|
*/
|
|
2527
|
-
declare function serializeAssessmentItem(ast: QtiAssessmentItem, options?: {
|
|
2527
|
+
export declare function serializeAssessmentItem(ast: QtiAssessmentItem, options?: {
|
|
2528
2528
|
pretty?: boolean;
|
|
2529
2529
|
version?: QtiVersion;
|
|
2530
2530
|
}): {
|
|
@@ -2533,13 +2533,13 @@ declare function serializeAssessmentItem(ast: QtiAssessmentItem, options?: {
|
|
|
2533
2533
|
};
|
|
2534
2534
|
//#endregion
|
|
2535
2535
|
//#region src/qti-serializer/serializeAssessmentTest.d.ts
|
|
2536
|
-
interface SerializeTestOptions {
|
|
2536
|
+
export interface SerializeTestOptions {
|
|
2537
2537
|
/** Format with newlines and indentation */
|
|
2538
2538
|
pretty?: boolean;
|
|
2539
2539
|
/** QTI version (2.1 or 2.2) */
|
|
2540
2540
|
version?: QtiVersion;
|
|
2541
2541
|
}
|
|
2542
|
-
interface SerializeTestResult {
|
|
2542
|
+
export interface SerializeTestResult {
|
|
2543
2543
|
xml?: string;
|
|
2544
2544
|
diagnostics: Diagnostic[];
|
|
2545
2545
|
}
|
|
@@ -2550,7 +2550,7 @@ interface SerializeTestResult {
|
|
|
2550
2550
|
* @param options - Serialization options
|
|
2551
2551
|
* @returns { xml?, diagnostics[] }
|
|
2552
2552
|
*/
|
|
2553
|
-
declare function serializeAssessmentTest(test: QtiAssessmentTest, options?: SerializeTestOptions): SerializeTestResult;
|
|
2553
|
+
export declare function serializeAssessmentTest(test: QtiAssessmentTest, options?: SerializeTestOptions): SerializeTestResult;
|
|
2554
2554
|
//#endregion
|
|
2555
2555
|
//#region src/qti-to-learnosity/convertShared.d.ts
|
|
2556
2556
|
/**
|
|
@@ -2578,7 +2578,7 @@ interface ConvertOptions {
|
|
|
2578
2578
|
* Convert QTI assessmentItem XML to Learnosity Item JSON
|
|
2579
2579
|
* Supports choiceInteraction (MCQ), textEntryInteraction (clozetext), extendedTextInteraction (longtextV2), matchInteraction (choicematrix), gapMatchInteraction (clozeassociation), inlineChoiceInteraction (clozedropdown), orderInteraction (orderlist), hotspotInteraction (hotspot), hottextInteraction (tokenhighlight), associateInteraction (classification)
|
|
2580
2580
|
*/
|
|
2581
|
-
declare function convertQtiAssessmentItemToLearnosity(inputXml: string, opts?: ConvertOptions): ConvertResult$1;
|
|
2581
|
+
export declare function convertQtiAssessmentItemToLearnosity(inputXml: string, opts?: ConvertOptions): ConvertResult$1;
|
|
2582
2582
|
//#endregion
|
|
2583
2583
|
//#region src/qti-to-learnosity/convertAssessmentTestToActivity.d.ts
|
|
2584
2584
|
type LearnosityActivityJson = {
|
|
@@ -2603,7 +2603,7 @@ interface ConvertResult {
|
|
|
2603
2603
|
* Convert QTI assessmentTest XML to Learnosity Activity JSON
|
|
2604
2604
|
* Supports simple linear tests only (v1)
|
|
2605
2605
|
*/
|
|
2606
|
-
declare function convertAssessmentTestToLearnosityActivity(inputXml: string): ConvertResult;
|
|
2606
|
+
export declare function convertAssessmentTestToLearnosityActivity(inputXml: string): ConvertResult;
|
|
2607
2607
|
//#endregion
|
|
2608
2608
|
//#region src/qti-to-learnosity/convertQtiPackageToLearnosityBundle.d.ts
|
|
2609
2609
|
/** A package entry (ZIP or directory) with raw bytes. Buffer satisfies this too. */
|
|
@@ -2644,14 +2644,14 @@ interface ConvertQtiPackageToLearnosityBundleResult {
|
|
|
2644
2644
|
/**
|
|
2645
2645
|
* Convert QTI Content Package to Learnosity Bundle
|
|
2646
2646
|
*/
|
|
2647
|
-
declare function convertQtiPackageToLearnosityBundle(input: {
|
|
2647
|
+
export declare function convertQtiPackageToLearnosityBundle(input: {
|
|
2648
2648
|
zipBytes: Uint8Array;
|
|
2649
2649
|
} | {
|
|
2650
2650
|
entries: ReadonlyMap<string, PackageEntry>;
|
|
2651
2651
|
}, opts?: ConvertQtiPackageToLearnosityBundleOptions): ConvertQtiPackageToLearnosityBundleResult;
|
|
2652
2652
|
//#endregion
|
|
2653
2653
|
//#region src/qti-to-learnosity/nodeFileAccess.d.ts
|
|
2654
|
-
declare const nodeFileAccess: FileAccess;
|
|
2654
|
+
export declare const nodeFileAccess: FileAccess;
|
|
2655
2655
|
//#endregion
|
|
2656
2656
|
//#region src/qti-package/readZip.d.ts
|
|
2657
2657
|
/**
|
|
@@ -2674,7 +2674,7 @@ interface ReadZipResult {
|
|
|
2674
2674
|
* @param zipPath Path to the ZIP file
|
|
2675
2675
|
* @returns Map of safe entries and diagnostics
|
|
2676
2676
|
*/
|
|
2677
|
-
declare function readZip(zipPath: string): ReadZipResult;
|
|
2677
|
+
export declare function readZip(zipPath: string): ReadZipResult;
|
|
2678
2678
|
//#endregion
|
|
2679
2679
|
//#region src/qti-package/writeZip.d.ts
|
|
2680
2680
|
/**
|
|
@@ -2704,7 +2704,7 @@ interface ZipFileEntry {
|
|
|
2704
2704
|
* @param zipPath Output ZIP file path
|
|
2705
2705
|
* @param files Array of files to include
|
|
2706
2706
|
*/
|
|
2707
|
-
declare function writeZip(zipPath: string, files: ZipFileEntry[]): void;
|
|
2707
|
+
export declare function writeZip(zipPath: string, files: ZipFileEntry[]): void;
|
|
2708
2708
|
//#endregion
|
|
2709
2709
|
//#region src/qti-package/loadPackage.d.ts
|
|
2710
2710
|
/**
|
|
@@ -2728,7 +2728,7 @@ interface LoadPackageResult {
|
|
|
2728
2728
|
* @param zipPath Path to the ZIP file
|
|
2729
2729
|
* @returns Loaded package and diagnostics
|
|
2730
2730
|
*/
|
|
2731
|
-
declare function loadQtiContentPackage(zipPath: string): LoadPackageResult;
|
|
2731
|
+
export declare function loadQtiContentPackage(zipPath: string): LoadPackageResult;
|
|
2732
2732
|
//#endregion
|
|
2733
2733
|
//#region src/qti-package/savePackage.d.ts
|
|
2734
2734
|
/**
|
|
@@ -2750,7 +2750,7 @@ interface SavePackageResult {
|
|
|
2750
2750
|
* @param outputPath Output ZIP file path or directory path
|
|
2751
2751
|
* @returns Diagnostics from saving
|
|
2752
2752
|
*/
|
|
2753
|
-
declare function saveQtiContentPackage(pkg: QtiContentPackage, outputPath: string): SavePackageResult;
|
|
2753
|
+
export declare function saveQtiContentPackage(pkg: QtiContentPackage, outputPath: string): SavePackageResult;
|
|
2754
2754
|
//#endregion
|
|
2755
2755
|
//#region src/learnosity-bundle/loadLearnosityBundle.d.ts
|
|
2756
2756
|
/**
|
|
@@ -2759,7 +2759,7 @@ declare function saveQtiContentPackage(pkg: QtiContentPackage, outputPath: strin
|
|
|
2759
2759
|
* @param bundleDir - Absolute path to bundle directory
|
|
2760
2760
|
* @returns { bundle?, diagnostics[] }
|
|
2761
2761
|
*/
|
|
2762
|
-
declare function loadLearnosityBundle(bundleDir: string): {
|
|
2762
|
+
export declare function loadLearnosityBundle(bundleDir: string): {
|
|
2763
2763
|
bundle?: LearnosityBundleModel;
|
|
2764
2764
|
diagnostics: Diagnostic[];
|
|
2765
2765
|
};
|
|
@@ -2777,7 +2777,7 @@ interface WriteBundleResult {
|
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Write Learnosity Bundle to directory or ZIP
|
|
2779
2779
|
*/
|
|
2780
|
-
declare function writeLearnosityBundle(bundle: {
|
|
2780
|
+
export declare function writeLearnosityBundle(bundle: {
|
|
2781
2781
|
manifest: unknown;
|
|
2782
2782
|
activities: Map<string, unknown>;
|
|
2783
2783
|
items: Map<string, unknown>;
|
|
@@ -2810,7 +2810,7 @@ declare function isPathSafe(relativePath: string, baseDir: string): boolean;
|
|
|
2810
2810
|
* @param fullPath - Absolute path to check
|
|
2811
2811
|
* @returns true if symlink, false otherwise (or if path doesn't exist)
|
|
2812
2812
|
*/
|
|
2813
|
-
declare function isSymlink(fullPath: string): boolean;
|
|
2813
|
+
export declare function isSymlink(fullPath: string): boolean;
|
|
2814
2814
|
/**
|
|
2815
2815
|
* Safely resolve a relative path within a base directory
|
|
2816
2816
|
* Returns null if the path is unsafe or points to a symlink
|
|
@@ -2819,7 +2819,7 @@ declare function isSymlink(fullPath: string): boolean;
|
|
|
2819
2819
|
* @param baseDir - Base directory
|
|
2820
2820
|
* @returns Absolute path if safe, null otherwise
|
|
2821
2821
|
*/
|
|
2822
|
-
declare function safeResolve(relativePath: string, baseDir: string): string | null;
|
|
2822
|
+
export declare function safeResolve(relativePath: string, baseDir: string): string | null;
|
|
2823
2823
|
//#endregion
|
|
2824
2824
|
//#region src/learnosity-mapper/buildPackageFromActivity.d.ts
|
|
2825
2825
|
/**
|
|
@@ -2835,7 +2835,7 @@ declare function safeResolve(relativePath: string, baseDir: string): string | nu
|
|
|
2835
2835
|
* @param options - Build options including bundle directory
|
|
2836
2836
|
* @returns { package?, diagnostics[] }
|
|
2837
2837
|
*/
|
|
2838
|
-
declare function buildPackageFromActivity(conversion: ConvertActivityResult, options: BuildPackageFromActivityOptions): BuildPackageFromActivityResult;
|
|
2838
|
+
export declare function buildPackageFromActivity(conversion: ConvertActivityResult, options: BuildPackageFromActivityOptions): BuildPackageFromActivityResult;
|
|
2839
2839
|
//#endregion
|
|
2840
2840
|
//#region src/qti-to-learnosity/loadPackageDirectory.d.ts
|
|
2841
2841
|
interface LoadPackageDirectoryResult {
|
|
@@ -2847,7 +2847,7 @@ interface LoadPackageDirectoryResult {
|
|
|
2847
2847
|
* Recursively read every file under `dirPath` into an entries map, keyed by the
|
|
2848
2848
|
* forward-slash relative path (matching ZIP entry keys).
|
|
2849
2849
|
*/
|
|
2850
|
-
declare function loadPackageDirectory(dirPath: string): LoadPackageDirectoryResult;
|
|
2850
|
+
export declare function loadPackageDirectory(dirPath: string): LoadPackageDirectoryResult;
|
|
2851
2851
|
//#endregion
|
|
2852
2852
|
//#region src/conversions.node.d.ts
|
|
2853
2853
|
/**
|
|
@@ -2906,7 +2906,7 @@ interface ConvertQtiPackageToLearnosityResult {
|
|
|
2906
2906
|
* @param opts - Conversion options including input, output, and conversion settings
|
|
2907
2907
|
* @returns Diagnostics + summary always; `bundle` only when no `outputPath` is given
|
|
2908
2908
|
*/
|
|
2909
|
-
declare function convertQtiPackageToLearnosity(opts: ConvertQtiPackageToLearnosityOptions): Promise<ConvertQtiPackageToLearnosityResult>;
|
|
2909
|
+
export declare function convertQtiPackageToLearnosity(opts: ConvertQtiPackageToLearnosityOptions): Promise<ConvertQtiPackageToLearnosityResult>;
|
|
2910
2910
|
/**
|
|
2911
2911
|
* Options for converting a Learnosity bundle to a QTI Content Package
|
|
2912
2912
|
*/
|
|
@@ -2945,7 +2945,7 @@ interface ConvertLearnosityToQtiPackageResult {
|
|
|
2945
2945
|
* @param opts - Conversion options including input, output, and conversion settings
|
|
2946
2946
|
* @returns The built QTI Content Package (in-memory) and diagnostics
|
|
2947
2947
|
*/
|
|
2948
|
-
declare function convertLearnosityToQtiPackage(opts: ConvertLearnosityToQtiPackageOptions): ConvertLearnosityToQtiPackageResult;
|
|
2948
|
+
export declare function convertLearnosityToQtiPackage(opts: ConvertLearnosityToQtiPackageOptions): ConvertLearnosityToQtiPackageResult;
|
|
2949
2949
|
//#endregion
|
|
2950
|
-
export {
|
|
2950
|
+
export { type ConversionOptions, type ConversionResult, type ConvertLearnosityToQtiPackageOptions, type ConvertLearnosityToQtiPackageResult, type ConvertQtiPackageToLearnosityBundleOptions, type ConvertQtiPackageToLearnosityBundleResult, type ConvertQtiPackageToLearnosityOptions, type ConvertQtiPackageToLearnosityResult, type Diagnostic, type DiagnosticIssue, type DiagnosticLevel, type DiagnosticsOutput, type DiagnosticsReport, type FileAccess, type FormatDiagnosticsReportOptions, type ItemFilenameSource, type ItemReferenceSource, type LearnosityActivityJson, type LearnosityItemJson, type LearnosityQuestionJson, type LoadPackageDirectoryResult, type LoadPackageResult, type OutputFormat, type PackageEntry, type QtiVersion, type ReadZipResult, type ZipFileEntry, isPathSafe as isBundlePathSafe, isPathSafe$1 as isPathSafe };
|
|
2951
2951
|
//# sourceMappingURL=node.d.ts.map
|