@pie-qti/item-player 0.1.1
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/.turbo/turbo-build.log +1 -0
- package/CHANGELOG.md +9 -0
- package/README.md +466 -0
- package/docs/QTI-COMPLIANCE.md +197 -0
- package/docs/WCAG-2.2-COMPLIANCE.md +466 -0
- package/docs/custom-extractors.md +679 -0
- package/docs/iframe-mode.md +78 -0
- package/docs/security-audit.md +236 -0
- package/docs/server-api.md +691 -0
- package/package.json +78 -0
- package/src/components/ItemBody.svelte +382 -0
- package/src/components/ItemPlayer.svelte +155 -0
- package/src/components/ModalFeedbackDisplay.svelte +87 -0
- package/src/components/actions/typesetAction.ts +74 -0
- package/src/components/index.ts +19 -0
- package/src/components/utils/assignProps.ts +24 -0
- package/src/components/utils/feedbackUtils.ts +140 -0
- package/src/components/utils/index.ts +13 -0
- package/src/core/ComponentRegistry.ts +219 -0
- package/src/core/ItemRenderer.ts +367 -0
- package/src/core/Player.ts +1152 -0
- package/src/core/Plugin.ts +123 -0
- package/src/core/PluginManager.ts +182 -0
- package/src/core/constants.ts +117 -0
- package/src/core/declarations.ts +171 -0
- package/src/core/parsingLimits.ts +62 -0
- package/src/core/random.ts +24 -0
- package/src/core/sanitizer.ts +235 -0
- package/src/core/trustedTypes.ts +63 -0
- package/src/core/urlPolicy.ts +95 -0
- package/src/extensions/MathLiveEditor.ts +310 -0
- package/src/extraction/ExtractionRegistry.ts +295 -0
- package/src/extraction/createContext.ts +47 -0
- package/src/extraction/extractors/associateExtractor.ts +129 -0
- package/src/extraction/extractors/choiceExtractor.ts +110 -0
- package/src/extraction/extractors/customExtractor.ts +72 -0
- package/src/extraction/extractors/drawingExtractor.ts +113 -0
- package/src/extraction/extractors/endAttemptExtractor.ts +74 -0
- package/src/extraction/extractors/extendedTextExtractor.ts +80 -0
- package/src/extraction/extractors/gapMatchExtractor.ts +178 -0
- package/src/extraction/extractors/graphicAssociateExtractor.ts +188 -0
- package/src/extraction/extractors/graphicGapMatchExtractor.ts +185 -0
- package/src/extraction/extractors/graphicOrderExtractor.ts +162 -0
- package/src/extraction/extractors/hotspotExtractor.ts +190 -0
- package/src/extraction/extractors/hottextExtractor.ts +153 -0
- package/src/extraction/extractors/index.ts +111 -0
- package/src/extraction/extractors/inlineChoiceExtractor.ts +88 -0
- package/src/extraction/extractors/matchExtractor.ts +160 -0
- package/src/extraction/extractors/mediaExtractor.ts +168 -0
- package/src/extraction/extractors/orderExtractor.ts +114 -0
- package/src/extraction/extractors/positionObjectExtractor.ts +243 -0
- package/src/extraction/extractors/selectPointExtractor.ts +143 -0
- package/src/extraction/extractors/sliderExtractor.ts +102 -0
- package/src/extraction/extractors/textEntryExtractor.ts +70 -0
- package/src/extraction/extractors/uploadExtractor.ts +73 -0
- package/src/extraction/index.ts +109 -0
- package/src/extraction/types.ts +246 -0
- package/src/extraction/utils.ts +160 -0
- package/src/iframe/IFramePlayerHost.ts +265 -0
- package/src/iframe/index.ts +11 -0
- package/src/iframe/protocol.ts +137 -0
- package/src/index.ts +87 -0
- package/src/server.ts +14 -0
- package/src/types/index.ts +301 -0
- package/src/types/interactions.ts +354 -0
- package/src/types/responseValidation.ts +29 -0
- package/src/utils/PerformanceMonitor.ts +335 -0
- package/src/utils/responseUtils.ts +51 -0
- package/src/utils/touchDragHelper.ts +211 -0
- package/src/web-components/QTIInteractionBase.ts +302 -0
- package/src/web-components/QTIInteractionElement.ts +118 -0
- package/src/web-components/index.ts +21 -0
- package/tests/conformance/FIXTURE_POLICY.md +29 -0
- package/tests/conformance/README.md +70 -0
- package/tests/conformance/fixtures/baseTypes_all/cases.json +61 -0
- package/tests/conformance/fixtures/baseTypes_all/item.xml +131 -0
- package/tests/conformance/fixtures/baseTypes_all/manifest.json +7 -0
- package/tests/conformance/fixtures/choice_match_correct/cases.json +17 -0
- package/tests/conformance/fixtures/choice_match_correct/item.xml +55 -0
- package/tests/conformance/fixtures/choice_match_correct/manifest.json +14 -0
- package/tests/conformance/fixtures/contains_multiple/cases.json +12 -0
- package/tests/conformance/fixtures/contains_multiple/item.xml +37 -0
- package/tests/conformance/fixtures/contains_multiple/manifest.json +13 -0
- package/tests/conformance/fixtures/isNull_isNotNull/cases.json +9 -0
- package/tests/conformance/fixtures/isNull_isNotNull/item.xml +41 -0
- package/tests/conformance/fixtures/isNull_isNotNull/manifest.json +23 -0
- package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/cases.json +27 -0
- package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/item.xml +30 -0
- package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/manifest.json +15 -0
- package/tests/conformance/fixtures/mapResponse_integer_mapKey/cases.json +11 -0
- package/tests/conformance/fixtures/mapResponse_integer_mapKey/item.xml +26 -0
- package/tests/conformance/fixtures/mapResponse_integer_mapKey/manifest.json +13 -0
- package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/cases.json +27 -0
- package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/item.xml +32 -0
- package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/manifest.json +7 -0
- package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/cases.json +9 -0
- package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/item.xml +25 -0
- package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/manifest.json +12 -0
- package/tests/conformance/fixtures/mapResponse_multiple_cardinality/cases.json +12 -0
- package/tests/conformance/fixtures/mapResponse_multiple_cardinality/item.xml +35 -0
- package/tests/conformance/fixtures/mapResponse_multiple_cardinality/manifest.json +11 -0
- package/tests/conformance/fixtures/mapping_bounds_upperLower/cases.json +12 -0
- package/tests/conformance/fixtures/mapping_bounds_upperLower/item.xml +37 -0
- package/tests/conformance/fixtures/mapping_bounds_upperLower/manifest.json +11 -0
- package/tests/conformance/fixtures/mapping_mapResponse/cases.json +22 -0
- package/tests/conformance/fixtures/mapping_mapResponse/item.xml +53 -0
- package/tests/conformance/fixtures/mapping_mapResponse/manifest.json +16 -0
- package/tests/conformance/fixtures/member_multiple/cases.json +12 -0
- package/tests/conformance/fixtures/member_multiple/item.xml +37 -0
- package/tests/conformance/fixtures/member_multiple/manifest.json +13 -0
- package/tests/conformance/fixtures/modalFeedback_basic/cases.json +17 -0
- package/tests/conformance/fixtures/modalFeedback_basic/item.xml +52 -0
- package/tests/conformance/fixtures/modalFeedback_basic/manifest.json +13 -0
- package/tests/conformance/fixtures/multiple_unordered_match/cases.json +17 -0
- package/tests/conformance/fixtures/multiple_unordered_match/item.xml +44 -0
- package/tests/conformance/fixtures/multiple_unordered_match/manifest.json +11 -0
- package/tests/conformance/fixtures/ordered_match/cases.json +17 -0
- package/tests/conformance/fixtures/ordered_match/item.xml +48 -0
- package/tests/conformance/fixtures/ordered_match/manifest.json +13 -0
- package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/cases.json +27 -0
- package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/item.xml +103 -0
- package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/manifest.json +7 -0
- package/tests/conformance/fixtures/outcomeProcessing_exitTest/cases.json +15 -0
- package/tests/conformance/fixtures/outcomeProcessing_exitTest/item.xml +33 -0
- package/tests/conformance/fixtures/outcomeProcessing_exitTest/manifest.json +10 -0
- package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/cases.json +14 -0
- package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/item.xml +26 -0
- package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/manifest.json +8 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/cases.json +17 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/item.xml +43 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/manifest.json +16 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/cases.json +27 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/item.xml +37 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/manifest.json +16 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/cases.json +14 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/item.xml +35 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/manifest.json +8 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/cases.json +14 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/item.xml +35 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/manifest.json +8 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/cases.json +15 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/item.xml +39 -0
- package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/manifest.json +11 -0
- package/tests/conformance/fixtures/outcomeProcessing_testVariables/cases.json +14 -0
- package/tests/conformance/fixtures/outcomeProcessing_testVariables/item.xml +35 -0
- package/tests/conformance/fixtures/outcomeProcessing_testVariables/manifest.json +8 -0
- package/tests/conformance/fixtures/pair_unordered_match/cases.json +22 -0
- package/tests/conformance/fixtures/pair_unordered_match/item.xml +44 -0
- package/tests/conformance/fixtures/pair_unordered_match/manifest.json +13 -0
- package/tests/conformance/fixtures/positionObject_coordinateSystem_aspectRatio/cases.json +95 -0
- package/tests/conformance/fixtures/positionObject_coordinateSystem_aspectRatio/item.xml +53 -0
- package/tests/conformance/fixtures/positionObject_mapResponsePoint_scoring/cases.json +115 -0
- package/tests/conformance/fixtures/positionObject_mapResponsePoint_scoring/item.xml +45 -0
- package/tests/conformance/fixtures/positionObject_mapResponse_wrong/cases.json +29 -0
- package/tests/conformance/fixtures/positionObject_mapResponse_wrong/item.xml +40 -0
- package/tests/conformance/fixtures/responseCondition_elseIf_chain/cases.json +10 -0
- package/tests/conformance/fixtures/responseCondition_elseIf_chain/item.xml +49 -0
- package/tests/conformance/fixtures/responseCondition_elseIf_chain/manifest.json +15 -0
- package/tests/conformance/fixtures/responseProcessing_anyN/cases.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_anyN/item.xml +47 -0
- package/tests/conformance/fixtures/responseProcessing_anyN/manifest.json +16 -0
- package/tests/conformance/fixtures/responseProcessing_anyN_allN/cases.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_anyN_allN/item.xml +69 -0
- package/tests/conformance/fixtures/responseProcessing_anyN_allN/manifest.json +23 -0
- package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/cases.json +15 -0
- package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/item.xml +58 -0
- package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/manifest.json +15 -0
- package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/cases.json +37 -0
- package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/item.xml +94 -0
- package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/manifest.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_containerSize_index/cases.json +33 -0
- package/tests/conformance/fixtures/responseProcessing_containerSize_index/item.xml +79 -0
- package/tests/conformance/fixtures/responseProcessing_containerSize_index/manifest.json +16 -0
- package/tests/conformance/fixtures/responseProcessing_customOperator/cases.json +15 -0
- package/tests/conformance/fixtures/responseProcessing_customOperator/item.xml +30 -0
- package/tests/conformance/fixtures/responseProcessing_customOperator/manifest.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_default_expression/cases.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_default_expression/item.xml +48 -0
- package/tests/conformance/fixtures/responseProcessing_default_expression/manifest.json +13 -0
- package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/cases.json +29 -0
- package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/item.xml +68 -0
- package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/manifest.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/cases.json +39 -0
- package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/item.xml +39 -0
- package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/manifest.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_exitResponse/cases.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_exitResponse/item.xml +25 -0
- package/tests/conformance/fixtures/responseProcessing_exitResponse/manifest.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/cases.json +26 -0
- package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/item.xml +134 -0
- package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/manifest.json +16 -0
- package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/cases.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/item.xml +33 -0
- package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/manifest.json +13 -0
- package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/item.xml +33 -0
- package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/manifest.json +13 -0
- package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/cases.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/item.xml +40 -0
- package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/manifest.json +18 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/item.xml +33 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/manifest.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/cases.json +29 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/item.xml +26 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/manifest.json +7 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/cases.json +23 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/item.xml +28 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/manifest.json +11 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/cases.json +29 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/item.xml +26 -0
- package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/manifest.json +7 -0
- package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/cases.json +31 -0
- package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/item.xml +102 -0
- package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/manifest.json +18 -0
- package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/item.xml +45 -0
- package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/manifest.json +21 -0
- package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/cases.json +26 -0
- package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/item.xml +157 -0
- package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/manifest.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_notEqual_basic/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_notEqual_basic/item.xml +39 -0
- package/tests/conformance/fixtures/responseProcessing_notEqual_basic/manifest.json +18 -0
- package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/item.xml +51 -0
- package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/manifest.json +19 -0
- package/tests/conformance/fixtures/responseProcessing_preCondition/cases.json +31 -0
- package/tests/conformance/fixtures/responseProcessing_preCondition/item.xml +44 -0
- package/tests/conformance/fixtures/responseProcessing_preCondition/manifest.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/cases.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/item.xml +42 -0
- package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/manifest.json +14 -0
- package/tests/conformance/fixtures/responseProcessing_record_fieldValue/cases.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_record_fieldValue/item.xml +40 -0
- package/tests/conformance/fixtures/responseProcessing_record_fieldValue/manifest.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/cases.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/item.xml +63 -0
- package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/manifest.json +9 -0
- package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/cases.json +12 -0
- package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/item.xml +40 -0
- package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/manifest.json +13 -0
- package/tests/conformance/fixtures/responseProcessing_setDefaultValue/cases.json +15 -0
- package/tests/conformance/fixtures/responseProcessing_setDefaultValue/item.xml +67 -0
- package/tests/conformance/fixtures/responseProcessing_setDefaultValue/manifest.json +9 -0
- package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/cases.json +27 -0
- package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/item.xml +69 -0
- package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/manifest.json +10 -0
- package/tests/conformance/fixtures/responseProcessing_subtract_divide/cases.json +15 -0
- package/tests/conformance/fixtures/responseProcessing_subtract_divide/item.xml +35 -0
- package/tests/conformance/fixtures/responseProcessing_subtract_divide/manifest.json +11 -0
- package/tests/conformance/fixtures/responseProcessing_template_map_response/cases.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_template_map_response/item.xml +31 -0
- package/tests/conformance/fixtures/responseProcessing_template_map_response/manifest.json +8 -0
- package/tests/conformance/fixtures/responseProcessing_template_map_response_point/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_template_map_response_point/item.xml +27 -0
- package/tests/conformance/fixtures/responseProcessing_template_map_response_point/manifest.json +8 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct/cases.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct/item.xml +34 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct/manifest.json +8 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/cases.json +22 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/item.xml +30 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/manifest.json +7 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/cases.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/item.xml +30 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/manifest.json +9 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_nothing/cases.json +17 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_nothing/item.xml +30 -0
- package/tests/conformance/fixtures/responseProcessing_template_match_nothing/manifest.json +8 -0
- package/tests/conformance/fixtures/responseProcessing_xiInclude/cases.json +14 -0
- package/tests/conformance/fixtures/responseProcessing_xiInclude/item.xml +25 -0
- package/tests/conformance/fixtures/responseProcessing_xiInclude/manifest.json +9 -0
- package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/cases.json +12 -0
- package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/item.xml +52 -0
- package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/manifest.json +14 -0
- package/tests/conformance/fixtures/templateProcessing_exitTemplate/cases.json +12 -0
- package/tests/conformance/fixtures/templateProcessing_exitTemplate/item.xml +48 -0
- package/tests/conformance/fixtures/templateProcessing_exitTemplate/manifest.json +13 -0
- package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/cases.json +27 -0
- package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/item.xml +74 -0
- package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/manifest.json +22 -0
- package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/cases.json +17 -0
- package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/item.xml +133 -0
- package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/manifest.json +22 -0
- package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/cases.json +12 -0
- package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/item.xml +107 -0
- package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/manifest.json +16 -0
- package/tests/conformance/fixtures/templateProcessing_templateConstraint/cases.json +15 -0
- package/tests/conformance/fixtures/templateProcessing_templateConstraint/item.xml +52 -0
- package/tests/conformance/fixtures/templateProcessing_templateConstraint/manifest.json +14 -0
- package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/cases.json +16 -0
- package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/item.xml +49 -0
- package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/manifest.json +15 -0
- package/tests/conformance/fixtures/template_randomInteger_printedVariable/cases.json +16 -0
- package/tests/conformance/fixtures/template_randomInteger_printedVariable/item.xml +38 -0
- package/tests/conformance/fixtures/template_randomInteger_printedVariable/manifest.json +13 -0
- package/tests/conformance/harness.ts +84 -0
- package/tests/conformance/run-fixtures.test.ts +127 -0
- package/tests/conformance/scripts/normalize-covers.ts +152 -0
- package/tests/conformance/types.ts +53 -0
- package/tests/core/Player.test.ts +563 -0
- package/tests/core/adaptiveItems.test.ts +442 -0
- package/tests/core/correctResponse.test.ts +280 -0
- package/tests/core/interaction-plumbing.test.ts +141 -0
- package/tests/core/modalFeedback.test.ts +308 -0
- package/tests/core/outcome-reset.test.ts +43 -0
- package/tests/extraction/extractors/associateExtractor.test.ts +182 -0
- package/tests/extraction/extractors/choiceExtractor.test.ts +239 -0
- package/tests/extraction/extractors/customExtractor.test.ts +83 -0
- package/tests/extraction/extractors/drawingExtractor.test.ts +94 -0
- package/tests/extraction/extractors/endAttemptExtractor.test.ts +188 -0
- package/tests/extraction/extractors/extendedTextExtractor.test.ts +178 -0
- package/tests/extraction/extractors/gapMatchExtractor.test.ts +318 -0
- package/tests/extraction/extractors/graphicAssociateExtractor.test.ts +260 -0
- package/tests/extraction/extractors/graphicGapMatchExtractor.test.ts +320 -0
- package/tests/extraction/extractors/graphicOrderExtractor.test.ts +223 -0
- package/tests/extraction/extractors/hotspotExtractor.test.ts +298 -0
- package/tests/extraction/extractors/hottextExtractor.test.ts +240 -0
- package/tests/extraction/extractors/inlineChoiceExtractor.test.ts +292 -0
- package/tests/extraction/extractors/matchExtractor.test.ts +241 -0
- package/tests/extraction/extractors/mediaExtractor.test.ts +295 -0
- package/tests/extraction/extractors/orderExtractor.test.ts +212 -0
- package/tests/extraction/extractors/positionObjectExtractor.test.ts +363 -0
- package/tests/extraction/extractors/selectPointExtractor.test.ts +214 -0
- package/tests/extraction/extractors/sliderExtractor.test.ts +293 -0
- package/tests/extraction/extractors/textEntryExtractor.test.ts +133 -0
- package/tests/extraction/extractors/uploadExtractor.test.ts +119 -0
- package/tests/extraction/test-utils.ts +57 -0
- package/tests/iframe/host.test.ts +145 -0
- package/tests/iframe/protocol.test.ts +42 -0
- package/tests/performance/player-benchmarks.bench.ts +191 -0
- package/tests/security/dos-limits.test.ts +56 -0
- package/tests/security/xss-prevention.test.ts +522 -0
- package/tsconfig.json +20 -0
- package/tsconfig.svelte.json +14 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_equalRounded_tolerance",
|
|
3
|
+
"seed": 1,
|
|
4
|
+
"responses": {},
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"name": "equalRounded significantFigure: 3.175 ~= 3.183 @ 3 sig figs",
|
|
8
|
+
"responses": { "RESPONSE": ["3.175"] },
|
|
9
|
+
"expect": { "outcomes": { "ROUNDED_SIG": true } }
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "equalRounded significantFigure: 3.1749 != 3.183 @ 3 sig figs",
|
|
13
|
+
"responses": { "RESPONSE": ["3.1749"] },
|
|
14
|
+
"expect": { "outcomes": { "ROUNDED_SIG": false } }
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "equal absolute tolerance: x=10 tol=0.5 includes bounds => 9.5 is ok",
|
|
18
|
+
"responses": { "RESPONSE": ["9.5"] },
|
|
19
|
+
"expect": { "outcomes": { "TOL_ABS": true } }
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "equal absolute tolerance: x=10 tol=0.5 includes bounds => 10.6 is not ok",
|
|
23
|
+
"responses": { "RESPONSE": ["10.6"] },
|
|
24
|
+
"expect": { "outcomes": { "TOL_ABS": false } }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "equal relative tolerance: x=20 tol=10% includes bounds => 18 is ok",
|
|
28
|
+
"responses": { "RESPONSE": ["18"] },
|
|
29
|
+
"expect": { "outcomes": { "TOL_REL": true } }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "equal relative tolerance: x=20 tol=10% includes bounds => 17.9 is not ok",
|
|
33
|
+
"responses": { "RESPONSE": ["17.9"] },
|
|
34
|
+
"expect": { "outcomes": { "TOL_REL": false } }
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="equalRounded_tolerance" adaptive="false" timeDependent="false">
|
|
2
|
+
<responseDeclaration identifier="RESPONSE" cardinality="single" baseType="float"/>
|
|
3
|
+
|
|
4
|
+
<outcomeDeclaration identifier="ROUNDED_SIG" cardinality="single" baseType="boolean" defaultValue="false"/>
|
|
5
|
+
<outcomeDeclaration identifier="TOL_ABS" cardinality="single" baseType="boolean" defaultValue="false"/>
|
|
6
|
+
<outcomeDeclaration identifier="TOL_REL" cardinality="single" baseType="boolean" defaultValue="false"/>
|
|
7
|
+
|
|
8
|
+
<itemBody>
|
|
9
|
+
<textEntryInteraction responseIdentifier="RESPONSE" expectedLength="16"/>
|
|
10
|
+
</itemBody>
|
|
11
|
+
|
|
12
|
+
<responseProcessing>
|
|
13
|
+
<!-- equalRounded: significantFigure example -->
|
|
14
|
+
<setOutcomeValue identifier="ROUNDED_SIG">
|
|
15
|
+
<equalRounded roundingMode="significantFigure" figures="3">
|
|
16
|
+
<variable identifier="RESPONSE"/>
|
|
17
|
+
<baseValue baseType="float">3.183</baseValue>
|
|
18
|
+
</equalRounded>
|
|
19
|
+
</setOutcomeValue>
|
|
20
|
+
|
|
21
|
+
<!-- equal with absolute tolerance around the first operand (x = 10.0) -->
|
|
22
|
+
<setOutcomeValue identifier="TOL_ABS">
|
|
23
|
+
<equal toleranceMode="absolute" tolerance="0.5" includeLowerBound="true" includeUpperBound="true">
|
|
24
|
+
<baseValue baseType="float">10</baseValue>
|
|
25
|
+
<variable identifier="RESPONSE"/>
|
|
26
|
+
</equal>
|
|
27
|
+
</setOutcomeValue>
|
|
28
|
+
|
|
29
|
+
<!-- equal with relative tolerance: +/-10% around x = 20.0 -->
|
|
30
|
+
<setOutcomeValue identifier="TOL_REL">
|
|
31
|
+
<equal toleranceMode="relative" tolerance="10" includeLowerBound="true" includeUpperBound="true">
|
|
32
|
+
<baseValue baseType="float">20</baseValue>
|
|
33
|
+
<variable identifier="RESPONSE"/>
|
|
34
|
+
</equal>
|
|
35
|
+
</setOutcomeValue>
|
|
36
|
+
</responseProcessing>
|
|
37
|
+
</assessmentItem>
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_equalRounded_tolerance",
|
|
3
|
+
"description": "Covers numeric equalRounded (significantFigure/decimalPlace) and equal toleranceMode (absolute/relative + includeLower/UpperBound).",
|
|
4
|
+
"tags": ["responseProcessing", "equalRounded", "equal", "tolerance", "rounding"],
|
|
5
|
+
"covers": [
|
|
6
|
+
"baseValue",
|
|
7
|
+
"equal",
|
|
8
|
+
"equalRounded",
|
|
9
|
+
"expr.baseValue",
|
|
10
|
+
"expr.equal",
|
|
11
|
+
"expr.equalRounded",
|
|
12
|
+
"expr.variable",
|
|
13
|
+
"stmt.setOutcomeValue"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="responseProcessing_exitResponse" title="exitResponse stops responseProcessing" adaptive="false" timeDependent="false">
|
|
3
|
+
<responseDeclaration identifier="R" cardinality="single" baseType="string"/>
|
|
4
|
+
|
|
5
|
+
<outcomeDeclaration identifier="SCORE" cardinality="single" baseType="integer">
|
|
6
|
+
<defaultValue><value>0</value></defaultValue>
|
|
7
|
+
</outcomeDeclaration>
|
|
8
|
+
|
|
9
|
+
<itemBody>
|
|
10
|
+
<p>Enter any text.</p>
|
|
11
|
+
<textEntryInteraction responseIdentifier="R" expectedLength="20"/>
|
|
12
|
+
</itemBody>
|
|
13
|
+
|
|
14
|
+
<responseProcessing>
|
|
15
|
+
<setOutcomeValue identifier="SCORE">
|
|
16
|
+
<baseValue baseType="integer">1</baseValue>
|
|
17
|
+
</setOutcomeValue>
|
|
18
|
+
<exitResponse/>
|
|
19
|
+
<setOutcomeValue identifier="SCORE">
|
|
20
|
+
<baseValue baseType="integer">2</baseValue>
|
|
21
|
+
</setOutcomeValue>
|
|
22
|
+
</responseProcessing>
|
|
23
|
+
</assessmentItem>
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "internal",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"notes": "exitResponse should stop evaluation of further responseProcessing statements.",
|
|
5
|
+
"covers": [
|
|
6
|
+
"exitResponse",
|
|
7
|
+
"responseProcessing",
|
|
8
|
+
"setOutcomeValue",
|
|
9
|
+
"stmt.exitResponse",
|
|
10
|
+
"stmt.setOutcomeValue"
|
|
11
|
+
]
|
|
12
|
+
}
|
package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/cases.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_inside_duration_statsOperator",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "inside_duration_statsOperator_happy_paths_and_nulls",
|
|
6
|
+
"responses": {},
|
|
7
|
+
"expect": {
|
|
8
|
+
"score": 0,
|
|
9
|
+
"outcomes": {
|
|
10
|
+
"INSIDE_RECT": true,
|
|
11
|
+
"INSIDE_ANY": true,
|
|
12
|
+
"INSIDE_NULL": null,
|
|
13
|
+
"DUR_LT": true,
|
|
14
|
+
"DUR_GTE": true,
|
|
15
|
+
"DUR_NULL": null,
|
|
16
|
+
"STATS_MEAN": 2.5,
|
|
17
|
+
"STATS_SAMPLE_SD": 1.2909944487358056,
|
|
18
|
+
"STATS_NULL_ON_NULL_MEMBER": null,
|
|
19
|
+
"STATS_NULL_ON_NON_NUMERIC": null
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<assessmentItem
|
|
3
|
+
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
|
|
4
|
+
identifier="inside-duration-statsOperator-demo"
|
|
5
|
+
title="inside + duration + statsOperator"
|
|
6
|
+
adaptive="false"
|
|
7
|
+
timeDependent="false">
|
|
8
|
+
|
|
9
|
+
<outcomeDeclaration identifier="INSIDE_RECT" cardinality="single" baseType="boolean">
|
|
10
|
+
<defaultValue><value>false</value></defaultValue>
|
|
11
|
+
</outcomeDeclaration>
|
|
12
|
+
<outcomeDeclaration identifier="INSIDE_ANY" cardinality="single" baseType="boolean">
|
|
13
|
+
<defaultValue><value>false</value></defaultValue>
|
|
14
|
+
</outcomeDeclaration>
|
|
15
|
+
<outcomeDeclaration identifier="INSIDE_NULL" cardinality="single" baseType="boolean">
|
|
16
|
+
<defaultValue/>
|
|
17
|
+
</outcomeDeclaration>
|
|
18
|
+
|
|
19
|
+
<outcomeDeclaration identifier="DUR_LT" cardinality="single" baseType="boolean">
|
|
20
|
+
<defaultValue><value>false</value></defaultValue>
|
|
21
|
+
</outcomeDeclaration>
|
|
22
|
+
<outcomeDeclaration identifier="DUR_GTE" cardinality="single" baseType="boolean">
|
|
23
|
+
<defaultValue><value>false</value></defaultValue>
|
|
24
|
+
</outcomeDeclaration>
|
|
25
|
+
<outcomeDeclaration identifier="DUR_NULL" cardinality="single" baseType="boolean">
|
|
26
|
+
<defaultValue/>
|
|
27
|
+
</outcomeDeclaration>
|
|
28
|
+
|
|
29
|
+
<outcomeDeclaration identifier="STATS_MEAN" cardinality="single" baseType="float">
|
|
30
|
+
<defaultValue><value>0.0</value></defaultValue>
|
|
31
|
+
</outcomeDeclaration>
|
|
32
|
+
<outcomeDeclaration identifier="STATS_SAMPLE_SD" cardinality="single" baseType="float">
|
|
33
|
+
<defaultValue><value>0.0</value></defaultValue>
|
|
34
|
+
</outcomeDeclaration>
|
|
35
|
+
<outcomeDeclaration identifier="STATS_NULL_ON_NULL_MEMBER" cardinality="single" baseType="float">
|
|
36
|
+
<defaultValue/>
|
|
37
|
+
</outcomeDeclaration>
|
|
38
|
+
<outcomeDeclaration identifier="STATS_NULL_ON_NON_NUMERIC" cardinality="single" baseType="float">
|
|
39
|
+
<defaultValue/>
|
|
40
|
+
</outcomeDeclaration>
|
|
41
|
+
|
|
42
|
+
<itemBody>
|
|
43
|
+
<p>Conformance: inside + durationLT/durationGTE + statsOperator.</p>
|
|
44
|
+
</itemBody>
|
|
45
|
+
|
|
46
|
+
<responseProcessing>
|
|
47
|
+
<!-- inside -->
|
|
48
|
+
<setOutcomeValue identifier="INSIDE_RECT">
|
|
49
|
+
<inside shape="rect" coords="0,0,10,10">
|
|
50
|
+
<baseValue baseType="point">5 5</baseValue>
|
|
51
|
+
</inside>
|
|
52
|
+
</setOutcomeValue>
|
|
53
|
+
|
|
54
|
+
<setOutcomeValue identifier="INSIDE_ANY">
|
|
55
|
+
<inside shape="circle" coords="5,5,2">
|
|
56
|
+
<multiple>
|
|
57
|
+
<baseValue baseType="point">0 0</baseValue>
|
|
58
|
+
<baseValue baseType="point">6 6</baseValue>
|
|
59
|
+
</multiple>
|
|
60
|
+
</inside>
|
|
61
|
+
</setOutcomeValue>
|
|
62
|
+
|
|
63
|
+
<setOutcomeValue identifier="INSIDE_NULL">
|
|
64
|
+
<inside shape="rect" coords="0,0,10,10">
|
|
65
|
+
<null/>
|
|
66
|
+
</inside>
|
|
67
|
+
</setOutcomeValue>
|
|
68
|
+
|
|
69
|
+
<!-- duration comparisons -->
|
|
70
|
+
<setOutcomeValue identifier="DUR_LT">
|
|
71
|
+
<durationLT>
|
|
72
|
+
<baseValue baseType="duration">PT1S</baseValue>
|
|
73
|
+
<baseValue baseType="duration">PT2S</baseValue>
|
|
74
|
+
</durationLT>
|
|
75
|
+
</setOutcomeValue>
|
|
76
|
+
|
|
77
|
+
<setOutcomeValue identifier="DUR_GTE">
|
|
78
|
+
<durationGTE>
|
|
79
|
+
<baseValue baseType="duration">PT2S</baseValue>
|
|
80
|
+
<baseValue baseType="duration">PT2S</baseValue>
|
|
81
|
+
</durationGTE>
|
|
82
|
+
</setOutcomeValue>
|
|
83
|
+
|
|
84
|
+
<setOutcomeValue identifier="DUR_NULL">
|
|
85
|
+
<durationLT>
|
|
86
|
+
<null/>
|
|
87
|
+
<baseValue baseType="duration">PT2S</baseValue>
|
|
88
|
+
</durationLT>
|
|
89
|
+
</setOutcomeValue>
|
|
90
|
+
|
|
91
|
+
<!-- statsOperator -->
|
|
92
|
+
<setOutcomeValue identifier="STATS_MEAN">
|
|
93
|
+
<statsOperator name="mean">
|
|
94
|
+
<ordered>
|
|
95
|
+
<baseValue baseType="integer">1</baseValue>
|
|
96
|
+
<baseValue baseType="integer">2</baseValue>
|
|
97
|
+
<baseValue baseType="integer">3</baseValue>
|
|
98
|
+
<baseValue baseType="integer">4</baseValue>
|
|
99
|
+
</ordered>
|
|
100
|
+
</statsOperator>
|
|
101
|
+
</setOutcomeValue>
|
|
102
|
+
|
|
103
|
+
<setOutcomeValue identifier="STATS_SAMPLE_SD">
|
|
104
|
+
<statsOperator name="sampleSD">
|
|
105
|
+
<ordered>
|
|
106
|
+
<baseValue baseType="integer">1</baseValue>
|
|
107
|
+
<baseValue baseType="integer">2</baseValue>
|
|
108
|
+
<baseValue baseType="integer">3</baseValue>
|
|
109
|
+
<baseValue baseType="integer">4</baseValue>
|
|
110
|
+
</ordered>
|
|
111
|
+
</statsOperator>
|
|
112
|
+
</setOutcomeValue>
|
|
113
|
+
|
|
114
|
+
<setOutcomeValue identifier="STATS_NULL_ON_NULL_MEMBER">
|
|
115
|
+
<statsOperator name="mean">
|
|
116
|
+
<multiple>
|
|
117
|
+
<baseValue baseType="integer">1</baseValue>
|
|
118
|
+
<null/>
|
|
119
|
+
</multiple>
|
|
120
|
+
</statsOperator>
|
|
121
|
+
</setOutcomeValue>
|
|
122
|
+
|
|
123
|
+
<setOutcomeValue identifier="STATS_NULL_ON_NON_NUMERIC">
|
|
124
|
+
<statsOperator name="mean">
|
|
125
|
+
<multiple>
|
|
126
|
+
<baseValue baseType="integer">1</baseValue>
|
|
127
|
+
<baseValue baseType="string">x</baseValue>
|
|
128
|
+
</multiple>
|
|
129
|
+
</statsOperator>
|
|
130
|
+
</setOutcomeValue>
|
|
131
|
+
</responseProcessing>
|
|
132
|
+
</assessmentItem>
|
|
133
|
+
|
|
134
|
+
|
package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/manifest.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_inside_duration_statsOperator",
|
|
3
|
+
"title": "responseProcessing: inside + durationLT/durationGTE + statsOperator",
|
|
4
|
+
"description": "Covers QTI 2.2.2 expressions inside(point), durationLT/durationGTE, and statsOperator(name=...).",
|
|
5
|
+
"spec": "QTI 2.2.2",
|
|
6
|
+
"provenance": {
|
|
7
|
+
"source": "authored",
|
|
8
|
+
"license": "CC0-1.0"
|
|
9
|
+
},
|
|
10
|
+
"covers": [
|
|
11
|
+
"expr.durationGTE",
|
|
12
|
+
"expr.durationLT",
|
|
13
|
+
"expr.inside",
|
|
14
|
+
"expr.statsOperator"
|
|
15
|
+
]
|
|
16
|
+
}
|
package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/cases.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_lookupTable_interpolationTable",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "R=0 -> SCORE=0",
|
|
6
|
+
"responses": { "R": 0 },
|
|
7
|
+
"expect": { "score": 0 }
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "R=5 -> SCORE=50 (linear interpolation)",
|
|
11
|
+
"responses": { "R": 5 },
|
|
12
|
+
"expect": { "score": 50 }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "R=-5 -> SCORE=0 (clamp low)",
|
|
16
|
+
"responses": { "R": -5 },
|
|
17
|
+
"expect": { "score": 0 }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "R=12 -> SCORE=100 (clamp high)",
|
|
21
|
+
"responses": { "R": 12 },
|
|
22
|
+
"expect": { "score": 100 }
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<assessmentItem
|
|
3
|
+
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
|
|
4
|
+
identifier="lookupTable_interpolationTable"
|
|
5
|
+
title="lookupTable interpolationTable"
|
|
6
|
+
adaptive="false"
|
|
7
|
+
timeDependent="false">
|
|
8
|
+
<responseDeclaration identifier="R" cardinality="single" baseType="float" />
|
|
9
|
+
|
|
10
|
+
<outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
|
|
11
|
+
<defaultValue>
|
|
12
|
+
<value>0</value>
|
|
13
|
+
</defaultValue>
|
|
14
|
+
</outcomeDeclaration>
|
|
15
|
+
|
|
16
|
+
<itemBody>
|
|
17
|
+
<p>Interpolation table test</p>
|
|
18
|
+
</itemBody>
|
|
19
|
+
|
|
20
|
+
<responseProcessing>
|
|
21
|
+
<setOutcomeValue identifier="SCORE">
|
|
22
|
+
<lookupTable>
|
|
23
|
+
<variable identifier="R" />
|
|
24
|
+
<interpolationTable interpolationMethod="linear" defaultValue="0">
|
|
25
|
+
<interpolationTableEntry sourceValue="0" targetValue="0" />
|
|
26
|
+
<interpolationTableEntry sourceValue="10" targetValue="100" />
|
|
27
|
+
</interpolationTable>
|
|
28
|
+
</lookupTable>
|
|
29
|
+
</setOutcomeValue>
|
|
30
|
+
</responseProcessing>
|
|
31
|
+
</assessmentItem>
|
|
32
|
+
|
|
33
|
+
|
package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/manifest.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "authored",
|
|
3
|
+
"license": "CC0-1.0",
|
|
4
|
+
"notes": "Minimal fixture to cover lookupTable + interpolationTable (linear interpolation + clamping).",
|
|
5
|
+
"covers": [
|
|
6
|
+
"expr.lookupTable",
|
|
7
|
+
"interpolationTable",
|
|
8
|
+
"lookupTable",
|
|
9
|
+
"responseProcessing",
|
|
10
|
+
"setOutcomeValue",
|
|
11
|
+
"stmt.setOutcomeValue"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_lookupTable_matchTable",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "R=1 -> SCORE=2",
|
|
6
|
+
"responses": { "R": 1 },
|
|
7
|
+
"expect": { "score": 2 }
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "R=2 -> SCORE=5",
|
|
11
|
+
"responses": { "R": 2 },
|
|
12
|
+
"expect": { "score": 5 }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "R=3 -> SCORE=0 (defaultValue)",
|
|
16
|
+
"responses": { "R": 3 },
|
|
17
|
+
"expect": { "score": 0 }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<assessmentItem
|
|
3
|
+
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
|
|
4
|
+
identifier="lookupTable_matchTable"
|
|
5
|
+
title="lookupTable matchTable"
|
|
6
|
+
adaptive="false"
|
|
7
|
+
timeDependent="false">
|
|
8
|
+
<responseDeclaration identifier="R" cardinality="single" baseType="integer" />
|
|
9
|
+
|
|
10
|
+
<outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
|
|
11
|
+
<defaultValue>
|
|
12
|
+
<value>0</value>
|
|
13
|
+
</defaultValue>
|
|
14
|
+
</outcomeDeclaration>
|
|
15
|
+
|
|
16
|
+
<itemBody>
|
|
17
|
+
<p>Lookup table test</p>
|
|
18
|
+
</itemBody>
|
|
19
|
+
|
|
20
|
+
<responseProcessing>
|
|
21
|
+
<setOutcomeValue identifier="SCORE">
|
|
22
|
+
<lookupTable>
|
|
23
|
+
<variable identifier="R" />
|
|
24
|
+
<matchTable defaultValue="0">
|
|
25
|
+
<matchTableEntry sourceValue="1" targetValue="2" />
|
|
26
|
+
<matchTableEntry sourceValue="2" targetValue="5" />
|
|
27
|
+
</matchTable>
|
|
28
|
+
</lookupTable>
|
|
29
|
+
</setOutcomeValue>
|
|
30
|
+
</responseProcessing>
|
|
31
|
+
</assessmentItem>
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "authored",
|
|
3
|
+
"license": "CC0-1.0",
|
|
4
|
+
"notes": "Minimal fixture to cover lookupTable + matchTable (defaultValue + numeric key matching).",
|
|
5
|
+
"covers": [
|
|
6
|
+
"expr.lookupTable",
|
|
7
|
+
"lookupTable",
|
|
8
|
+
"matchTable",
|
|
9
|
+
"responseProcessing",
|
|
10
|
+
"setOutcomeValue",
|
|
11
|
+
"stmt.setOutcomeValue"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_mapOutcome_basic",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "R=0 -> RAW=0 -> mapOutcome=0",
|
|
6
|
+
"responses": { "R": "0" },
|
|
7
|
+
"expect": { "outcomes": { "RAW": 0, "SCORE": 0 } }
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "R=1 -> RAW=1 -> mapOutcome=0.5",
|
|
11
|
+
"responses": { "R": "1" },
|
|
12
|
+
"expect": { "outcomes": { "RAW": 1, "SCORE": 0.5 } }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "R=2 -> RAW=2 -> mapOutcome=1",
|
|
16
|
+
"responses": { "R": "2" },
|
|
17
|
+
"expect": { "outcomes": { "RAW": 2, "SCORE": 1 } }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "R=3 -> RAW=3 -> mapOutcome uses defaultValue=0.25",
|
|
21
|
+
"responses": { "R": "3" },
|
|
22
|
+
"expect": { "outcomes": { "RAW": 3, "SCORE": 0.25 } }
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<assessmentItem
|
|
2
|
+
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
|
|
3
|
+
identifier="map_outcome_basic"
|
|
4
|
+
adaptive="false"
|
|
5
|
+
timeDependent="false"
|
|
6
|
+
>
|
|
7
|
+
<responseDeclaration identifier="R" cardinality="single" baseType="integer" />
|
|
8
|
+
|
|
9
|
+
<outcomeDeclaration identifier="RAW" cardinality="single" baseType="integer">
|
|
10
|
+
<defaultValue>
|
|
11
|
+
<value>0</value>
|
|
12
|
+
</defaultValue>
|
|
13
|
+
<mapping defaultValue="0.25" lowerBound="0" upperBound="1">
|
|
14
|
+
<mapEntry mapKey="0" mappedValue="0" />
|
|
15
|
+
<mapEntry mapKey="1" mappedValue="0.5" />
|
|
16
|
+
<mapEntry mapKey="2" mappedValue="1" />
|
|
17
|
+
</mapping>
|
|
18
|
+
</outcomeDeclaration>
|
|
19
|
+
|
|
20
|
+
<outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
|
|
21
|
+
<defaultValue>
|
|
22
|
+
<value>0</value>
|
|
23
|
+
</defaultValue>
|
|
24
|
+
</outcomeDeclaration>
|
|
25
|
+
|
|
26
|
+
<itemBody>
|
|
27
|
+
<textEntryInteraction responseIdentifier="R" expectedLength="2" />
|
|
28
|
+
</itemBody>
|
|
29
|
+
|
|
30
|
+
<responseProcessing>
|
|
31
|
+
<setOutcomeValue identifier="RAW">
|
|
32
|
+
<variable identifier="R" />
|
|
33
|
+
</setOutcomeValue>
|
|
34
|
+
<setOutcomeValue identifier="SCORE">
|
|
35
|
+
<mapOutcome identifier="RAW" />
|
|
36
|
+
</setOutcomeValue>
|
|
37
|
+
</responseProcessing>
|
|
38
|
+
</assessmentItem>
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_mapOutcome_basic",
|
|
3
|
+
"title": "responseProcessing: mapOutcome",
|
|
4
|
+
"specVersion": "imsqti_v2p2",
|
|
5
|
+
"license": "CC0-1.0",
|
|
6
|
+
"source": "authored",
|
|
7
|
+
"notes": "Maps an outcome variable through outcomeDeclaration<mapping> using <mapOutcome> including defaultValue and bounds.",
|
|
8
|
+
"covers": [
|
|
9
|
+
"baseValue",
|
|
10
|
+
"expr.baseValue",
|
|
11
|
+
"expr.mapOutcome",
|
|
12
|
+
"expr.variable",
|
|
13
|
+
"mapOutcome",
|
|
14
|
+
"stmt.setOutcomeValue"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_mapResponsePoint_basic",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "inside rect => 2",
|
|
6
|
+
"responses": { "RESPONSE": "10 10" },
|
|
7
|
+
"expect": { "outcomes": { "SCORE": 2 } }
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "inside circle => 1",
|
|
11
|
+
"responses": { "RESPONSE": "75 84" },
|
|
12
|
+
"expect": { "outcomes": { "SCORE": 1 } }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "outside all => default 0",
|
|
16
|
+
"responses": { "RESPONSE": "200 200" },
|
|
17
|
+
"expect": { "outcomes": { "SCORE": 0 } }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<assessmentItem
|
|
3
|
+
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
|
|
4
|
+
identifier="responseProcessing_mapResponsePoint_basic"
|
|
5
|
+
title="mapResponsePoint basic"
|
|
6
|
+
adaptive="false"
|
|
7
|
+
timeDependent="false"
|
|
8
|
+
>
|
|
9
|
+
<responseDeclaration identifier="RESPONSE" cardinality="single" baseType="point">
|
|
10
|
+
<areaMapping defaultValue="0" lowerBound="0" upperBound="2">
|
|
11
|
+
<!-- rect: x1,y1,x2,y2 -->
|
|
12
|
+
<areaMapEntry shape="rect" coords="0,0,50,50" mappedValue="2"/>
|
|
13
|
+
<!-- circle: cx,cy,r -->
|
|
14
|
+
<areaMapEntry shape="circle" coords="75,75,10" mappedValue="1"/>
|
|
15
|
+
</areaMapping>
|
|
16
|
+
</responseDeclaration>
|
|
17
|
+
|
|
18
|
+
<outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
|
|
19
|
+
<defaultValue><value>0</value></defaultValue>
|
|
20
|
+
</outcomeDeclaration>
|
|
21
|
+
|
|
22
|
+
<itemBody>
|
|
23
|
+
<p>Point scoring item (fixture)</p>
|
|
24
|
+
</itemBody>
|
|
25
|
+
|
|
26
|
+
<responseProcessing>
|
|
27
|
+
<setOutcomeValue identifier="SCORE">
|
|
28
|
+
<mapResponsePoint identifier="RESPONSE"/>
|
|
29
|
+
</setOutcomeValue>
|
|
30
|
+
</responseProcessing>
|
|
31
|
+
</assessmentItem>
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "responseProcessing_mapResponsePoint_basic",
|
|
3
|
+
"title": "mapResponsePoint with areaMapping (rect/circle/default)",
|
|
4
|
+
"description": "Scores a point response using areaMapping via mapResponsePoint.",
|
|
5
|
+
"spec": "QTI 2.x responseProcessing",
|
|
6
|
+
"covers": [
|
|
7
|
+
"baseValue",
|
|
8
|
+
"expr.baseValue",
|
|
9
|
+
"expr.mapResponsePoint",
|
|
10
|
+
"mapResponsePoint"
|
|
11
|
+
]
|
|
12
|
+
}
|