@citolab/qti-components 7.2.1 → 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-2EE5IVNF.js +1 -0
- package/cdn/chunks/chunk-2PEB7XOI.js +1 -0
- package/cdn/chunks/chunk-2S62LLS5.js +2 -0
- package/cdn/chunks/chunk-2YSPUZLT.js +2 -0
- package/cdn/chunks/chunk-33KVDPBT.js +5 -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-4TNE5ZQS.js +5 -0
- package/cdn/chunks/chunk-4U6VOTDY.js +2 -0
- package/cdn/chunks/chunk-57ZBXU3V.js +5 -0
- package/cdn/chunks/chunk-5B5ZBB3H.js +2 -0
- package/cdn/chunks/chunk-5RGC3O3Z.js +3 -0
- package/cdn/chunks/chunk-5WJBI6M7.js +1033 -0
- package/cdn/chunks/chunk-66BMMESW.js +2 -0
- package/cdn/chunks/chunk-6D53FU3U.js +2 -0
- package/cdn/chunks/chunk-6KJL4I6M.js +1 -0
- package/cdn/chunks/chunk-72GJGEI2.js +2 -0
- package/cdn/chunks/chunk-73GTDWYG.js +2 -0
- package/cdn/chunks/chunk-7ASLC5ZB.js +1 -0
- package/cdn/chunks/chunk-7G2JKRYL.js +3 -0
- package/cdn/chunks/chunk-7HDBTHS7.js +2 -0
- package/cdn/chunks/chunk-7OAHC7YP.js +1 -0
- package/cdn/chunks/chunk-7P7BX6D6.js +1 -0
- package/cdn/chunks/chunk-7U6V7TMQ.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-BH7YS4N7.js +5 -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-DAKW2UJX.js +3 -0
- package/cdn/chunks/chunk-DKMPPZUE.js +2 -0
- package/cdn/chunks/chunk-DNPPZXZF.js +1 -0
- package/cdn/chunks/chunk-DPW6VAG2.js +3441 -0
- package/cdn/chunks/chunk-DQCUGHMI.js +2 -0
- package/cdn/chunks/chunk-DTD5NE7V.js +2 -0
- package/cdn/chunks/chunk-EJE3C3VD.js +5 -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-FGT2KVW2.js +1 -0
- package/cdn/chunks/chunk-FKNSURIA.js +2 -0
- package/cdn/chunks/chunk-FNCQNHCU.js +1 -0
- package/cdn/chunks/chunk-FXG6JQNB.js +3 -0
- package/cdn/chunks/chunk-G3O7FTGW.js +2 -0
- package/cdn/chunks/chunk-GSDSRYPT.js +5 -0
- package/cdn/chunks/chunk-GTDTMMHF.js +2 -0
- package/cdn/chunks/chunk-GW7MTJY4.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-HNZFDARC.js +2 -0
- package/cdn/chunks/chunk-I25TBSYM.js +8 -0
- package/cdn/chunks/chunk-I37HIF37.js +2 -0
- package/cdn/chunks/chunk-IAXDPXPS.js +2 -0
- package/cdn/chunks/chunk-IFSRAUBH.js +1 -0
- package/cdn/chunks/chunk-IJ47QETV.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-JVY3MIVH.js +5 -0
- package/cdn/chunks/chunk-JXGYDOJM.js +3 -0
- package/cdn/chunks/chunk-K3HDRUZ2.js +2 -0
- package/cdn/chunks/chunk-KGNJ44AT.js +2 -0
- package/cdn/chunks/chunk-KM6BQLUW.js +2 -0
- package/cdn/chunks/chunk-KMPDXXNC.js +5 -0
- package/cdn/chunks/chunk-KPFC2HQR.js +3 -0
- package/cdn/chunks/chunk-KZQ2VXMQ.js +2 -0
- package/cdn/chunks/chunk-LEC3TBJ3.js +2 -0
- package/cdn/chunks/chunk-LZMZV6TD.js +2 -0
- package/cdn/chunks/chunk-ME2BEQTK.js +3463 -0
- package/cdn/chunks/chunk-MM3TTGOD.js +5 -0
- package/cdn/chunks/chunk-MR6ZHDES.js +1 -0
- package/cdn/chunks/chunk-N6A5NZLH.js +1 -0
- package/cdn/chunks/chunk-NBXY7TMD.js +2 -0
- package/cdn/chunks/chunk-NCNOPEEF.js +2 -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-O7JELRBY.js +2 -0
- package/cdn/chunks/chunk-OCQAZUB6.js +2 -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-QBBWQ5J6.js +5 -0
- package/cdn/chunks/chunk-QNNLXEUP.js +1 -0
- package/cdn/chunks/chunk-QPP7ZB2K.js +5 -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-RSOX5VS5.js +3 -0
- package/cdn/chunks/chunk-SGUBIUUK.js +1 -0
- package/cdn/chunks/chunk-SHXTMXYU.js +1 -0
- package/cdn/chunks/chunk-SKCRMPN3.js +8 -0
- package/cdn/chunks/chunk-SNRRONMC.js +2 -0
- package/cdn/chunks/chunk-SUDAVHNM.js +1 -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-UUKFU4BI.js +2 -0
- package/cdn/chunks/chunk-V65TZQVT.js +2 -0
- package/cdn/chunks/chunk-VIW7IGYG.js +2 -0
- package/cdn/chunks/chunk-W3L3NJQM.js +1 -0
- package/cdn/chunks/chunk-W7LBE76A.js +5 -0
- package/cdn/chunks/chunk-WANQ7VHH.js +2 -0
- package/cdn/chunks/chunk-WI3S4WLU.js +2 -0
- package/cdn/chunks/chunk-WQK3JD6Q.js +5 -0
- package/cdn/chunks/chunk-WRAMSS3Q.js +3465 -0
- package/cdn/chunks/chunk-XDXLBDGD.js +2 -0
- package/cdn/chunks/chunk-XLVU3CES.js +1 -0
- package/cdn/chunks/chunk-XLY6GBBJ.js +2 -0
- package/cdn/chunks/chunk-XNII2G63.js +3468 -0
- package/cdn/chunks/chunk-YL5IGHSU.js +1 -0
- package/cdn/chunks/chunk-YSCJG7CX.js +3461 -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-item/components/item-container.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/test-container.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-25AXOL6N.js +73 -0
- package/dist/chunks/chunk-25AXOL6N.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-34ZMZ5GH.js +76 -0
- package/dist/chunks/chunk-34ZMZ5GH.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-3UPSFFDF.js +45 -0
- package/dist/chunks/chunk-3UPSFFDF.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-4NZYGJLT.js +94 -0
- package/dist/chunks/chunk-4NZYGJLT.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-4UIDYSZL.js +78 -0
- package/dist/chunks/chunk-4UIDYSZL.js.map +1 -0
- package/dist/chunks/chunk-4V7ZPUTP.js +78 -0
- package/dist/chunks/chunk-4V7ZPUTP.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-5IQUODBV.js +94 -0
- package/dist/chunks/chunk-5IQUODBV.js.map +1 -0
- package/dist/chunks/chunk-6B7USFAR.js +82 -0
- package/dist/chunks/chunk-6B7USFAR.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-6IC436D3.js +95 -0
- package/dist/chunks/chunk-6IC436D3.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-6MXANZQB.js +80 -0
- package/dist/chunks/chunk-6MXANZQB.js.map +1 -0
- package/dist/chunks/chunk-6UZG2X74.js +870 -0
- package/dist/chunks/chunk-6UZG2X74.js.map +1 -0
- package/dist/chunks/chunk-6XLSPSL3.js +94 -0
- package/dist/chunks/chunk-6XLSPSL3.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-AXVMZW54.js +73 -0
- package/dist/chunks/chunk-AXVMZW54.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-B5Y4EZF6.js +80 -0
- package/dist/chunks/chunk-B5Y4EZF6.js.map +1 -0
- package/dist/chunks/chunk-B7NLQTW7.js +69 -0
- package/dist/chunks/chunk-B7NLQTW7.js.map +1 -0
- package/dist/chunks/chunk-BAEQ4MHU.js +69 -0
- package/dist/chunks/chunk-BAEQ4MHU.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-C2KEHCRU.js +80 -0
- package/dist/chunks/chunk-C2KEHCRU.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-CL6HNHNL.js +72 -0
- package/dist/chunks/chunk-CL6HNHNL.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-DH2EP5PV.js +81 -0
- package/dist/chunks/chunk-DH2EP5PV.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-DIETZXSR.js +78 -0
- package/dist/chunks/chunk-DIETZXSR.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-DOP7DN3W.js +78 -0
- package/dist/chunks/chunk-DOP7DN3W.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-DTZHLZH2.js +8 -0
- package/dist/chunks/chunk-DTZHLZH2.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-EBKJVMIY.js +79 -0
- package/dist/chunks/chunk-EBKJVMIY.js.map +1 -0
- package/dist/chunks/chunk-ECXRMWLT.js +94 -0
- package/dist/chunks/chunk-ECXRMWLT.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-FDIYM6TD.js +68 -0
- package/dist/chunks/chunk-FDIYM6TD.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-FROMX3AY.js +78 -0
- package/dist/chunks/chunk-FROMX3AY.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-FVD3INZH.js +69 -0
- package/dist/chunks/chunk-FVD3INZH.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-GJVATV62.js +43 -0
- package/dist/chunks/chunk-GJVATV62.js.map +1 -0
- package/dist/chunks/chunk-GWSHKTCL.js +33 -0
- package/dist/chunks/chunk-GWSHKTCL.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-H2Z5FH4R.js +76 -0
- package/dist/chunks/chunk-H2Z5FH4R.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-HAP6ALTQ.js +78 -0
- package/dist/chunks/chunk-HAP6ALTQ.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-HL7H4ZGY.js +82 -0
- package/dist/chunks/chunk-HL7H4ZGY.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-HQ7IWQPH.js +80 -0
- package/dist/chunks/chunk-HQ7IWQPH.js.map +1 -0
- package/dist/chunks/chunk-IA235UXD.js +79 -0
- package/dist/chunks/chunk-IA235UXD.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-IIDUZWYL.js +78 -0
- package/dist/chunks/chunk-IIDUZWYL.js.map +1 -0
- package/dist/chunks/chunk-IKVCQGA6.js +79 -0
- package/dist/chunks/chunk-IKVCQGA6.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-IT6EGJUH.js +68 -0
- package/dist/chunks/chunk-IT6EGJUH.js.map +1 -0
- package/dist/chunks/chunk-IWSVL7HX.js +94 -0
- package/dist/chunks/chunk-IWSVL7HX.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-K5SSEHCG.js +92 -0
- package/dist/chunks/chunk-K5SSEHCG.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-KYGAKC4X.js +82 -0
- package/dist/chunks/chunk-KYGAKC4X.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-LT563K5H.js +78 -0
- package/dist/chunks/chunk-LT563K5H.js.map +1 -0
- package/dist/chunks/chunk-LVWZUV4A.js +86 -0
- package/dist/chunks/chunk-LVWZUV4A.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-MCMAHBGE.js +3455 -0
- package/dist/chunks/chunk-MCMAHBGE.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-NFPHKFFE.js +78 -0
- package/dist/chunks/chunk-NFPHKFFE.js.map +1 -0
- package/dist/chunks/chunk-NLW7S5TN.js +94 -0
- package/dist/chunks/chunk-NLW7S5TN.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-O2YP7VIE.js +245 -0
- package/dist/chunks/chunk-O2YP7VIE.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-OAKKH2XA.js +99 -0
- package/dist/chunks/chunk-OAKKH2XA.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-OBIKEFCI.js +56 -0
- package/dist/chunks/chunk-OBIKEFCI.js.map +1 -0
- package/dist/chunks/chunk-OEJMOV45.js +78 -0
- package/dist/chunks/chunk-OEJMOV45.js.map +1 -0
- package/dist/chunks/chunk-OFYYP7AK.js +94 -0
- package/dist/chunks/chunk-OFYYP7AK.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-PJMWNLXZ.js +80 -0
- package/dist/chunks/chunk-PJMWNLXZ.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-QGVSNUAF.js +79 -0
- package/dist/chunks/chunk-QGVSNUAF.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-QIN2S2F7.js +94 -0
- package/dist/chunks/chunk-QIN2S2F7.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-QKYFFNPR.js +3453 -0
- package/dist/chunks/chunk-QKYFFNPR.js.map +1 -0
- package/dist/chunks/chunk-QMIYPOBM.js +3458 -0
- package/dist/chunks/chunk-QMIYPOBM.js.map +1 -0
- package/dist/chunks/chunk-QMYMPOQQ.js +69 -0
- package/dist/chunks/chunk-QMYMPOQQ.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-RGQDJQVE.js +3451 -0
- package/dist/chunks/chunk-RGQDJQVE.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-SWROECSL.js +82 -0
- package/dist/chunks/chunk-SWROECSL.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-TGF5F45T.js +94 -0
- package/dist/chunks/chunk-TGF5F45T.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-TUVS6HU4.js +85 -0
- package/dist/chunks/chunk-TUVS6HU4.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-UHU4AWX2.js +28 -0
- package/dist/chunks/chunk-UHU4AWX2.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-V53ESOPP.js +79 -0
- package/dist/chunks/chunk-V53ESOPP.js.map +1 -0
- package/dist/chunks/chunk-VGGCSCVL.js +94 -0
- package/dist/chunks/chunk-VGGCSCVL.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-WTN76Y5P.js +74 -0
- package/dist/chunks/chunk-WTN76Y5P.js.map +1 -0
- package/dist/chunks/chunk-WVMOFVRE.js +74 -0
- package/dist/chunks/chunk-WVMOFVRE.js.map +1 -0
- package/dist/chunks/chunk-WXQLAXP4.js +73 -0
- package/dist/chunks/chunk-WXQLAXP4.js.map +1 -0
- package/dist/chunks/chunk-X2ZV2OFN.js +82 -0
- package/dist/chunks/chunk-X2ZV2OFN.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-XAJNR7FS.js +74 -0
- package/dist/chunks/chunk-XAJNR7FS.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-YBDDKT65.js +69 -0
- package/dist/chunks/chunk-YBDDKT65.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-YKKQ6AI7.js +69 -0
- package/dist/chunks/chunk-YKKQ6AI7.js.map +1 -0
- package/dist/chunks/chunk-YLHGELZY.js +79 -0
- package/dist/chunks/chunk-YLHGELZY.js.map +1 -0
- package/dist/chunks/chunk-YQC26WHY.js +79 -0
- package/dist/chunks/chunk-YQC26WHY.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-ZBUXIAEV.js +3431 -0
- package/dist/chunks/chunk-ZBUXIAEV.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-ZU6ANMBF.js +28 -0
- package/dist/chunks/chunk-ZU6ANMBF.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 +9 -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 +34 -34
- package/dist/item.css +6 -0
- package/dist/qti-components-jsx.d.ts +15 -11
- package/dist/qti-item/components/item-container.js +2 -2
- 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 +6 -6
- package/dist/qti-test/components/index.d.ts +4 -3
- package/dist/qti-test/components/index.js +21 -21
- package/dist/qti-test/components/test-container.js +2 -2
- 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 +9 -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/qti-test-feedback-C4bd_5i4.d.ts +98 -0
- package/dist/vscode.html-custom-data.json +14 -8
- package/package.json +19 -17
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
item_default
|
|
3
|
+
} from "./chunk-QKYFFNPR.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
+
import {
|
|
8
|
+
qtiTransformTest
|
|
9
|
+
} from "./chunk-VEWD22O5.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-container.ts
|
|
15
|
+
import { LitElement, html } from "lit";
|
|
16
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
17
|
+
import { until } from "lit/directives/until.js";
|
|
18
|
+
var TestContainer = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.testURL = null;
|
|
22
|
+
this.testDoc = null;
|
|
23
|
+
this.testXML = null;
|
|
24
|
+
/** Template content if provided */
|
|
25
|
+
this.templateContent = null;
|
|
26
|
+
}
|
|
27
|
+
async handleTestURLChange() {
|
|
28
|
+
if (!this.testURL) return;
|
|
29
|
+
try {
|
|
30
|
+
const api = await qtiTransformTest().load(this.testURL);
|
|
31
|
+
this.testDoc = api.htmlDoc();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Error loading or parsing XML:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
handleTestXMLChange() {
|
|
37
|
+
if (!this.testXML) return;
|
|
38
|
+
try {
|
|
39
|
+
this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Error parsing XML:", error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.initializeTemplateContent();
|
|
47
|
+
this.applyStyles();
|
|
48
|
+
if (this.testURL) {
|
|
49
|
+
this.handleTestURLChange();
|
|
50
|
+
}
|
|
51
|
+
if (this.testXML) {
|
|
52
|
+
this.handleTestXMLChange();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
initializeTemplateContent() {
|
|
56
|
+
const template = this.querySelector("template");
|
|
57
|
+
this.templateContent = template ? template.content : html``;
|
|
58
|
+
}
|
|
59
|
+
applyStyles() {
|
|
60
|
+
const sheet = new CSSStyleSheet();
|
|
61
|
+
sheet.replaceSync(item_default);
|
|
62
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return html`
|
|
66
|
+
${this.templateContent}
|
|
67
|
+
<slot></slot>
|
|
68
|
+
${until(this.testDoc, html`<span>Loading...</span>`)}
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ type: String, attribute: "test-url" })
|
|
74
|
+
], TestContainer.prototype, "testURL", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
state()
|
|
77
|
+
], TestContainer.prototype, "testDoc", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
state()
|
|
80
|
+
], TestContainer.prototype, "testXML", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("testURL", { waitUntilFirstUpdate: true })
|
|
83
|
+
], TestContainer.prototype, "handleTestURLChange", 1);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
watch("testXML", { waitUntilFirstUpdate: true })
|
|
86
|
+
], TestContainer.prototype, "handleTestXMLChange", 1);
|
|
87
|
+
TestContainer = __decorateClass([
|
|
88
|
+
customElement("test-container")
|
|
89
|
+
], TestContainer);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
TestContainer
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-IWSVL7HX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\n\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformTest } from '../../qti-transformers';\n\n/**\n * `<test-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-test` will be placed inside the shadow DOM of this element.\n * The element loads the test from the provided URL and renders it inside the shadow DOM.\n *\n * ```html\n * <qti-test>\n * <test-navigation>\n * <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n * </test-navigation>\n * </qti-test>\n * ```\n */\n@customElement('test-container')\nexport class TestContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'test-url' })\n testURL: string = null;\n\n /** A parsed HTML document */\n @state()\n testDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n testXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('testURL', { waitUntilFirstUpdate: true })\n protected async handleTestURLChange() {\n if (!this.testURL) return;\n try {\n const api = await qtiTransformTest().load(this.testURL);\n this.testDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('testXML', { waitUntilFirstUpdate: true })\n protected handleTestXMLChange() {\n if (!this.testXML) return;\n try {\n this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.testURL) {\n this.handleTestURLChange();\n }\n if (this.testXML) {\n this.handleTestXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.testDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-container': TestContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAoBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,MAAM,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACtD,WAAK,UAAU,IAAI,QAAQ;AAAA,IAC7B,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;AAC9B,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,WAAK,UAAU,iBAAiB,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ;AAAA,IAChE,SAAS,OAAO;AACd,cAAQ,MAAM,sBAAsB,KAAK;AAAA,IAC3C;AAAA,EACF;AAAA,EAEA,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,SAAK,0BAA0B;AAC/B,SAAK,YAAY;AACjB,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AACA,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAEQ,4BAA4B;AAClC,UAAM,WAAW,KAAK,cAAc,UAAU;AAC9C,SAAK,kBAAkB,WAAW,SAAS,UAAU;AAAA,EACvD;AAAA,EAEQ,cAAc;AACpB,UAAM,QAAQ,IAAI,cAAc;AAChC,UAAM,YAAY,YAAO;AACzB,SAAK,WAAW,qBAAqB,CAAC,KAAK;AAAA,EAC7C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,QACH,KAAK,eAAe;AAAA;AAAA,QAEpB,MAAM,KAAK,SAAS,6BAA6B,CAAC;AAAA;AAAA,EAExD;AACF;AAhEE;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW,CAAC;AAAA,GAFtC,cAGX;AAIA;AAAA,EADC,MAAM;AAAA,GANI,cAOX;AAIA;AAAA,EADC,MAAM;AAAA,GAVI,cAWX;AAMgB;AAAA,EADf,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhBrC,cAiBK;AAWN;AAAA,EADT,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3BrC,cA4BD;AA5BC,gBAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sessionContext
|
|
3
|
+
} from "./chunk-22IRJWWY.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-view-toggle.ts
|
|
9
|
+
import { consume } from "@lit/context";
|
|
10
|
+
import { html, LitElement, nothing } from "lit";
|
|
11
|
+
import { customElement } from "lit/decorators.js";
|
|
12
|
+
import { prepareTemplate } from "stampino";
|
|
13
|
+
var TestViewToggle = class extends LitElement {
|
|
14
|
+
createRenderRoot() {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
super.connectedCallback();
|
|
19
|
+
const templateElement = this.querySelector("template");
|
|
20
|
+
if (!templateElement) {
|
|
21
|
+
this.myTemplate = null;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
25
|
+
}
|
|
26
|
+
_switchView(view) {
|
|
27
|
+
this.dispatchEvent(
|
|
28
|
+
new CustomEvent("on-test-switch-view", {
|
|
29
|
+
composed: true,
|
|
30
|
+
bubbles: true,
|
|
31
|
+
detail: view
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
firstUpdated(_changedProperties) {
|
|
36
|
+
this.addEventListener("click", () => {
|
|
37
|
+
if (this.sessionContext?.view === "scorer") {
|
|
38
|
+
this._switchView("candidate");
|
|
39
|
+
} else {
|
|
40
|
+
this._switchView("scorer");
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return html`${this.myTemplate ? this.myTemplate({
|
|
46
|
+
view: this.sessionContext?.view
|
|
47
|
+
}) : nothing}`;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
__decorateClass([
|
|
51
|
+
consume({ context: sessionContext, subscribe: true })
|
|
52
|
+
], TestViewToggle.prototype, "sessionContext", 2);
|
|
53
|
+
TestViewToggle = __decorateClass([
|
|
54
|
+
customElement("test-view-toggle")
|
|
55
|
+
], TestViewToggle);
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
TestViewToggle
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=chunk-J3I5LKXH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-view-toggle.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement, nothing } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\n\nimport { sessionContext } from '../../exports/session.context';\n\nimport type { PropertyValues } from 'lit';\nimport type { SessionContext } from '../../exports/session.context';\n\n@customElement('test-view-toggle')\nexport class TestViewToggle extends LitElement {\n myTemplate: any;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n @consume({ context: sessionContext, subscribe: true })\n private sessionContext: SessionContext;\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n _switchView(view: string) {\n this.dispatchEvent(\n new CustomEvent('on-test-switch-view', {\n composed: true,\n bubbles: true,\n detail: view\n })\n );\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.addEventListener('click', () => {\n if (this.sessionContext?.view === 'scorer') {\n this._switchView('candidate');\n } else {\n this._switchView('scorer');\n }\n });\n }\n\n render() {\n return html`${this.myTemplate\n ? this.myTemplate({\n view: this.sessionContext?.view\n })\n : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-view-toggle': TestViewToggle;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAQzB,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAGnC,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAKA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,YAAY,MAAc;AACxB,SAAK;AAAA,MACH,IAAI,YAAY,uBAAuB;AAAA,QACrC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEU,aAAa,oBAA0C;AAC/D,SAAK,iBAAiB,SAAS,MAAM;AACnC,UAAI,KAAK,gBAAgB,SAAS,UAAU;AAC1C,aAAK,YAAY,WAAW;AAAA,MAC9B,OAAO;AACL,aAAK,YAAY,QAAQ;AAAA,MAC3B;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,WAAO,OAAO,KAAK,aACf,KAAK,WAAW;AAAA,MACd,MAAM,KAAK,gBAAgB;AAAA,IAC7B,CAAC,IACD,OAAO;AAAA,EACb;AACF;AAvCU;AAAA,EADP,QAAQ,EAAE,SAAS,gBAAgB,WAAW,KAAK,CAAC;AAAA,GAP1C,eAQH;AARG,iBAAN;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB;","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-JKX62AOP.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-scoring-feedback.ts
|
|
9
|
+
import { consume } from "@lit/context";
|
|
10
|
+
import { html, LitElement } from "lit";
|
|
11
|
+
import { customElement, property } from "lit/decorators.js";
|
|
12
|
+
var TestScoringFeedback = class extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.view = null;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
19
|
+
if (!activeItem || !activeItem.variables) return html``;
|
|
20
|
+
if (activeItem["category"] === "dep-informational") return html`<div>${this.dataset.informational}</div>`;
|
|
21
|
+
const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
|
|
22
|
+
const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
|
|
23
|
+
const score = parseInt(scoreOutcome?.value);
|
|
24
|
+
const externalScored = activeItem["externalScored"];
|
|
25
|
+
const feedbackText = () => {
|
|
26
|
+
if (completionStatus !== "completed") {
|
|
27
|
+
return this.dataset.textNoResponse;
|
|
28
|
+
}
|
|
29
|
+
if (!externalScored && score !== void 0 && !Number.isNaN(score)) {
|
|
30
|
+
return score > 0 ? this.dataset.textCorrect : this.dataset.textIncorrect;
|
|
31
|
+
}
|
|
32
|
+
if (externalScored === "externalMachine") {
|
|
33
|
+
return Number.isNaN(score) || score === void 0 ? "We konden je antwoord geen score geven, omdat we te weinig antwoorden konden vinden die op jouw antwoord leken. Kijk je antwoord zelf na." : `We hebben je antwoord ${score === 0 ? "geen punten" : score == 1 ? "\xE9\xE9n punt" : `${score} punten`} gegeven. Je kunt je score zelf aanpassen als je denkt dat dat niet klopt.`;
|
|
34
|
+
}
|
|
35
|
+
if (externalScored === "human") {
|
|
36
|
+
return Number.isNaN(score) ? "" : "Deze score heb je zelf toegekend.";
|
|
37
|
+
}
|
|
38
|
+
return this.dataset.scoreUnknown;
|
|
39
|
+
};
|
|
40
|
+
return html`<div>${feedbackText()}</div>`;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__decorateClass([
|
|
44
|
+
consume({ context: computedContext, subscribe: true })
|
|
45
|
+
], TestScoringFeedback.prototype, "computedContext", 2);
|
|
46
|
+
__decorateClass([
|
|
47
|
+
property({ type: String, attribute: "view" })
|
|
48
|
+
], TestScoringFeedback.prototype, "view", 2);
|
|
49
|
+
TestScoringFeedback = __decorateClass([
|
|
50
|
+
customElement("test-scoring-feedback")
|
|
51
|
+
], TestScoringFeedback);
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
TestScoringFeedback
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=chunk-JDSSQE7I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-scoring-feedback.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\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';\nimport type { ViewMode } from 'storybook/internal/types';\n\n@customElement('test-scoring-feedback')\nexport class TestScoringFeedback extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n protected computedContext?: ComputedContext;\n\n @property({ type: String, attribute: 'view' })\n public view: ViewMode = null;\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 if (activeItem['category'] === 'dep-informational') return html`<div>${this.dataset.informational}</div>`;\n\n const completionStatus = activeItem?.variables.find(v => v.identifier === 'completionStatus')?.value;\n const scoreOutcome = activeItem?.variables.find(vr => vr.identifier == 'SCORE') as OutcomeVariable;\n\n const score = parseInt(scoreOutcome?.value as string);\n const externalScored = activeItem['externalScored'];\n\n const feedbackText = () => {\n if (completionStatus !== 'completed') {\n return this.dataset.textNoResponse;\n }\n\n if (!externalScored && score !== undefined && !Number.isNaN(score)) {\n return score > 0 ? this.dataset.textCorrect : this.dataset.textIncorrect;\n }\n\n if (externalScored === 'externalMachine') {\n return Number.isNaN(score) || score === undefined\n ? 'We konden je antwoord geen score geven, omdat we te weinig antwoorden konden vinden die op jouw antwoord leken. Kijk je antwoord zelf na.'\n : `We hebben je antwoord ${score === 0 ? 'geen punten' : score == 1 ? 'één punt' : `${score} punten`} gegeven. Je kunt je score zelf aanpassen als je denkt dat dat niet klopt.`;\n }\n\n if (externalScored === 'human') {\n return Number.isNaN(score) ? '' : 'Deze score heb je zelf toegekend.';\n }\n\n return this.dataset.scoreUnknown;\n };\n\n return html`<div>${feedbackText()}</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-scoring-feedback': TestScoringFeedback;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,gBAAgB;AASjC,IAAM,sBAAN,cAAkC,WAAW;AAAA,EAA7C;AAAA;AAKL,SAAO,OAAiB;AAAA;AAAA,EAExB,SAAS;AACP,UAAM,aAAa,KAAK,iBAAiB,UACtC,QAAQ,cAAY,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,CAAC,EACvE,KAAK,UAAQ,KAAK,MAAM;AAE3B,QAAI,CAAC,cAAc,CAAC,WAAW,UAAW,QAAO;AAEjD,QAAI,WAAW,UAAU,MAAM,oBAAqB,QAAO,YAAY,KAAK,QAAQ,aAAa;AAEjG,UAAM,mBAAmB,YAAY,UAAU,KAAK,OAAK,EAAE,eAAe,kBAAkB,GAAG;AAC/F,UAAM,eAAe,YAAY,UAAU,KAAK,QAAM,GAAG,cAAc,OAAO;AAE9E,UAAM,QAAQ,SAAS,cAAc,KAAe;AACpD,UAAM,iBAAiB,WAAW,gBAAgB;AAElD,UAAM,eAAe,MAAM;AACzB,UAAI,qBAAqB,aAAa;AACpC,eAAO,KAAK,QAAQ;AAAA,MACtB;AAEA,UAAI,CAAC,kBAAkB,UAAU,UAAa,CAAC,OAAO,MAAM,KAAK,GAAG;AAClE,eAAO,QAAQ,IAAI,KAAK,QAAQ,cAAc,KAAK,QAAQ;AAAA,MAC7D;AAEA,UAAI,mBAAmB,mBAAmB;AACxC,eAAO,OAAO,MAAM,KAAK,KAAK,UAAU,SACpC,8IACA,yBAAyB,UAAU,IAAI,gBAAgB,SAAS,IAAI,mBAAa,GAAG,KAAK,SAAS;AAAA,MACxG;AAEA,UAAI,mBAAmB,SAAS;AAC9B,eAAO,OAAO,MAAM,KAAK,IAAI,KAAK;AAAA,MACpC;AAEA,aAAO,KAAK,QAAQ;AAAA,IACtB;AAEA,WAAO,YAAY,aAAa,CAAC;AAAA,EACnC;AACF;AA5CY;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,oBAED;AAGH;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,OAAO,CAAC;AAAA,GAJlC,oBAKJ;AALI,sBAAN;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/exports/computed.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nimport type { View } from '../qti-test/core/mixins/test-view.mixin';\nimport type { ComputedItemContext } from './computed-item.context';\n\nexport type ComputedItem = ComputedItemContext & {\n // rawscore?: Readonly<string | string[]>; // not necessary for outside world\n // score?: number; // not necessary for outside world\n // completionStatus?: Readonly<string | string[]>; // not necessary for outside world\n // categories?: string[]; // not necessary for outside world\n type?: 'info' | 'regular';\n index?: number;\n active?: boolean;\n};\n\nexport type ComputedContext = {\n // testElement?: HTMLElement;\n identifier: string;\n title: string;\n testParts: {\n active?: boolean;\n identifier: string;\n navigationMode: 'linear' | 'nonlinear';\n submissionMode: 'individual' | 'simultaneous';\n sections: {\n active?: boolean;\n identifier: string;\n title: string;\n completed?: boolean;\n items: ComputedItem[];\n }[];\n }[];\n};\n\nexport const computedContext = createContext<Readonly<ComputedContext>>(Symbol('computedContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAkCvB,IAAM,kBAAkB,cAAyC,OAAO,iBAAiB,CAAC;","names":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-NY5T6G3K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestStamp = class extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.debug = false;
|
|
17
|
+
this.stampContext = null;
|
|
18
|
+
}
|
|
19
|
+
createRenderRoot() {
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
const templateElement = this.querySelector("template");
|
|
25
|
+
if (!templateElement) {
|
|
26
|
+
this.myTemplate = null;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
30
|
+
}
|
|
31
|
+
willUpdate(_changedProperties) {
|
|
32
|
+
if (!this.computedContext) {
|
|
33
|
+
this.stampContext = null;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
37
|
+
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
38
|
+
const activeItem = activeSection?.items.find((item) => item.active);
|
|
39
|
+
if (!activeTestPart || !activeSection || !activeItem) {
|
|
40
|
+
this.stampContext = null;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const augmentedTestPart = {
|
|
44
|
+
...activeTestPart,
|
|
45
|
+
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables, ...rest }) => rest)),
|
|
46
|
+
sections: activeTestPart.sections.map((section) => ({
|
|
47
|
+
...section,
|
|
48
|
+
items: section.items.map(({ variables, ...rest }) => rest)
|
|
49
|
+
}))
|
|
50
|
+
};
|
|
51
|
+
const augmentedSection = { ...activeSection, items: activeSection.items };
|
|
52
|
+
const { testParts, ...activeTest } = this.computedContext;
|
|
53
|
+
this.stampContext = {
|
|
54
|
+
view: this.computedContext.view,
|
|
55
|
+
item: activeItem,
|
|
56
|
+
section: augmentedSection,
|
|
57
|
+
testpart: augmentedTestPart,
|
|
58
|
+
test: activeTest
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
if (!this.stampContext) return nothing;
|
|
63
|
+
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
64
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
__decorateClass([
|
|
68
|
+
property({ type: Boolean, reflect: true })
|
|
69
|
+
], TestStamp.prototype, "debug", 2);
|
|
70
|
+
__decorateClass([
|
|
71
|
+
state(),
|
|
72
|
+
consume({ context: computedContext, subscribe: true })
|
|
73
|
+
], TestStamp.prototype, "computedContext", 2);
|
|
74
|
+
__decorateClass([
|
|
75
|
+
state()
|
|
76
|
+
], TestStamp.prototype, "stampContext", 2);
|
|
77
|
+
TestStamp = __decorateClass([
|
|
78
|
+
customElement("test-stamp")
|
|
79
|
+
], TestStamp);
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
TestStamp
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=chunk-JMYRH33D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n testpart?: unknown;\n section?: unknown;\n item?: unknown;\n } | null = null;\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n\n if (!activeTestPart || !activeSection || !activeItem) {\n this.stampContext = null;\n return;\n }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n item: activeItem,\n section: augmentedSection,\n testpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAUjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMG;AAAA;AAAA,EAID,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAAW,oBAA0C;AAC7D,QAAI,CAAC,KAAK,iBAAiB;AACzB,WAAK,eAAe;AACpB;AAAA,IACF;AAEA,UAAM,iBAAiB,KAAK,gBAAgB,UAAU,KAAK,cAAY,SAAS,MAAM;AACtF,UAAM,gBAAgB,gBAAgB,SAAS,KAAK,aAAW,QAAQ,MAAM;AAC7E,UAAM,aAAa,eAAe,MAAM,KAAK,UAAQ,KAAK,MAAM;AAEhE,QAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,YAAY;AACpD,WAAK,eAAe;AACpB;AAAA,IACF;AAEA,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,OAAO,eAAe,SAAS,QAAQ,aAAW,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,MAAM,IAAI,CAAC;AAAA,MACrG,UAAU,eAAe,SAAS,IAAI,cAAY;AAAA,QAChD,GAAG;AAAA,QACH,OAAO,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,MAAM,IAAI;AAAA,MAC3D,EAAE;AAAA,IACJ;AAEA,UAAM,mBAAmB,EAAE,GAAG,eAAe,OAAO,cAAc,MAAM;AACxE,UAAM,EAAE,WAAW,GAAG,WAAW,IAAI,KAAK;AAE1C,SAAK,eAAe;AAAA,MAClB,MAAM,KAAK,gBAAgB;AAAA,MAC3B,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,MACV,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,aAAc,QAAO;AAC/B,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AAxES;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-M43YVT6M.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-section-buttons-stamp.ts
|
|
9
|
+
import { html, LitElement } from "lit";
|
|
10
|
+
import { customElement } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestSectionButtonsStamp = class extends LitElement {
|
|
14
|
+
createRenderRoot() {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this._internals = this.attachInternals();
|
|
20
|
+
this._internals.ariaLabel = "pagination";
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
const templateElement = this.querySelector("template");
|
|
25
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (!this.computedContext) return html``;
|
|
29
|
+
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
30
|
+
return html` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorateClass([
|
|
34
|
+
consume({ context: computedContext, subscribe: true })
|
|
35
|
+
], TestSectionButtonsStamp.prototype, "computedContext", 2);
|
|
36
|
+
TestSectionButtonsStamp = __decorateClass([
|
|
37
|
+
customElement("test-section-buttons-stamp")
|
|
38
|
+
], TestSectionButtonsStamp);
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
TestSectionButtonsStamp
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=chunk-JX3F6YCC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-section-buttons-stamp.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-section-buttons-stamp')\nexport class TestSectionButtonsStamp extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n myTemplate: TemplateFunction;\n private _internals: ElementInternals;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.ariaLabel = 'pagination';\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n render() {\n if (!this.computedContext) return html``;\n const sections = this.computedContext.testParts.flatMap(testPart => testPart.sections);\n\n return html` ${sections.map(item => this.myTemplate({ item }))} `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-section-buttons-stamp': TestSectionButtonsStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAQjB,IAAM,0BAAN,cAAsC,WAAW;AAAA,EAO5C,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,YAAY;AAAA,EAC9B;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,gBAAiB,QAAO;AAClC,UAAM,WAAW,KAAK,gBAAgB,UAAU,QAAQ,cAAY,SAAS,QAAQ;AAErF,WAAO,QAAQ,SAAS,IAAI,UAAQ,KAAK,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;AAAA,EAChE;AACF;AA3BU;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,wBAEH;AAFG,0BAAN;AAAA,EADN,cAAc,4BAA4B;AAAA,GAC9B;","names":[]}
|
|
@@ -0,0 +1,249 @@
|
|
|
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
|
+
// const initContext = this.initContext.find(i => i.identifier === item.identifier) || {};
|
|
79
|
+
/* PK: on test connected we can build the computed context */
|
|
80
|
+
_handleTestConnected(event) {
|
|
81
|
+
console.log("1", this.initContext);
|
|
82
|
+
this.initContext = null;
|
|
83
|
+
this._testElement = event.detail;
|
|
84
|
+
const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
|
|
85
|
+
this.computedContext = {
|
|
86
|
+
identifier: this._testElement.identifier,
|
|
87
|
+
title: this._testElement.title,
|
|
88
|
+
testParts: testPartElements.map((testPart) => {
|
|
89
|
+
const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
|
|
90
|
+
return {
|
|
91
|
+
active: false,
|
|
92
|
+
identifier: testPart.identifier,
|
|
93
|
+
navigationMode: testPart.navigationMode,
|
|
94
|
+
submissionMode: testPart.submissionMode,
|
|
95
|
+
sections: sectionElements.map((section) => {
|
|
96
|
+
const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
|
|
97
|
+
return {
|
|
98
|
+
active: false,
|
|
99
|
+
identifier: section.identifier,
|
|
100
|
+
title: section.title,
|
|
101
|
+
items: itemElements.map((item) => {
|
|
102
|
+
let itemContext = {};
|
|
103
|
+
if (this.initContext) {
|
|
104
|
+
const initContext = this.initContext.find((i) => i.identifier === item.identifier);
|
|
105
|
+
itemContext = initContext;
|
|
106
|
+
}
|
|
107
|
+
console.log("itemContext", itemContext);
|
|
108
|
+
return {
|
|
109
|
+
...itemContext,
|
|
110
|
+
active: false,
|
|
111
|
+
identifier: item.identifier,
|
|
112
|
+
href: item.href,
|
|
113
|
+
variables: []
|
|
114
|
+
};
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
})
|
|
118
|
+
};
|
|
119
|
+
})
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/* PK: on item connected we can add item only properties in the xml */
|
|
123
|
+
_handleItemConnected(event) {
|
|
124
|
+
console.log("2", this.initContext);
|
|
125
|
+
const itemElement = event.detail;
|
|
126
|
+
this.computedContext = {
|
|
127
|
+
...this.computedContext,
|
|
128
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
129
|
+
return {
|
|
130
|
+
...testPart,
|
|
131
|
+
sections: testPart.sections.map((section) => {
|
|
132
|
+
return {
|
|
133
|
+
...section,
|
|
134
|
+
items: section.items.map((item) => {
|
|
135
|
+
if (item.identifier !== itemElement.parentElement.getAttribute("identifier")) {
|
|
136
|
+
return item;
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
...item,
|
|
140
|
+
assessmentItemIdentifier: itemElement.getAttribute("identifier"),
|
|
141
|
+
label: itemElement.getAttribute("label"),
|
|
142
|
+
title: itemElement.title,
|
|
143
|
+
adaptive: itemElement.adaptive == "true" || false,
|
|
144
|
+
timeDependent: itemElement.timeDependent == "true" || false,
|
|
145
|
+
variables: itemElement._context.variables
|
|
146
|
+
};
|
|
147
|
+
})
|
|
148
|
+
};
|
|
149
|
+
})
|
|
150
|
+
};
|
|
151
|
+
})
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
155
|
+
willUpdate(_changedProperties) {
|
|
156
|
+
if (!this.computedContext) return;
|
|
157
|
+
let itemIndex = 1;
|
|
158
|
+
this.computedContext = {
|
|
159
|
+
...this.computedContext,
|
|
160
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
161
|
+
return {
|
|
162
|
+
...testPart,
|
|
163
|
+
active: this._sessionContext?.navPartId === testPart.identifier || false,
|
|
164
|
+
sections: testPart.sections.map((section) => {
|
|
165
|
+
return {
|
|
166
|
+
...section,
|
|
167
|
+
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
168
|
+
completed: section.items.every(
|
|
169
|
+
(item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
|
|
170
|
+
),
|
|
171
|
+
items: section.items.map((item) => {
|
|
172
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
173
|
+
const computedItem = { ...item, ...itemContext };
|
|
174
|
+
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
175
|
+
const score = parseInt(rawscore?.toString());
|
|
176
|
+
const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
177
|
+
const categories = computedItem.category ? computedItem.category?.split(" ") : [];
|
|
178
|
+
const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
|
|
179
|
+
const active = this._sessionContext?.navItemId === computedItem.identifier || false;
|
|
180
|
+
const correct = (
|
|
181
|
+
// this._testContext.view === 'scorer' &&
|
|
182
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false
|
|
183
|
+
);
|
|
184
|
+
const incorrect = (
|
|
185
|
+
// this._testContext.view === 'scorer' &&
|
|
186
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false
|
|
187
|
+
);
|
|
188
|
+
const completed = (
|
|
189
|
+
// this._testContext.view === 'candidate' &&
|
|
190
|
+
completionStatus === "completed"
|
|
191
|
+
);
|
|
192
|
+
const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
|
|
193
|
+
const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
194
|
+
const view = this._sessionContext.view;
|
|
195
|
+
return {
|
|
196
|
+
...computedItem,
|
|
197
|
+
// rawscore, // not necessary for outside world
|
|
198
|
+
// score, // not necessary for outside world
|
|
199
|
+
// completionStatus, // not necessary for outside world
|
|
200
|
+
// categories, // not necessary for outside world
|
|
201
|
+
type,
|
|
202
|
+
active,
|
|
203
|
+
correct,
|
|
204
|
+
incorrect,
|
|
205
|
+
completed,
|
|
206
|
+
index,
|
|
207
|
+
response,
|
|
208
|
+
view
|
|
209
|
+
};
|
|
210
|
+
})
|
|
211
|
+
};
|
|
212
|
+
})
|
|
213
|
+
};
|
|
214
|
+
})
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
__decorateClass([
|
|
219
|
+
property({ type: String })
|
|
220
|
+
], TestNavigation.prototype, "identifier", 2);
|
|
221
|
+
__decorateClass([
|
|
222
|
+
state()
|
|
223
|
+
], TestNavigation.prototype, "initContext", 2);
|
|
224
|
+
__decorateClass([
|
|
225
|
+
state(),
|
|
226
|
+
consume({ context: testContext, subscribe: true })
|
|
227
|
+
], TestNavigation.prototype, "_testContext", 2);
|
|
228
|
+
__decorateClass([
|
|
229
|
+
state(),
|
|
230
|
+
consume({ context: sessionContext, subscribe: true })
|
|
231
|
+
], TestNavigation.prototype, "_sessionContext", 2);
|
|
232
|
+
__decorateClass([
|
|
233
|
+
state()
|
|
234
|
+
], TestNavigation.prototype, "configContext", 2);
|
|
235
|
+
__decorateClass([
|
|
236
|
+
state(),
|
|
237
|
+
provide({ context: computedContext })
|
|
238
|
+
], TestNavigation.prototype, "computedContext", 2);
|
|
239
|
+
__decorateClass([
|
|
240
|
+
property({ type: Boolean, attribute: "auto-score-items" })
|
|
241
|
+
], TestNavigation.prototype, "autoScoreItems", 2);
|
|
242
|
+
TestNavigation = __decorateClass([
|
|
243
|
+
customElement("test-navigation")
|
|
244
|
+
], TestNavigation);
|
|
245
|
+
|
|
246
|
+
export {
|
|
247
|
+
TestNavigation
|
|
248
|
+
};
|
|
249
|
+
//# sourceMappingURL=chunk-JXMZQ3DF.js.map
|