@citolab/qti-components 7.2.2 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/chunk-2PEB7XOI.js +1 -0
- package/cdn/chunks/chunk-2YSPUZLT.js +2 -0
- package/cdn/chunks/chunk-3HVTDMTS.js +1 -0
- package/cdn/chunks/chunk-3YJ5LGHO.js +1 -0
- package/cdn/chunks/chunk-4HD4LAOA.js +2 -0
- package/cdn/chunks/chunk-4PXGOA73.js +1 -0
- package/cdn/chunks/chunk-4U6VOTDY.js +2 -0
- package/cdn/chunks/chunk-5B5ZBB3H.js +2 -0
- package/cdn/chunks/chunk-6KJL4I6M.js +1 -0
- package/cdn/chunks/chunk-7ASLC5ZB.js +1 -0
- package/cdn/chunks/chunk-7OAHC7YP.js +1 -0
- package/cdn/chunks/chunk-7P7BX6D6.js +1 -0
- package/cdn/chunks/chunk-AH2FX4HG.js +1 -0
- package/cdn/chunks/chunk-ALDED3YL.js +1 -0
- package/cdn/chunks/chunk-AOQNGPU3.js +1 -0
- package/cdn/chunks/chunk-ARYTJGGM.js +8 -0
- package/cdn/chunks/chunk-BS7S3RPY.js +1 -0
- package/cdn/chunks/chunk-BSL7QSJS.js +1 -0
- package/cdn/chunks/chunk-C2RWTG52.js +1 -0
- package/cdn/chunks/chunk-DKMPPZUE.js +2 -0
- package/cdn/chunks/chunk-DNPPZXZF.js +1 -0
- package/cdn/chunks/chunk-EJQGI6MR.js +1 -0
- package/cdn/chunks/chunk-EKAFL2KP.js +1 -0
- package/cdn/chunks/chunk-F63HVNEI.js +1 -0
- package/cdn/chunks/chunk-FKNSURIA.js +2 -0
- package/cdn/chunks/chunk-FNCQNHCU.js +1 -0
- package/cdn/chunks/chunk-GTDTMMHF.js +2 -0
- package/cdn/chunks/chunk-GYF5ZDB3.js +1 -0
- package/cdn/chunks/chunk-H6ZOKOLE.js +1 -0
- package/cdn/chunks/chunk-HCAWI7AZ.js +1 -0
- package/cdn/chunks/chunk-I25TBSYM.js +8 -0
- package/cdn/chunks/chunk-IAXDPXPS.js +2 -0
- package/cdn/chunks/chunk-JATFFFTP.js +1 -0
- package/cdn/chunks/chunk-JFCDOKX7.js +2 -0
- package/cdn/chunks/chunk-JSCH2J4L.js +2 -0
- package/cdn/chunks/chunk-LZMZV6TD.js +2 -0
- package/cdn/chunks/chunk-MR6ZHDES.js +1 -0
- package/cdn/chunks/chunk-N6A5NZLH.js +1 -0
- package/cdn/chunks/chunk-NNGQPZRR.js +2 -0
- package/cdn/chunks/chunk-NTHP3CIK.js +1 -0
- package/cdn/chunks/chunk-NUS4RU5N.js +1 -0
- package/cdn/chunks/chunk-OJTWWSZH.js +1 -0
- package/cdn/chunks/chunk-P6SSTAJ2.js +1 -0
- package/cdn/chunks/chunk-PACSO5NR.js +1 -0
- package/cdn/chunks/chunk-Q4UYMUWQ.js +1 -0
- package/cdn/chunks/chunk-QNNLXEUP.js +1 -0
- package/cdn/chunks/chunk-R345NUSS.js +2 -0
- package/cdn/chunks/chunk-RATUNBN5.js +1 -0
- package/cdn/chunks/chunk-RAXTSUAP.js +1 -0
- package/cdn/chunks/chunk-SGUBIUUK.js +1 -0
- package/cdn/chunks/chunk-SKCRMPN3.js +8 -0
- package/cdn/chunks/chunk-SXYEFBGL.js +2 -0
- package/cdn/chunks/chunk-TDDS7QJB.js +48 -0
- package/cdn/chunks/chunk-TDKNW4KB.js +1 -0
- package/cdn/chunks/chunk-TTH5243V.js +1 -0
- package/cdn/chunks/chunk-U4D7JJMM.js +1 -0
- package/cdn/chunks/chunk-UGQPBOTB.js +17 -0
- package/cdn/chunks/chunk-UO3YPQWX.js +1 -0
- package/cdn/chunks/chunk-UOYDBSKF.js +1 -0
- package/cdn/chunks/chunk-W3L3NJQM.js +1 -0
- package/cdn/chunks/chunk-XDXLBDGD.js +2 -0
- package/cdn/chunks/chunk-XLVU3CES.js +1 -0
- package/cdn/chunks/chunk-YL5IGHSU.js +1 -0
- package/cdn/chunks/chunk-ZNLWZYAX.js +5 -0
- package/cdn/chunks/chunk-ZWUH2GAI.js +1 -0
- package/cdn/exports/computed.context.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/test-navigation.js +1 -1
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-print-context.js +1 -1
- package/cdn/qti-test/components/test-print-item-variables.js +1 -1
- package/cdn/qti-test/components/test-scoring-buttons.js +1 -1
- package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
- package/cdn/qti-test/components/test-scoring-toggle.js +1 -0
- package/cdn/qti-test/components/test-section-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-show-correct-response.js +1 -1
- package/cdn/qti-test/components/test-stamp.js +1 -1
- package/cdn/qti-test/components/test-view-toggle copy.js +1 -0
- package/cdn/qti-test/components/test-view-toggle.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/dist/chunks/chunk-22IRJWWY.js +10 -0
- package/dist/chunks/chunk-22IRJWWY.js.map +1 -0
- package/dist/chunks/chunk-254VCWDJ.js +249 -0
- package/dist/chunks/chunk-254VCWDJ.js.map +1 -0
- package/dist/chunks/chunk-2SJOPI6B.js +45 -0
- package/dist/chunks/chunk-2SJOPI6B.js.map +1 -0
- package/dist/chunks/chunk-2WZXGGU3.js +85 -0
- package/dist/chunks/chunk-2WZXGGU3.js.map +1 -0
- package/dist/chunks/chunk-36G5MQKR.js +85 -0
- package/dist/chunks/chunk-36G5MQKR.js.map +1 -0
- package/dist/chunks/chunk-3L7UTYZ5.js +92 -0
- package/dist/chunks/chunk-3L7UTYZ5.js.map +1 -0
- package/dist/chunks/chunk-3N546FXF.js +81 -0
- package/dist/chunks/chunk-3N546FXF.js.map +1 -0
- package/dist/chunks/chunk-3QOIGEC7.js +92 -0
- package/dist/chunks/chunk-3QOIGEC7.js.map +1 -0
- package/dist/chunks/chunk-3UAT3IXP.js +85 -0
- package/dist/chunks/chunk-3UAT3IXP.js.map +1 -0
- package/dist/chunks/chunk-4KYSAVEL.js +85 -0
- package/dist/chunks/chunk-4KYSAVEL.js.map +1 -0
- package/dist/chunks/chunk-4OGJBG35.js +8 -0
- package/dist/chunks/chunk-4OGJBG35.js.map +1 -0
- package/dist/chunks/chunk-4UEAQMY4.js +28 -0
- package/dist/chunks/chunk-4UEAQMY4.js.map +1 -0
- package/dist/chunks/chunk-5F52D6LQ.js +64 -0
- package/dist/chunks/chunk-5F52D6LQ.js.map +1 -0
- package/dist/chunks/chunk-5FEXUWZH.js +28 -0
- package/dist/chunks/chunk-5FEXUWZH.js.map +1 -0
- package/dist/chunks/chunk-6ELX5242.js +234 -0
- package/dist/chunks/chunk-6ELX5242.js.map +1 -0
- package/dist/chunks/chunk-6FJB3RNO.js +65 -0
- package/dist/chunks/chunk-6FJB3RNO.js.map +1 -0
- package/dist/chunks/chunk-6HSX33RT.js +239 -0
- package/dist/chunks/chunk-6HSX33RT.js.map +1 -0
- package/dist/chunks/chunk-6KHKAHVS.js +235 -0
- package/dist/chunks/chunk-6KHKAHVS.js.map +1 -0
- package/dist/chunks/chunk-6YAR3VHX.js +56 -0
- package/dist/chunks/chunk-6YAR3VHX.js.map +1 -0
- package/dist/chunks/chunk-7SGVY6AL.js +85 -0
- package/dist/chunks/chunk-7SGVY6AL.js.map +1 -0
- package/dist/chunks/chunk-7ZME7TLK.js +81 -0
- package/dist/chunks/chunk-7ZME7TLK.js.map +1 -0
- package/dist/chunks/chunk-AZIKAG7K.js +8 -0
- package/dist/chunks/chunk-AZIKAG7K.js.map +1 -0
- package/dist/chunks/chunk-B2J3M334.js +92 -0
- package/dist/chunks/chunk-B2J3M334.js.map +1 -0
- package/dist/chunks/chunk-BEFR3ACM.js +241 -0
- package/dist/chunks/chunk-BEFR3ACM.js.map +1 -0
- package/dist/chunks/chunk-BSDFAZ5E.js +43 -0
- package/dist/chunks/chunk-BSDFAZ5E.js.map +1 -0
- package/dist/chunks/chunk-BTNZ5BZC.js +99 -0
- package/dist/chunks/chunk-BTNZ5BZC.js.map +1 -0
- package/dist/chunks/chunk-CL26AHAV.js +65 -0
- package/dist/chunks/chunk-CL26AHAV.js.map +1 -0
- package/dist/chunks/chunk-CLLDFOBO.js +64 -0
- package/dist/chunks/chunk-CLLDFOBO.js.map +1 -0
- package/dist/chunks/chunk-CO4K3UIU.js +81 -0
- package/dist/chunks/chunk-CO4K3UIU.js.map +1 -0
- package/dist/chunks/chunk-CRFBT36M.js +85 -0
- package/dist/chunks/chunk-CRFBT36M.js.map +1 -0
- package/dist/chunks/chunk-CRI6TK2F.js +81 -0
- package/dist/chunks/chunk-CRI6TK2F.js.map +1 -0
- package/dist/chunks/chunk-CS3XEHIS.js +64 -0
- package/dist/chunks/chunk-CS3XEHIS.js.map +1 -0
- package/dist/chunks/chunk-D47JA24G.js +85 -0
- package/dist/chunks/chunk-D47JA24G.js.map +1 -0
- package/dist/chunks/chunk-DIEBUNEE.js +83 -0
- package/dist/chunks/chunk-DIEBUNEE.js.map +1 -0
- package/dist/chunks/chunk-DLBPLBZU.js +85 -0
- package/dist/chunks/chunk-DLBPLBZU.js.map +1 -0
- package/dist/chunks/chunk-DNBDU6ZU.js +45 -0
- package/dist/chunks/chunk-DNBDU6ZU.js.map +1 -0
- package/dist/chunks/chunk-DNLC7HVK.js +870 -0
- package/dist/chunks/chunk-DNLC7HVK.js.map +1 -0
- package/dist/chunks/chunk-DSAPUEWR.js +81 -0
- package/dist/chunks/chunk-DSAPUEWR.js.map +1 -0
- package/dist/chunks/chunk-DZAOLWAS.js +238 -0
- package/dist/chunks/chunk-DZAOLWAS.js.map +1 -0
- package/dist/chunks/chunk-E572KIOQ.js +83 -0
- package/dist/chunks/chunk-E572KIOQ.js.map +1 -0
- package/dist/chunks/chunk-EIIKSMCN.js +96 -0
- package/dist/chunks/chunk-EIIKSMCN.js.map +1 -0
- package/dist/chunks/chunk-EJZQSOHU.js +85 -0
- package/dist/chunks/chunk-EJZQSOHU.js.map +1 -0
- package/dist/chunks/chunk-EP4SJRC6.js +99 -0
- package/dist/chunks/chunk-EP4SJRC6.js.map +1 -0
- package/dist/chunks/chunk-EXNO2VEU.js +85 -0
- package/dist/chunks/chunk-EXNO2VEU.js.map +1 -0
- package/dist/chunks/chunk-FAMJLVHG.js +92 -0
- package/dist/chunks/chunk-FAMJLVHG.js.map +1 -0
- package/dist/chunks/chunk-FBE6FA2H.js +45 -0
- package/dist/chunks/chunk-FBE6FA2H.js.map +1 -0
- package/dist/chunks/chunk-FEIMJLFV.js +85 -0
- package/dist/chunks/chunk-FEIMJLFV.js.map +1 -0
- package/dist/chunks/chunk-FIN4YG3K.js +233 -0
- package/dist/chunks/chunk-FIN4YG3K.js.map +1 -0
- package/dist/chunks/chunk-FQMHR6ZF.js +92 -0
- package/dist/chunks/chunk-FQMHR6ZF.js.map +1 -0
- package/dist/chunks/chunk-FS7SRRSA.js +96 -0
- package/dist/chunks/chunk-FS7SRRSA.js.map +1 -0
- package/dist/chunks/chunk-G5R527RC.js +90 -0
- package/dist/chunks/chunk-G5R527RC.js.map +1 -0
- package/dist/chunks/chunk-GBGZRLXO.js +45 -0
- package/dist/chunks/chunk-GBGZRLXO.js.map +1 -0
- package/dist/chunks/chunk-GBU4IXYM.js +95 -0
- package/dist/chunks/chunk-GBU4IXYM.js.map +1 -0
- package/dist/chunks/chunk-GDZ632HR.js +244 -0
- package/dist/chunks/chunk-GDZ632HR.js.map +1 -0
- package/dist/chunks/chunk-GE7AVAEW.js +99 -0
- package/dist/chunks/chunk-GE7AVAEW.js.map +1 -0
- package/dist/chunks/chunk-GXXWWT6Y.js +96 -0
- package/dist/chunks/chunk-GXXWWT6Y.js.map +1 -0
- package/dist/chunks/chunk-H7YSTWT5.js +45 -0
- package/dist/chunks/chunk-H7YSTWT5.js.map +1 -0
- package/dist/chunks/chunk-HAP4ICAJ.js +8 -0
- package/dist/chunks/chunk-HAP4ICAJ.js.map +1 -0
- package/dist/chunks/chunk-HARRGXYA.js +243 -0
- package/dist/chunks/chunk-HARRGXYA.js.map +1 -0
- package/dist/chunks/chunk-HNCSSLU6.js +95 -0
- package/dist/chunks/chunk-HNCSSLU6.js.map +1 -0
- package/dist/chunks/chunk-IDZOOEB2.js +85 -0
- package/dist/chunks/chunk-IDZOOEB2.js.map +1 -0
- package/dist/chunks/chunk-IGSFWBNK.js +235 -0
- package/dist/chunks/chunk-IGSFWBNK.js.map +1 -0
- package/dist/chunks/chunk-IPRRYKZD.js +95 -0
- package/dist/chunks/chunk-IPRRYKZD.js.map +1 -0
- package/dist/chunks/chunk-J3I5LKXH.js +60 -0
- package/dist/chunks/chunk-J3I5LKXH.js.map +1 -0
- package/dist/chunks/chunk-JDSSQE7I.js +56 -0
- package/dist/chunks/chunk-JDSSQE7I.js.map +1 -0
- package/dist/chunks/chunk-JKX62AOP.js +8 -0
- package/dist/chunks/chunk-JKX62AOP.js.map +1 -0
- package/dist/chunks/chunk-JMYRH33D.js +84 -0
- package/dist/chunks/chunk-JMYRH33D.js.map +1 -0
- package/dist/chunks/chunk-JX3F6YCC.js +43 -0
- package/dist/chunks/chunk-JX3F6YCC.js.map +1 -0
- package/dist/chunks/chunk-JXMZQ3DF.js +249 -0
- package/dist/chunks/chunk-JXMZQ3DF.js.map +1 -0
- package/dist/chunks/chunk-K7JGTBMV.js +248 -0
- package/dist/chunks/chunk-K7JGTBMV.js.map +1 -0
- package/dist/chunks/chunk-KBQUCIRG.js +233 -0
- package/dist/chunks/chunk-KBQUCIRG.js.map +1 -0
- package/dist/chunks/chunk-KGVAUC45.js +242 -0
- package/dist/chunks/chunk-KGVAUC45.js.map +1 -0
- package/dist/chunks/chunk-KH3ZEJAY.js +95 -0
- package/dist/chunks/chunk-KH3ZEJAY.js.map +1 -0
- package/dist/chunks/chunk-KIK3YNR7.js +95 -0
- package/dist/chunks/chunk-KIK3YNR7.js.map +1 -0
- package/dist/chunks/chunk-KKV6WBJ2.js +234 -0
- package/dist/chunks/chunk-KKV6WBJ2.js.map +1 -0
- package/dist/chunks/chunk-KWCQRFC3.js +56 -0
- package/dist/chunks/chunk-KWCQRFC3.js.map +1 -0
- package/dist/chunks/chunk-KWUJVUKA.js +99 -0
- package/dist/chunks/chunk-KWUJVUKA.js.map +1 -0
- package/dist/chunks/chunk-LMWMNMIU.js +99 -0
- package/dist/chunks/chunk-LMWMNMIU.js.map +1 -0
- package/dist/chunks/chunk-LSTECKJV.js +56 -0
- package/dist/chunks/chunk-LSTECKJV.js.map +1 -0
- package/dist/chunks/chunk-LWBXN5C4.js +66 -0
- package/dist/chunks/chunk-LWBXN5C4.js.map +1 -0
- package/dist/chunks/chunk-LXQKATBH.js +91 -0
- package/dist/chunks/chunk-LXQKATBH.js.map +1 -0
- package/dist/chunks/chunk-M2PGI5QL.js +92 -0
- package/dist/chunks/chunk-M2PGI5QL.js.map +1 -0
- package/dist/chunks/chunk-M3D3T5OO.js +45 -0
- package/dist/chunks/chunk-M3D3T5OO.js.map +1 -0
- package/dist/chunks/chunk-M43YVT6M.js +8 -0
- package/dist/chunks/chunk-M43YVT6M.js.map +1 -0
- package/dist/chunks/chunk-MJMLVDAV.js +82 -0
- package/dist/chunks/chunk-MJMLVDAV.js.map +1 -0
- package/dist/chunks/chunk-MNYMPXJZ.js +95 -0
- package/dist/chunks/chunk-MNYMPXJZ.js.map +1 -0
- package/dist/chunks/chunk-MT3XAJZC.js +61 -0
- package/dist/chunks/chunk-MT3XAJZC.js.map +1 -0
- package/dist/chunks/chunk-MYRQCWA6.js +81 -0
- package/dist/chunks/chunk-MYRQCWA6.js.map +1 -0
- package/dist/chunks/chunk-NY5T6G3K.js +8 -0
- package/dist/chunks/chunk-NY5T6G3K.js.map +1 -0
- package/dist/chunks/chunk-NYR2RLEI.js +65 -0
- package/dist/chunks/chunk-NYR2RLEI.js.map +1 -0
- package/dist/chunks/chunk-O3WD4F3W.js +92 -0
- package/dist/chunks/chunk-O3WD4F3W.js.map +1 -0
- package/dist/chunks/chunk-OALKFNG4.js +99 -0
- package/dist/chunks/chunk-OALKFNG4.js.map +1 -0
- package/dist/chunks/chunk-OB2TPXBB.js +85 -0
- package/dist/chunks/chunk-OB2TPXBB.js.map +1 -0
- package/dist/chunks/chunk-OH5UJYOH.js +83 -0
- package/dist/chunks/chunk-OH5UJYOH.js.map +1 -0
- package/dist/chunks/chunk-OLDZGCD4.js +45 -0
- package/dist/chunks/chunk-OLDZGCD4.js.map +1 -0
- package/dist/chunks/chunk-ONVGVU57.js +243 -0
- package/dist/chunks/chunk-ONVGVU57.js.map +1 -0
- package/dist/chunks/chunk-OWELU5YR.js +43 -0
- package/dist/chunks/chunk-OWELU5YR.js.map +1 -0
- package/dist/chunks/chunk-P4CAO52E.js +43 -0
- package/dist/chunks/chunk-P4CAO52E.js.map +1 -0
- package/dist/chunks/chunk-P6SNSCN4.js +235 -0
- package/dist/chunks/chunk-P6SNSCN4.js.map +1 -0
- package/dist/chunks/chunk-PJIOSYIC.js +241 -0
- package/dist/chunks/chunk-PJIOSYIC.js.map +1 -0
- package/dist/chunks/chunk-PRYR7UB6.js +95 -0
- package/dist/chunks/chunk-PRYR7UB6.js.map +1 -0
- package/dist/chunks/chunk-PSGZN2AP.js +8 -0
- package/dist/chunks/chunk-PSGZN2AP.js.map +1 -0
- package/dist/chunks/chunk-PWNPDEWD.js +43 -0
- package/dist/chunks/chunk-PWNPDEWD.js.map +1 -0
- package/dist/chunks/chunk-QHGH7FF6.js +28 -0
- package/dist/chunks/chunk-QHGH7FF6.js.map +1 -0
- package/dist/chunks/chunk-QKAKO3CZ.js +233 -0
- package/dist/chunks/chunk-QKAKO3CZ.js.map +1 -0
- package/dist/chunks/chunk-QSFYRRIN.js +85 -0
- package/dist/chunks/chunk-QSFYRRIN.js.map +1 -0
- package/dist/chunks/chunk-QVPOOZ5O.js +64 -0
- package/dist/chunks/chunk-QVPOOZ5O.js.map +1 -0
- package/dist/chunks/chunk-QXKGZ752.js +43 -0
- package/dist/chunks/chunk-QXKGZ752.js.map +1 -0
- package/dist/chunks/chunk-QZ4TYR6G.js +43 -0
- package/dist/chunks/chunk-QZ4TYR6G.js.map +1 -0
- package/dist/chunks/chunk-R5HX7O5I.js +81 -0
- package/dist/chunks/chunk-R5HX7O5I.js.map +1 -0
- package/dist/chunks/chunk-RF2VC7DN.js +239 -0
- package/dist/chunks/chunk-RF2VC7DN.js.map +1 -0
- package/dist/chunks/chunk-RIPZMRDA.js +238 -0
- package/dist/chunks/chunk-RIPZMRDA.js.map +1 -0
- package/dist/chunks/chunk-RKBUP3WS.js +28 -0
- package/dist/chunks/chunk-RKBUP3WS.js.map +1 -0
- package/dist/chunks/chunk-RTPJGNMA.js +230 -0
- package/dist/chunks/chunk-RTPJGNMA.js.map +1 -0
- package/dist/chunks/chunk-S6F2NHT6.js +85 -0
- package/dist/chunks/chunk-S6F2NHT6.js.map +1 -0
- package/dist/chunks/chunk-SI7DUJBA.js +28 -0
- package/dist/chunks/chunk-SI7DUJBA.js.map +1 -0
- package/dist/chunks/chunk-SRCICFU7.js +28 -0
- package/dist/chunks/chunk-SRCICFU7.js.map +1 -0
- package/dist/chunks/chunk-SXRET5LH.js +235 -0
- package/dist/chunks/chunk-SXRET5LH.js.map +1 -0
- package/dist/chunks/chunk-THUTSBBP.js +56 -0
- package/dist/chunks/chunk-THUTSBBP.js.map +1 -0
- package/dist/chunks/chunk-TPZRDVLI.js +85 -0
- package/dist/chunks/chunk-TPZRDVLI.js.map +1 -0
- package/dist/chunks/chunk-TYH4XFYQ.js +84 -0
- package/dist/chunks/chunk-TYH4XFYQ.js.map +1 -0
- package/dist/chunks/chunk-TZGAS66M.js +56 -0
- package/dist/chunks/chunk-TZGAS66M.js.map +1 -0
- package/dist/chunks/chunk-U54LOZ6V.js +235 -0
- package/dist/chunks/chunk-U54LOZ6V.js.map +1 -0
- package/dist/chunks/chunk-U7WNOBID.js +235 -0
- package/dist/chunks/chunk-U7WNOBID.js.map +1 -0
- package/dist/chunks/chunk-UDZ6DBC4.js +65 -0
- package/dist/chunks/chunk-UDZ6DBC4.js.map +1 -0
- package/dist/chunks/chunk-UF7XJJHR.js +56 -0
- package/dist/chunks/chunk-UF7XJJHR.js.map +1 -0
- package/dist/chunks/chunk-UFJLGWZN.js +95 -0
- package/dist/chunks/chunk-UFJLGWZN.js.map +1 -0
- package/dist/chunks/chunk-UNB4FVMX.js +248 -0
- package/dist/chunks/chunk-UNB4FVMX.js.map +1 -0
- package/dist/chunks/chunk-US5NIIW7.js +244 -0
- package/dist/chunks/chunk-US5NIIW7.js.map +1 -0
- package/dist/chunks/chunk-VMAASK34.js +234 -0
- package/dist/chunks/chunk-VMAASK34.js.map +1 -0
- package/dist/chunks/chunk-VN2QDEVU.js +250 -0
- package/dist/chunks/chunk-VN2QDEVU.js.map +1 -0
- package/dist/chunks/chunk-W5FVZTR6.js +56 -0
- package/dist/chunks/chunk-W5FVZTR6.js.map +1 -0
- package/dist/chunks/chunk-WFFIUFJJ.js +28 -0
- package/dist/chunks/chunk-WFFIUFJJ.js.map +1 -0
- package/dist/chunks/chunk-WFSIKRZ3.js +95 -0
- package/dist/chunks/chunk-WFSIKRZ3.js.map +1 -0
- package/dist/chunks/chunk-WHTJNLWJ.js +235 -0
- package/dist/chunks/chunk-WHTJNLWJ.js.map +1 -0
- package/dist/chunks/chunk-X7TJEF7P.js +78 -0
- package/dist/chunks/chunk-X7TJEF7P.js.map +1 -0
- package/dist/chunks/chunk-XCECF27R.js +45 -0
- package/dist/chunks/chunk-XCECF27R.js.map +1 -0
- package/dist/chunks/chunk-XCJMG5II.js +229 -0
- package/dist/chunks/chunk-XCJMG5II.js.map +1 -0
- package/dist/chunks/chunk-XNNXOUDF.js +245 -0
- package/dist/chunks/chunk-XNNXOUDF.js.map +1 -0
- package/dist/chunks/chunk-YBFPPPMD.js +233 -0
- package/dist/chunks/chunk-YBFPPPMD.js.map +1 -0
- package/dist/chunks/chunk-YQXKY6CK.js +99 -0
- package/dist/chunks/chunk-YQXKY6CK.js.map +1 -0
- package/dist/chunks/chunk-YS4T2ORC.js +86 -0
- package/dist/chunks/chunk-YS4T2ORC.js.map +1 -0
- package/dist/chunks/chunk-YSK5NQO6.js +235 -0
- package/dist/chunks/chunk-YSK5NQO6.js.map +1 -0
- package/dist/chunks/chunk-YZSGZTWA.js +8 -0
- package/dist/chunks/chunk-YZSGZTWA.js.map +1 -0
- package/dist/chunks/chunk-Z6FBIC76.js +83 -0
- package/dist/chunks/chunk-Z6FBIC76.js.map +1 -0
- package/dist/chunks/chunk-ZNU2BCTJ.js +95 -0
- package/dist/chunks/chunk-ZNU2BCTJ.js.map +1 -0
- package/dist/chunks/chunk-ZTFOPRHT.js +242 -0
- package/dist/chunks/chunk-ZTFOPRHT.js.map +1 -0
- package/dist/chunks/chunk-ZZFSVIVR.js +85 -0
- package/dist/chunks/chunk-ZZFSVIVR.js.map +1 -0
- package/dist/exports/computed-item.context.d.ts +3 -0
- package/dist/exports/computed-item.context.js +1 -1
- package/dist/exports/computed.context.d.ts +5 -0
- package/dist/exports/computed.context.js +1 -1
- package/dist/exports/session.context.d.ts +16 -1
- package/dist/exports/session.context.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +20 -20
- package/dist/qti-components-jsx.d.ts +5 -4
- package/dist/qti-item/components/item-show-correct-response.js +2 -2
- package/dist/qti-item/components/print-item-variables.js +2 -2
- package/dist/qti-item/core/index.js +4 -4
- package/dist/qti-test/components/index.d.ts +4 -3
- package/dist/qti-test/components/index.js +15 -15
- package/dist/qti-test/components/test-navigation.d.ts +4 -3
- package/dist/qti-test/components/test-navigation.js +3 -3
- package/dist/qti-test/components/test-next.d.ts +4 -1
- package/dist/qti-test/components/test-next.js +2 -2
- package/dist/qti-test/components/test-paging-buttons-stamp.js +2 -2
- package/dist/qti-test/components/test-prev.d.ts +4 -1
- package/dist/qti-test/components/test-prev.js +2 -2
- package/dist/qti-test/components/test-print-context.d.ts +4 -1
- package/dist/qti-test/components/test-print-context.js +2 -2
- package/dist/qti-test/components/test-print-item-variables.d.ts +4 -1
- package/dist/qti-test/components/test-print-item-variables.js +2 -2
- package/dist/qti-test/components/test-scoring-buttons.d.ts +7 -1
- package/dist/qti-test/components/test-scoring-buttons.js +2 -2
- package/dist/qti-test/components/test-scoring-feedback.d.ts +4 -1
- package/dist/qti-test/components/test-scoring-feedback.js +2 -2
- package/dist/qti-test/components/test-scoring-toggle.d.ts +20 -0
- package/dist/qti-test/components/test-scoring-toggle.js +9 -0
- package/dist/qti-test/components/test-scoring-toggle.js.map +1 -0
- package/dist/qti-test/components/test-section-buttons-stamp.js +2 -2
- package/dist/qti-test/components/test-show-correct-response.d.ts +4 -1
- package/dist/qti-test/components/test-show-correct-response.js +2 -2
- package/dist/qti-test/components/test-stamp.d.ts +2 -2
- package/dist/qti-test/components/test-stamp.js +2 -2
- package/dist/qti-test/components/test-view-toggle copy.js +63 -0
- package/dist/qti-test/components/test-view-toggle copy.js.map +1 -0
- package/dist/qti-test/components/test-view-toggle.d.ts +4 -3
- package/dist/qti-test/components/test-view-toggle.js +2 -2
- package/dist/qti-test/components/test-view.js +2 -2
- package/dist/qti-test/core/index.d.ts +3 -2
- package/dist/qti-test/core/index.js +2 -2
- package/dist/qti-test-feedback-BGPOO6Zu.d.ts +98 -0
- package/dist/qti-test-feedback-C2mE_Xcg.d.ts +85 -0
- package/dist/vscode.html-custom-data.json +1 -1
- package/package.json +17 -17
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-PSGZN2AP.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-scoring-buttons.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { consume } from "@lit/context";
|
|
11
|
+
import { customElement, property } from "lit/decorators.js";
|
|
12
|
+
var TestScoringButtons = class extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.view = "";
|
|
16
|
+
this.disabled = false;
|
|
17
|
+
}
|
|
18
|
+
createRenderRoot() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
_changeOutcomeScore(value) {
|
|
22
|
+
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
23
|
+
const sectionItems = testPart.sections.flatMap((section) => section.items);
|
|
24
|
+
const currentItemIdentifier = sectionItems.find((item) => item.active)?.identifier;
|
|
25
|
+
this.dispatchEvent(
|
|
26
|
+
new CustomEvent("test-update-outcome-variable", {
|
|
27
|
+
detail: {
|
|
28
|
+
assessmentItemRefId: currentItemIdentifier,
|
|
29
|
+
outcomeVariableId: "SCORE",
|
|
30
|
+
value
|
|
31
|
+
},
|
|
32
|
+
bubbles: true
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
38
|
+
if (!activeItem || !activeItem.variables) return html``;
|
|
39
|
+
const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
40
|
+
const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
|
|
41
|
+
const score = scoreOutcome?.value;
|
|
42
|
+
this.disabled = !(scoreOutcome?.externalScored === "human");
|
|
43
|
+
return maxScore ? html`
|
|
44
|
+
<form part="form">
|
|
45
|
+
${[...Array(Number(maxScore) + 1).keys()].map((itemIndex) => {
|
|
46
|
+
const identifier = `scoring-buttons${itemIndex}${activeItem.identifier}`;
|
|
47
|
+
return html` <input
|
|
48
|
+
part="input"
|
|
49
|
+
type="radio"
|
|
50
|
+
?disabled=${this.disabled}
|
|
51
|
+
.checked=${itemIndex === Number(score)}
|
|
52
|
+
@change=${() => this._changeOutcomeScore(itemIndex)}
|
|
53
|
+
id=${identifier}
|
|
54
|
+
name=${`scoring-buttons-${activeItem.identifier}`}
|
|
55
|
+
value=${itemIndex}
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<label part="label" for=${identifier}>${itemIndex}</label>`;
|
|
59
|
+
})}
|
|
60
|
+
</form>
|
|
61
|
+
<slot></slot>
|
|
62
|
+
` : nothing;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
__decorateClass([
|
|
66
|
+
property({ type: String, attribute: "view" })
|
|
67
|
+
], TestScoringButtons.prototype, "view", 2);
|
|
68
|
+
__decorateClass([
|
|
69
|
+
property({ type: Boolean })
|
|
70
|
+
], TestScoringButtons.prototype, "disabled", 2);
|
|
71
|
+
__decorateClass([
|
|
72
|
+
consume({ context: computedContext, subscribe: true })
|
|
73
|
+
], TestScoringButtons.prototype, "computedContext", 2);
|
|
74
|
+
TestScoringButtons = __decorateClass([
|
|
75
|
+
customElement("test-scoring-buttons")
|
|
76
|
+
], TestScoringButtons);
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
TestScoringButtons
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=chunk-R5HX7O5I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-scoring-buttons.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { consume } from '@lit/context';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\n\n@customElement('test-scoring-buttons')\nexport class TestScoringButtons extends LitElement {\n @property({ type: String, attribute: 'view' }) view = ''; // is only an attribute, but this is here because.. react\n @property({ type: Boolean }) disabled: boolean = false;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext?: ComputedContext;\n\n private _changeOutcomeScore(value: number) {\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n const sectionItems = testPart.sections.flatMap(section => section.items);\n const currentItemIdentifier = sectionItems.find(item => item.active)?.identifier;\n\n this.dispatchEvent(\n new CustomEvent('test-update-outcome-variable', {\n detail: {\n assessmentItemRefId: currentItemIdentifier,\n outcomeVariableId: 'SCORE',\n value\n },\n bubbles: true\n })\n );\n }\n\n render() {\n const activeItem = this.computedContext?.testParts\n .flatMap(testPart => testPart.sections.flatMap(section => section.items))\n .find(item => item.active);\n\n if (!activeItem || !activeItem.variables) return html``;\n\n const maxScore = activeItem.variables.find(vr => vr.identifier == 'MAXSCORE')?.value;\n const scoreOutcome = activeItem.variables.find(vr => vr.identifier == 'SCORE') as OutcomeVariable;\n\n const score = scoreOutcome?.value;\n\n this.disabled = !(scoreOutcome?.externalScored === 'human');\n\n return maxScore\n ? html`\n <form part=\"form\">\n ${[...Array(Number(maxScore) + 1).keys()].map(itemIndex => {\n const identifier = `scoring-buttons${itemIndex}${activeItem.identifier}`;\n return html` <input\n part=\"input\"\n type=\"radio\"\n ?disabled=${this.disabled}\n .checked=${itemIndex === Number(score)}\n @change=${() => this._changeOutcomeScore(itemIndex)}\n id=${identifier}\n name=${`scoring-buttons-${activeItem.identifier}`}\n value=${itemIndex}\n />\n\n <label part=\"label\" for=${identifier}>${itemIndex}</label>`;\n })}\n </form>\n <slot></slot>\n `\n : nothing;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-scoring-buttons': TestScoringButtons;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe;AACxB,SAAS,eAAe,gBAAgB;AAQjC,IAAM,qBAAN,cAAiC,WAAW;AAAA,EAA5C;AAAA;AAC0C,gBAAO;AACzB,oBAAoB;AAAA;AAAA,EAEvC,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAKQ,oBAAoB,OAAe;AACzC,UAAM,WAAW,KAAK,iBAAi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,SAAS,EAAE,MAAM,QAAQ,WAAW,OAAO,CAAC;AAAA,GADlC,mBACoC;AAClB;AAAA,EAA5B,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAFhB,mBAEkB;AAOnB;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAR3C,mBASD;AATC,qBAAN;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB;","names":["testPart"]}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sessionContext
|
|
3
|
+
} from "./chunk-UZ4QB5IO.js";
|
|
4
|
+
import {
|
|
5
|
+
testContext
|
|
6
|
+
} from "./chunk-CJADUWEC.js";
|
|
7
|
+
import {
|
|
8
|
+
computedContext
|
|
9
|
+
} from "./chunk-DTZHLZH2.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-navigation.ts
|
|
15
|
+
import { consume, provide } from "@lit/context";
|
|
16
|
+
import { html, LitElement } from "lit";
|
|
17
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
18
|
+
var TestNavigation = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.identifier = void 0;
|
|
22
|
+
this.initContext = [];
|
|
23
|
+
this.configContext = {};
|
|
24
|
+
this.autoScoreItems = false;
|
|
25
|
+
this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
|
|
26
|
+
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
27
|
+
this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
|
|
28
|
+
this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
|
|
29
|
+
this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
|
|
30
|
+
this.addEventListener("test-update-outcome-variable", this._handleTestUpdateOutcomeVariable.bind(this));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Handles the 'test-end-attempt' event.
|
|
34
|
+
* @private
|
|
35
|
+
* @listens TestNavigation#test-end-attempt
|
|
36
|
+
* @param {CustomEvent} event - The custom event object.
|
|
37
|
+
*/
|
|
38
|
+
_handleTestEndAttempt(_event) {
|
|
39
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
40
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
41
|
+
);
|
|
42
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
43
|
+
const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
|
|
44
|
+
qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Handles the 'test-end-attempt' event.
|
|
48
|
+
* @private
|
|
49
|
+
* @listens TestNavigation#test-show-correct-response
|
|
50
|
+
* @param {CustomEvent} event - The custom event object.
|
|
51
|
+
*/
|
|
52
|
+
_handleTestShowCorrectResponse(event) {
|
|
53
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
54
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
55
|
+
);
|
|
56
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
57
|
+
qtiAssessmentItemEl.showCorrectResponse(event.detail);
|
|
58
|
+
}
|
|
59
|
+
_handleTestUpdateOutcomeVariable(event) {
|
|
60
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
61
|
+
`qti-assessment-item-ref[identifier="${event.detail.assessmentItemRefId}"]`
|
|
62
|
+
);
|
|
63
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
64
|
+
qtiAssessmentItemEl.setOutcomeVariable(event.detail.outcomeVariableId, event.detail.value);
|
|
65
|
+
}
|
|
66
|
+
_handleInteractionChanged(_event) {
|
|
67
|
+
if (this.autoScoreItems) {
|
|
68
|
+
const assessmentItem = _event.composedPath()[0].closest("qti-assessment-item");
|
|
69
|
+
const scoreOutcomeIdentifier = assessmentItem.variables.find((v) => v.identifier === "SCORE");
|
|
70
|
+
if (scoreOutcomeIdentifier && scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
|
|
71
|
+
assessmentItem.processResponse();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
return html`<slot></slot>`;
|
|
77
|
+
}
|
|
78
|
+
/* PK: on test connected we can build the computed context */
|
|
79
|
+
_handleTestConnected(event) {
|
|
80
|
+
this._testElement = event.detail;
|
|
81
|
+
const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
|
|
82
|
+
this.computedContext = {
|
|
83
|
+
identifier: this._testElement.identifier,
|
|
84
|
+
title: this._testElement.title,
|
|
85
|
+
testParts: testPartElements.map((testPart) => {
|
|
86
|
+
const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
|
|
87
|
+
return {
|
|
88
|
+
active: false,
|
|
89
|
+
identifier: testPart.identifier,
|
|
90
|
+
navigationMode: testPart.navigationMode,
|
|
91
|
+
submissionMode: testPart.submissionMode,
|
|
92
|
+
sections: sectionElements.map((section) => {
|
|
93
|
+
const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
|
|
94
|
+
return {
|
|
95
|
+
active: false,
|
|
96
|
+
identifier: section.identifier,
|
|
97
|
+
title: section.title,
|
|
98
|
+
items: itemElements.map(
|
|
99
|
+
(item) => ({
|
|
100
|
+
...this.initContext?.find((i) => i.identifier === item.identifier),
|
|
101
|
+
active: false,
|
|
102
|
+
identifier: item.identifier,
|
|
103
|
+
href: item.href,
|
|
104
|
+
variables: []
|
|
105
|
+
})
|
|
106
|
+
)
|
|
107
|
+
};
|
|
108
|
+
})
|
|
109
|
+
};
|
|
110
|
+
})
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/* PK: on item connected we can add item only properties in the xml */
|
|
114
|
+
_handleItemConnected(event) {
|
|
115
|
+
const itemElement = event.detail;
|
|
116
|
+
this.computedContext = {
|
|
117
|
+
...this.computedContext,
|
|
118
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
119
|
+
return {
|
|
120
|
+
...testPart,
|
|
121
|
+
sections: testPart.sections.map((section) => {
|
|
122
|
+
return {
|
|
123
|
+
...section,
|
|
124
|
+
items: section.items.map((item) => {
|
|
125
|
+
if (item.identifier !== itemElement.parentElement.getAttribute("identifier")) {
|
|
126
|
+
return item;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
...item,
|
|
130
|
+
assessmentItemIdentifier: itemElement.getAttribute("identifier"),
|
|
131
|
+
label: itemElement.getAttribute("label"),
|
|
132
|
+
title: itemElement.title,
|
|
133
|
+
adaptive: itemElement.adaptive == "true" || false,
|
|
134
|
+
timeDependent: itemElement.timeDependent == "true" || false,
|
|
135
|
+
variables: itemElement._context.variables
|
|
136
|
+
};
|
|
137
|
+
})
|
|
138
|
+
};
|
|
139
|
+
})
|
|
140
|
+
};
|
|
141
|
+
})
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
145
|
+
willUpdate(_changedProperties) {
|
|
146
|
+
if (!this.computedContext) return;
|
|
147
|
+
let itemIndex = 1;
|
|
148
|
+
this.computedContext = {
|
|
149
|
+
...this.computedContext,
|
|
150
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
151
|
+
return {
|
|
152
|
+
...testPart,
|
|
153
|
+
active: this._sessionContext?.navPartId === testPart.identifier || false,
|
|
154
|
+
sections: testPart.sections.map((section) => {
|
|
155
|
+
return {
|
|
156
|
+
...section,
|
|
157
|
+
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
158
|
+
completed: section.items.every(
|
|
159
|
+
(item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
|
|
160
|
+
),
|
|
161
|
+
items: section.items.map((item) => {
|
|
162
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
163
|
+
const computedItem = { ...item, ...itemContext };
|
|
164
|
+
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
165
|
+
const score = parseInt(rawscore?.toString());
|
|
166
|
+
const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
167
|
+
const categories = computedItem.category ? computedItem.category?.split(" ") : [];
|
|
168
|
+
const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
|
|
169
|
+
const active = this._sessionContext?.navItemId === computedItem.identifier || false;
|
|
170
|
+
const correct = (
|
|
171
|
+
// this._testContext.view === 'scorer' &&
|
|
172
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false
|
|
173
|
+
);
|
|
174
|
+
const incorrect = (
|
|
175
|
+
// this._testContext.view === 'scorer' &&
|
|
176
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false
|
|
177
|
+
);
|
|
178
|
+
const completed = (
|
|
179
|
+
// this._testContext.view === 'candidate' &&
|
|
180
|
+
completionStatus === "completed"
|
|
181
|
+
);
|
|
182
|
+
const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
|
|
183
|
+
const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
184
|
+
const view = this._sessionContext.view;
|
|
185
|
+
return {
|
|
186
|
+
...computedItem,
|
|
187
|
+
// rawscore, // not necessary for outside world
|
|
188
|
+
// score, // not necessary for outside world
|
|
189
|
+
// completionStatus, // not necessary for outside world
|
|
190
|
+
// categories, // not necessary for outside world
|
|
191
|
+
type,
|
|
192
|
+
active,
|
|
193
|
+
correct,
|
|
194
|
+
incorrect,
|
|
195
|
+
completed,
|
|
196
|
+
index,
|
|
197
|
+
response,
|
|
198
|
+
view
|
|
199
|
+
};
|
|
200
|
+
})
|
|
201
|
+
};
|
|
202
|
+
})
|
|
203
|
+
};
|
|
204
|
+
})
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
__decorateClass([
|
|
209
|
+
property({ type: String })
|
|
210
|
+
], TestNavigation.prototype, "identifier", 2);
|
|
211
|
+
__decorateClass([
|
|
212
|
+
state()
|
|
213
|
+
], TestNavigation.prototype, "initContext", 2);
|
|
214
|
+
__decorateClass([
|
|
215
|
+
state(),
|
|
216
|
+
consume({ context: testContext, subscribe: true })
|
|
217
|
+
], TestNavigation.prototype, "_testContext", 2);
|
|
218
|
+
__decorateClass([
|
|
219
|
+
state(),
|
|
220
|
+
consume({ context: sessionContext, subscribe: true })
|
|
221
|
+
], TestNavigation.prototype, "_sessionContext", 2);
|
|
222
|
+
__decorateClass([
|
|
223
|
+
state()
|
|
224
|
+
], TestNavigation.prototype, "configContext", 2);
|
|
225
|
+
__decorateClass([
|
|
226
|
+
state(),
|
|
227
|
+
provide({ context: computedContext })
|
|
228
|
+
], TestNavigation.prototype, "computedContext", 2);
|
|
229
|
+
__decorateClass([
|
|
230
|
+
property({ type: Boolean, attribute: "auto-score-items" })
|
|
231
|
+
], TestNavigation.prototype, "autoScoreItems", 2);
|
|
232
|
+
TestNavigation = __decorateClass([
|
|
233
|
+
customElement("test-navigation")
|
|
234
|
+
], TestNavigation);
|
|
235
|
+
|
|
236
|
+
export {
|
|
237
|
+
TestNavigation
|
|
238
|
+
};
|
|
239
|
+
//# sourceMappingURL=chunk-RF2VC7DN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-navigation.ts"],"sourcesContent":["import { consume, provide } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { testContext } from '../../exports/test.context';\nimport { sessionContext } from '../../exports/session.context';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedItemContext } from '../../exports/computed-item.context';\nimport type { QtiAssessmentItem } from '../../qti-components';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { PropertyValues } from 'lit';\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiTestPart } from '../core';\nimport type { ConfigContext } from '../../exports/config.context';\nimport type { SessionContext } from '../../exports/session.context';\nimport type { TestContext } from '../../exports/test.context';\n\ntype CustomEventMap = {\n 'test-end-attempt': CustomEvent;\n 'test-show-correct-response': CustomEvent<{ value: boolean }>;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap extends CustomEventMap {}\n}\n\n@customElement('test-navigation')\nexport class TestNavigation extends LitElement {\n @property({ type: String }) identifier = undefined;\n\n @state()\n public initContext: { identifier: string; [key: string]: any }[] = [];\n\n @state()\n @consume({ context: testContext, subscribe: true })\n protected _testContext?: TestContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n protected _sessionContext?: SessionContext;\n\n @state()\n protected configContext: ConfigContext = {};\n\n @state()\n @provide({ context: computedContext })\n protected computedContext: ComputedContext;\n\n @property({ type: Boolean, attribute: 'auto-score-items' }) autoScoreItems = false;\n\n private _testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', this._handleTestConnected.bind(this));\n this.addEventListener('qti-assessment-item-connected', this._handleItemConnected.bind(this));\n\n this.addEventListener('qti-interaction-changed', this._handleInteractionChanged.bind(this));\n\n this.addEventListener('test-end-attempt', this._handleTestEndAttempt.bind(this));\n this.addEventListener('test-show-correct-response', this._handleTestShowCorrectResponse.bind(this));\n this.addEventListener('test-update-outcome-variable', this._handleTestUpdateOutcomeVariable.bind(this));\n }\n\n /**\n * Handles the 'test-end-attempt' event.\n * @private\n * @listens TestNavigation#test-end-attempt\n * @param {CustomEvent} event - The custom event object.\n */\n private _handleTestEndAttempt(_event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;\n qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);\n }\n\n /**\n * Handles the 'test-end-attempt' event.\n * @private\n * @listens TestNavigation#test-show-correct-response\n * @param {CustomEvent} event - The custom event object.\n */\n private _handleTestShowCorrectResponse(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.showCorrectResponse(event.detail);\n }\n\n private _handleTestUpdateOutcomeVariable(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${event.detail.assessmentItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.setOutcomeVariable(event.detail.outcomeVariableId, event.detail.value);\n }\n\n private _handleInteractionChanged(_event: CustomEvent) {\n if (this.autoScoreItems) {\n const assessmentItem = (_event.composedPath()[0] as HTMLElement).closest('qti-assessment-item');\n const scoreOutcomeIdentifier = assessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n if (\n scoreOutcomeIdentifier &&\n scoreOutcomeIdentifier.externalScored === null &&\n assessmentItem.adaptive === 'false'\n ) {\n assessmentItem.processResponse();\n }\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n /* PK: on test connected we can build the computed context */\n private _handleTestConnected(event: CustomEvent) {\n this._testElement = event.detail as QtiAssessmentTest;\n const testPartElements = Array.from(this._testElement?.querySelectorAll<QtiTestPart>(`qti-test-part`) || []);\n this.computedContext = {\n identifier: this._testElement.identifier,\n title: this._testElement.title,\n testParts: testPartElements.map(testPart => {\n const sectionElements = [...testPart.querySelectorAll<QtiAssessmentSection>(`qti-assessment-section`)];\n return {\n active: false,\n identifier: testPart.identifier,\n navigationMode: testPart.navigationMode,\n submissionMode: testPart.submissionMode,\n sections: sectionElements.map(section => {\n const itemElements = [...section.querySelectorAll<QtiAssessmentItemRef>(`qti-assessment-item-ref`)];\n return {\n active: false,\n identifier: section.identifier,\n title: section.title,\n items: itemElements.map(\n item =>\n ({\n ...this.initContext?.find(i => i.identifier === item.identifier),\n active: false,\n identifier: item.identifier,\n href: item.href,\n variables: []\n }) as ComputedItemContext\n )\n };\n })\n };\n })\n };\n }\n\n /* PK: on item connected we can add item only properties in the xml */\n private _handleItemConnected(event: CustomEvent) {\n const itemElement = event.detail as QtiAssessmentItem;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n items: section.items.map(item => {\n if (item.identifier !== itemElement.parentElement.getAttribute('identifier')) {\n return item;\n }\n return {\n ...item,\n assessmentItemIdentifier: itemElement.getAttribute('identifier'),\n label: itemElement.getAttribute('label'),\n title: itemElement.title,\n adaptive: itemElement.adaptive == 'true' || false,\n timeDependent: itemElement.timeDependent == 'true' || false,\n variables: (itemElement as any)._context.variables\n };\n })\n };\n })\n };\n })\n };\n }\n\n /* PK: on every change of the candidate we will recomputed the computedContext */\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) return;\n\n let itemIndex = 1;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n active: this._sessionContext?.navPartId === testPart.identifier || false,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n active: this._sessionContext?.navSectionId === section.identifier || false,\n completed: section.items.every(\n item =>\n this._testContext.items\n .find(i => i.identifier === item.identifier)\n ?.variables.find(v => v.identifier === 'completionStatus').value === 'completed'\n ),\n\n items: section.items.map(item => {\n const itemContext = this._testContext?.items.find(i => i.identifier === item.identifier);\n const computedItem = { ...item, ...itemContext };\n\n const rawscore = computedItem.variables?.find(vr => vr.identifier == 'SCORE')?.value;\n const score = parseInt(rawscore?.toString());\n const completionStatus = computedItem.variables?.find(v => v.identifier === 'completionStatus')?.value;\n const categories = computedItem.category ? computedItem.category?.split(' ') : [];\n\n const type = categories.includes(this.configContext?.infoItemCategory) ? 'info' : 'regular'; // rounded-full\n const active = this._sessionContext?.navItemId === computedItem.identifier || false; // !border-sky-600\n\n const correct =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score > 0) || false; // bg-green-100 border-green-400\n const incorrect =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score <= 0) || false; // bg-red-100 border-red-400\n const completed =\n // this._testContext.view === 'candidate' &&\n completionStatus === 'completed';\n // || item.category === this.host._configContext?.infoItemCategory || false\n const response = computedItem.variables?.find(v => v.identifier === 'RESPONSE')?.value || '';\n\n const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;\n\n const view = this._sessionContext.view;\n\n return {\n ...computedItem,\n // rawscore, // not necessary for outside world\n // score, // not necessary for outside world\n // completionStatus, // not necessary for outside world\n // categories, // not necessary for outside world\n type,\n active,\n correct,\n incorrect,\n completed,\n index,\n response,\n view\n };\n })\n };\n })\n };\n })\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,SAAS,eAAe;AACjC,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,UAAU,aAAa;AA0BxC,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAyB7C,cAAc;AACZ,UAAM;AAzBoB,sBAAa;AAGzC,SAAO,cAA4D,CAAC;AAWpE,SAAU,gBAA+B,CAAC;AAMkB,0BAAiB;AAM3E,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAC3F,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAE3F,SAAK,iBAAiB,2BAA2B,KAAK,0BA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AFT,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,WAAW,KAAK,CAAC;AAAA,GAX1C,eAYD;AAGA;AAAA,EADT,MAAM;AAAA,GAdI,eAeD;AAIA;AAAA,EAFT,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,CAAC;AAAA,GAlB1B,eAmBD;AAEkD;AAAA,EAA3D,SAAS,EAAE,MAAM,SAAS,WAAW,mBAAmB,CAAC;AAAA,GArB/C,eAqBiD;AArBjD,iBAAN;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB;","names":[]}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sessionContext
|
|
3
|
+
} from "./chunk-22IRJWWY.js";
|
|
4
|
+
import {
|
|
5
|
+
testContext
|
|
6
|
+
} from "./chunk-CJADUWEC.js";
|
|
7
|
+
import {
|
|
8
|
+
computedContext
|
|
9
|
+
} from "./chunk-AZIKAG7K.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-navigation.ts
|
|
15
|
+
import { consume, provide } from "@lit/context";
|
|
16
|
+
import { html, LitElement } from "lit";
|
|
17
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
18
|
+
var TestNavigation = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.identifier = void 0;
|
|
22
|
+
this.initContext = [];
|
|
23
|
+
this.configContext = {};
|
|
24
|
+
this.autoScoreItems = false;
|
|
25
|
+
this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
|
|
26
|
+
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
27
|
+
this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
|
|
28
|
+
this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
|
|
29
|
+
this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
|
|
30
|
+
this.addEventListener("test-update-outcome-variable", this._handleTestUpdateOutcomeVariable.bind(this));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Handles the 'test-end-attempt' event.
|
|
34
|
+
* @private
|
|
35
|
+
* @listens TestNavigation#test-end-attempt
|
|
36
|
+
* @param {CustomEvent} event - The custom event object.
|
|
37
|
+
*/
|
|
38
|
+
_handleTestEndAttempt(_event) {
|
|
39
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
40
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemRefId}"]`
|
|
41
|
+
);
|
|
42
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
43
|
+
const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
|
|
44
|
+
qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Handles the 'test-end-attempt' event.
|
|
48
|
+
* @private
|
|
49
|
+
* @listens TestNavigation#test-show-correct-response
|
|
50
|
+
* @param {CustomEvent} event - The custom event object.
|
|
51
|
+
*/
|
|
52
|
+
_handleTestShowCorrectResponse(event) {
|
|
53
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
54
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemRefId}"]`
|
|
55
|
+
);
|
|
56
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
57
|
+
qtiAssessmentItemEl.showCorrectResponse(event.detail);
|
|
58
|
+
}
|
|
59
|
+
_handleTestUpdateOutcomeVariable(event) {
|
|
60
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
61
|
+
`qti-assessment-item-ref[identifier="${event.detail.assessmentItemRefId}"]`
|
|
62
|
+
);
|
|
63
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
64
|
+
qtiAssessmentItemEl.setOutcomeVariable(event.detail.outcomeVariableId, event.detail.value);
|
|
65
|
+
}
|
|
66
|
+
_handleInteractionChanged(_event) {
|
|
67
|
+
if (this.autoScoreItems) {
|
|
68
|
+
const assessmentItem = _event.composedPath()[0].closest("qti-assessment-item");
|
|
69
|
+
const scoreOutcomeIdentifier = assessmentItem.variables.find((v) => v.identifier === "SCORE");
|
|
70
|
+
if (scoreOutcomeIdentifier && scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
|
|
71
|
+
assessmentItem.processResponse();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
return html`<slot></slot>`;
|
|
77
|
+
}
|
|
78
|
+
/* PK: on test connected we can build the computed context */
|
|
79
|
+
_handleTestConnected(event) {
|
|
80
|
+
this._testElement = event.detail;
|
|
81
|
+
const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
|
|
82
|
+
this.computedContext = {
|
|
83
|
+
identifier: this._testElement.identifier,
|
|
84
|
+
title: this._testElement.title,
|
|
85
|
+
view: this._sessionContext?.view,
|
|
86
|
+
testParts: testPartElements.map((testPart) => {
|
|
87
|
+
const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
|
|
88
|
+
return {
|
|
89
|
+
active: false,
|
|
90
|
+
identifier: testPart.identifier,
|
|
91
|
+
navigationMode: testPart.navigationMode,
|
|
92
|
+
submissionMode: testPart.submissionMode,
|
|
93
|
+
sections: sectionElements.map((section) => {
|
|
94
|
+
const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
|
|
95
|
+
return {
|
|
96
|
+
active: false,
|
|
97
|
+
identifier: section.identifier,
|
|
98
|
+
title: section.title,
|
|
99
|
+
items: itemElements.map(
|
|
100
|
+
(item) => ({
|
|
101
|
+
...this.initContext?.find((i) => i.identifier === item.identifier),
|
|
102
|
+
active: false,
|
|
103
|
+
identifier: item.identifier,
|
|
104
|
+
href: item.href,
|
|
105
|
+
variables: []
|
|
106
|
+
})
|
|
107
|
+
)
|
|
108
|
+
};
|
|
109
|
+
})
|
|
110
|
+
};
|
|
111
|
+
})
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/* PK: on item connected we can add item only properties in the xml */
|
|
115
|
+
_handleItemConnected(event) {
|
|
116
|
+
const itemElement = event.detail;
|
|
117
|
+
this.computedContext = {
|
|
118
|
+
...this.computedContext,
|
|
119
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
120
|
+
return {
|
|
121
|
+
...testPart,
|
|
122
|
+
sections: testPart.sections.map((section) => {
|
|
123
|
+
return {
|
|
124
|
+
...section,
|
|
125
|
+
items: section.items.map((item) => {
|
|
126
|
+
if (item.identifier !== itemElement.parentElement.getAttribute("identifier")) {
|
|
127
|
+
return item;
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
...item,
|
|
131
|
+
assessmentItemIdentifier: itemElement.getAttribute("identifier"),
|
|
132
|
+
label: itemElement.getAttribute("label"),
|
|
133
|
+
title: itemElement.title,
|
|
134
|
+
adaptive: itemElement.adaptive == "true" || false,
|
|
135
|
+
timeDependent: itemElement.timeDependent == "true" || false,
|
|
136
|
+
variables: itemElement._context.variables
|
|
137
|
+
};
|
|
138
|
+
})
|
|
139
|
+
};
|
|
140
|
+
})
|
|
141
|
+
};
|
|
142
|
+
})
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
146
|
+
willUpdate(_changedProperties) {
|
|
147
|
+
if (!this.computedContext) return;
|
|
148
|
+
let itemIndex = 1;
|
|
149
|
+
this.computedContext = {
|
|
150
|
+
...this.computedContext,
|
|
151
|
+
view: this._sessionContext?.view,
|
|
152
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
153
|
+
return {
|
|
154
|
+
...testPart,
|
|
155
|
+
active: this._sessionContext?.navPartId === testPart.identifier || false,
|
|
156
|
+
sections: testPart.sections.map((section) => {
|
|
157
|
+
return {
|
|
158
|
+
...section,
|
|
159
|
+
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
160
|
+
completed: section.items.every(
|
|
161
|
+
(item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
|
|
162
|
+
),
|
|
163
|
+
items: section.items.map((item) => {
|
|
164
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
165
|
+
const computedItem = { ...item, ...itemContext };
|
|
166
|
+
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
167
|
+
const score = parseInt(rawscore?.toString());
|
|
168
|
+
const rawMaxScore = computedItem.variables?.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
169
|
+
const maxScore = parseInt(rawMaxScore?.toString());
|
|
170
|
+
const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
171
|
+
const categories = computedItem.category ? computedItem.category?.split(" ") : [];
|
|
172
|
+
const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
|
|
173
|
+
const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;
|
|
174
|
+
const correct = type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false;
|
|
175
|
+
const incorrect = type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false;
|
|
176
|
+
const completed = completionStatus === "completed";
|
|
177
|
+
const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
|
|
178
|
+
const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
179
|
+
const containsCorrectResponse = !!item?.variables?.some((v) => v["correctResponse"]);
|
|
180
|
+
const containsMapping = !!item?.variables?.some((v) => {
|
|
181
|
+
return v["mapping"]?.mapEntries?.length > 0 || v["areaMapping"]?.areaMapEntries?.length > 0;
|
|
182
|
+
});
|
|
183
|
+
const hasCorrectResponse = !containsCorrectResponse && !containsMapping;
|
|
184
|
+
return {
|
|
185
|
+
...computedItem,
|
|
186
|
+
completionStatus,
|
|
187
|
+
score,
|
|
188
|
+
maxScore,
|
|
189
|
+
hasCorrectResponse,
|
|
190
|
+
categories,
|
|
191
|
+
type,
|
|
192
|
+
active,
|
|
193
|
+
correct,
|
|
194
|
+
incorrect,
|
|
195
|
+
completed,
|
|
196
|
+
index,
|
|
197
|
+
response
|
|
198
|
+
};
|
|
199
|
+
})
|
|
200
|
+
};
|
|
201
|
+
})
|
|
202
|
+
};
|
|
203
|
+
})
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
__decorateClass([
|
|
208
|
+
property({ type: String })
|
|
209
|
+
], TestNavigation.prototype, "identifier", 2);
|
|
210
|
+
__decorateClass([
|
|
211
|
+
state()
|
|
212
|
+
], TestNavigation.prototype, "initContext", 2);
|
|
213
|
+
__decorateClass([
|
|
214
|
+
state()
|
|
215
|
+
], TestNavigation.prototype, "configContext", 2);
|
|
216
|
+
__decorateClass([
|
|
217
|
+
state(),
|
|
218
|
+
consume({ context: testContext, subscribe: true })
|
|
219
|
+
], TestNavigation.prototype, "_testContext", 2);
|
|
220
|
+
__decorateClass([
|
|
221
|
+
state(),
|
|
222
|
+
consume({ context: sessionContext, subscribe: true })
|
|
223
|
+
], TestNavigation.prototype, "_sessionContext", 2);
|
|
224
|
+
__decorateClass([
|
|
225
|
+
state(),
|
|
226
|
+
provide({ context: computedContext })
|
|
227
|
+
], TestNavigation.prototype, "computedContext", 2);
|
|
228
|
+
__decorateClass([
|
|
229
|
+
property({ type: Boolean, attribute: "auto-score-items" })
|
|
230
|
+
], TestNavigation.prototype, "autoScoreItems", 2);
|
|
231
|
+
TestNavigation = __decorateClass([
|
|
232
|
+
customElement("test-navigation")
|
|
233
|
+
], TestNavigation);
|
|
234
|
+
|
|
235
|
+
export {
|
|
236
|
+
TestNavigation
|
|
237
|
+
};
|
|
238
|
+
//# sourceMappingURL=chunk-RIPZMRDA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-navigation.ts"],"sourcesContent":["import { consume, provide } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { testContext } from '../../exports/test.context';\nimport { sessionContext } from '../../exports/session.context';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedItemContext } from '../../exports/computed-item.context';\nimport type { QtiAssessmentItem } from '../../qti-components';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { PropertyValues } from 'lit';\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiTestPart } from '../core';\nimport type { ConfigContext } from '../../exports/config.context';\nimport type { SessionContext } from '../../exports/session.context';\nimport type { TestContext } from '../../exports/test.context';\n\ntype CustomEventMap = {\n 'test-end-attempt': CustomEvent;\n 'test-show-correct-response': CustomEvent<{ value: boolean }>;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap extends CustomEventMap {}\n}\n\n@customElement('test-navigation')\nexport class TestNavigation extends LitElement {\n @property({ type: String }) identifier = undefined;\n\n @state()\n public initContext: { identifier: string; [key: string]: any }[] = [];\n\n @state()\n public configContext: ConfigContext = {};\n\n @state()\n @consume({ context: testContext, subscribe: true })\n protected _testContext?: TestContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n protected _sessionContext?: SessionContext;\n\n @state()\n @provide({ context: computedContext })\n protected computedContext: ComputedContext;\n\n @property({ type: Boolean, attribute: 'auto-score-items' }) autoScoreItems = false;\n\n private _testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', this._handleTestConnected.bind(this));\n this.addEventListener('qti-assessment-item-connected', this._handleItemConnected.bind(this));\n\n this.addEventListener('qti-interaction-changed', this._handleInteractionChanged.bind(this));\n\n this.addEventListener('test-end-attempt', this._handleTestEndAttempt.bind(this));\n this.addEventListener('test-show-correct-response', this._handleTestShowCorrectResponse.bind(this));\n this.addEventListener('test-update-outcome-variable', this._handleTestUpdateOutcomeVariable.bind(this));\n }\n\n /**\n * Handles the 'test-end-attempt' event.\n * @private\n * @listens TestNavigation#test-end-attempt\n * @param {CustomEvent} event - The custom event object.\n */\n private _handleTestEndAttempt(_event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;\n qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);\n }\n\n /**\n * Handles the 'test-end-attempt' event.\n * @private\n * @listens TestNavigation#test-show-correct-response\n * @param {CustomEvent} event - The custom event object.\n */\n private _handleTestShowCorrectResponse(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.showCorrectResponse(event.detail);\n }\n\n private _handleTestUpdateOutcomeVariable(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${event.detail.assessmentItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.setOutcomeVariable(event.detail.outcomeVariableId, event.detail.value);\n }\n\n private _handleInteractionChanged(_event: CustomEvent) {\n if (this.autoScoreItems) {\n const assessmentItem = (_event.composedPath()[0] as HTMLElement).closest('qti-assessment-item');\n const scoreOutcomeIdentifier = assessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n if (\n scoreOutcomeIdentifier &&\n scoreOutcomeIdentifier.externalScored === null &&\n assessmentItem.adaptive === 'false'\n ) {\n assessmentItem.processResponse();\n }\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n /* PK: on test connected we can build the computed context */\n private _handleTestConnected(event: CustomEvent) {\n this._testElement = event.detail as QtiAssessmentTest;\n const testPartElements = Array.from(this._testElement?.querySelectorAll<QtiTestPart>(`qti-test-part`) || []);\n this.computedContext = {\n identifier: this._testElement.identifier,\n title: this._testElement.title,\n view: this._sessionContext?.view,\n testParts: testPartElements.map(testPart => {\n const sectionElements = [...testPart.querySelectorAll<QtiAssessmentSection>(`qti-assessment-section`)];\n return {\n active: false,\n identifier: testPart.identifier,\n navigationMode: testPart.navigationMode,\n submissionMode: testPart.submissionMode,\n sections: sectionElements.map(section => {\n const itemElements = [...section.querySelectorAll<QtiAssessmentItemRef>(`qti-assessment-item-ref`)];\n return {\n active: false,\n identifier: section.identifier,\n title: section.title,\n items: itemElements.map(\n item =>\n ({\n ...this.initContext?.find(i => i.identifier === item.identifier),\n active: false,\n identifier: item.identifier,\n href: item.href,\n variables: []\n }) as ComputedItemContext\n )\n };\n })\n };\n })\n };\n }\n\n /* PK: on item connected we can add item only properties in the xml */\n private _handleItemConnected(event: CustomEvent) {\n const itemElement = event.detail as QtiAssessmentItem;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n items: section.items.map(item => {\n if (item.identifier !== itemElement.parentElement.getAttribute('identifier')) {\n return item;\n }\n return {\n ...item,\n assessmentItemIdentifier: itemElement.getAttribute('identifier'),\n label: itemElement.getAttribute('label'),\n title: itemElement.title,\n adaptive: itemElement.adaptive == 'true' || false,\n timeDependent: itemElement.timeDependent == 'true' || false,\n variables: (itemElement as any)._context.variables\n };\n })\n };\n })\n };\n })\n };\n }\n\n /* PK: on every change of the candidate we will recomputed the computedContext */\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) return;\n\n let itemIndex = 1;\n this.computedContext = {\n ...this.computedContext,\n view: this._sessionContext?.view,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n active: this._sessionContext?.navPartId === testPart.identifier || false,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n active: this._sessionContext?.navSectionId === section.identifier || false,\n completed: section.items.every(\n item =>\n this._testContext.items\n .find(i => i.identifier === item.identifier)\n ?.variables.find(v => v.identifier === 'completionStatus').value === 'completed'\n ),\n\n items: section.items.map(item => {\n const itemContext = this._testContext?.items.find(i => i.identifier === item.identifier);\n const computedItem = { ...item, ...itemContext };\n\n const rawscore = computedItem.variables?.find(vr => vr.identifier == 'SCORE')?.value;\n const score = parseInt(rawscore?.toString());\n\n const rawMaxScore = computedItem.variables?.find(vr => vr.identifier == 'MAXSCORE')?.value;\n const maxScore = parseInt(rawMaxScore?.toString());\n\n const completionStatus = computedItem.variables?.find(v => v.identifier === 'completionStatus')\n ?.value as string;\n const categories = computedItem.category ? computedItem.category?.split(' ') : [];\n\n const type = categories.includes(this.configContext?.infoItemCategory) ? 'info' : 'regular';\n const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;\n\n const correct = (type == 'regular' && score !== undefined && !isNaN(score) && score > 0) || false;\n const incorrect = (type == 'regular' && score !== undefined && !isNaN(score) && score <= 0) || false;\n const completed = completionStatus === 'completed';\n\n const response = computedItem.variables?.find(v => v.identifier === 'RESPONSE')?.value || '';\n\n const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;\n\n const containsCorrectResponse = !!item?.variables?.some(v => v['correctResponse']);\n const containsMapping = !!item?.variables?.some(v => {\n return v['mapping']?.mapEntries?.length > 0 || v['areaMapping']?.areaMapEntries?.length > 0;\n });\n const hasCorrectResponse = !containsCorrectResponse && !containsMapping;\n\n return {\n ...computedItem,\n completionStatus,\n score,\n maxScore,\n hasCorrectResponse,\n categories,\n type,\n active,\n correct,\n incorrect,\n completed,\n index,\n response\n };\n })\n };\n })\n };\n })\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,SAAS,eAAe;AACjC,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,UAAU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