@citolab/qti-components 7.1.4 → 7.1.6
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-24FGNKCD.js +1007 -0
- package/cdn/chunks/chunk-2GQCYBJ3.js +5 -0
- package/cdn/chunks/chunk-2OZT6A22.js +5 -0
- package/cdn/chunks/chunk-3AJ3S2FB.js +23 -0
- package/cdn/chunks/chunk-3M6EKDMW.js +1 -0
- package/cdn/chunks/chunk-3QCUKN7V.js +1 -0
- package/cdn/chunks/chunk-4LPUHBZG.js +5 -0
- package/cdn/chunks/chunk-5UN2ELTW.js +23 -0
- package/cdn/chunks/chunk-5VTVIA6M.js +23 -0
- package/cdn/chunks/chunk-6JHIITOD.js +1 -0
- package/cdn/chunks/chunk-7UDDUERA.js +1007 -0
- package/cdn/chunks/chunk-7ZNR6KCO.js +5 -0
- package/cdn/chunks/chunk-AAOFOYWA.js +5 -0
- package/cdn/chunks/chunk-AJMJQJUQ.js +5 -0
- package/cdn/chunks/chunk-CY2CQDCJ.js +5 -0
- package/cdn/chunks/chunk-D2GQ4BES.js +1 -0
- package/cdn/chunks/chunk-D3C4N6YO.js +8 -0
- package/cdn/chunks/chunk-D6WQKU5P.js +5 -0
- package/cdn/chunks/chunk-DMIFXRAW.js +5 -0
- package/cdn/chunks/chunk-DQ7GTTCX.js +5 -0
- package/cdn/chunks/chunk-DVRZBFAS.js +5 -0
- package/cdn/chunks/chunk-E6M5VAZC.js +1007 -0
- package/cdn/chunks/chunk-EJDPW23L.js +5 -0
- package/cdn/chunks/chunk-FWCOZSKN.js +5 -0
- package/cdn/chunks/chunk-G24US7VC.js +23 -0
- package/cdn/chunks/chunk-HCWGJCF3.js +1007 -0
- package/cdn/chunks/chunk-IUEV6I3Y.js +5 -0
- package/cdn/chunks/chunk-J4CI5WG7.js +23 -0
- package/cdn/chunks/chunk-JEZ3FDS2.js +1007 -0
- package/cdn/chunks/chunk-L7FX2BSJ.js +1007 -0
- package/cdn/chunks/chunk-L7G3YUQJ.js +23 -0
- package/cdn/chunks/chunk-LKOMJADF.js +5 -0
- package/cdn/chunks/chunk-M2YVQSR3.js +5 -0
- package/cdn/chunks/chunk-MADHY2TG.js +5 -0
- package/cdn/chunks/chunk-MCE2HPAI.js +23 -0
- package/cdn/chunks/chunk-MPVVJRN5.js +5 -0
- package/cdn/chunks/chunk-MYK3AVE5.js +5 -0
- package/cdn/chunks/chunk-NQUXPDU3.js +1 -0
- package/cdn/chunks/chunk-O64TZW6N.js +5 -0
- package/cdn/chunks/chunk-OM6BKR6U.js +5 -0
- package/cdn/chunks/chunk-PTEZUFUL.js +5 -0
- package/cdn/chunks/chunk-Q3MPB5OG.js +23 -0
- package/cdn/chunks/chunk-RC3C5C7I.js +5 -0
- package/cdn/chunks/chunk-RDREFUYQ.js +1007 -0
- package/cdn/chunks/chunk-RPBLXGHD.js +5 -0
- package/cdn/chunks/chunk-RWCWDO5R.js +5 -0
- package/cdn/chunks/chunk-SEJ6XHOU.js +1 -0
- package/cdn/chunks/chunk-SHZ5UCLJ.js +5 -0
- package/cdn/chunks/chunk-SRXFURHS.js +5 -0
- package/cdn/chunks/chunk-TJWJV2U3.js +5 -0
- package/cdn/chunks/chunk-URO7DOBX.js +1 -0
- package/cdn/chunks/chunk-UVCZCMPG.js +5 -0
- package/cdn/chunks/chunk-V2HYQXWT.js +1007 -0
- package/cdn/chunks/chunk-V6VPFEQB.js +1 -0
- package/cdn/chunks/chunk-V7S5DVXO.js +5 -0
- package/cdn/chunks/chunk-VAKXKPIY.js +1007 -0
- package/cdn/chunks/chunk-VCATS6AD.js +5 -0
- package/cdn/chunks/chunk-VGBHSWOI.js +5 -0
- package/cdn/chunks/chunk-VTBQWQOW.js +23 -0
- package/cdn/chunks/chunk-W567D2AF.js +1 -0
- package/cdn/chunks/chunk-WQFK6JFL.js +5 -0
- package/cdn/chunks/chunk-WRAB6IVU.js +5 -0
- package/cdn/chunks/chunk-WWNOVLDK.js +23 -0
- package/cdn/chunks/chunk-XJHAZYHN.js +1007 -0
- package/cdn/chunks/chunk-YCTL45GB.js +1 -0
- package/cdn/chunks/chunk-ZRWDLR2Y.js +5 -0
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/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-loader/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-show-correct-response.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/cdn/qti-transformers/index.js +1 -1
- package/dist/chunks/chunk-2IXFDXDW.js +646 -0
- package/dist/chunks/chunk-2IXFDXDW.js.map +1 -0
- package/dist/chunks/chunk-2RRW2DFF.js +31 -0
- package/dist/chunks/chunk-2RRW2DFF.js.map +1 -0
- package/dist/chunks/chunk-2SENMECZ.js +383 -0
- package/dist/chunks/chunk-2SENMECZ.js.map +1 -0
- package/dist/chunks/chunk-2YIXNTLW.js +31 -0
- package/dist/chunks/chunk-2YIXNTLW.js.map +1 -0
- package/dist/chunks/chunk-323JSMZF.js +6888 -0
- package/dist/chunks/chunk-323JSMZF.js.map +1 -0
- package/dist/chunks/chunk-334SZRIZ.js +627 -0
- package/dist/chunks/chunk-334SZRIZ.js.map +1 -0
- package/dist/chunks/chunk-42QJNL24.js +383 -0
- package/dist/chunks/chunk-42QJNL24.js.map +1 -0
- package/dist/chunks/chunk-4QHU4ILT.js +627 -0
- package/dist/chunks/chunk-4QHU4ILT.js.map +1 -0
- package/dist/chunks/chunk-5LEN6QDS.js +31 -0
- package/dist/chunks/chunk-5LEN6QDS.js.map +1 -0
- package/dist/chunks/chunk-5QMNVSHC.js +94 -0
- package/dist/chunks/chunk-5QMNVSHC.js.map +1 -0
- package/dist/chunks/chunk-5WS6ZWUN.js +374 -0
- package/dist/chunks/chunk-5WS6ZWUN.js.map +1 -0
- package/dist/chunks/chunk-673CG4KG.js +94 -0
- package/dist/chunks/chunk-673CG4KG.js.map +1 -0
- package/dist/chunks/chunk-6VFH66FM.js +94 -0
- package/dist/chunks/chunk-6VFH66FM.js.map +1 -0
- package/dist/chunks/chunk-6YED6PQC.js +6888 -0
- package/dist/chunks/chunk-6YED6PQC.js.map +1 -0
- package/dist/chunks/chunk-75QW5V24.js +6888 -0
- package/dist/chunks/chunk-75QW5V24.js.map +1 -0
- package/dist/chunks/chunk-A5W753FL.js +92 -0
- package/dist/chunks/chunk-A5W753FL.js.map +1 -0
- package/dist/chunks/chunk-AVDZJOCT.js +400 -0
- package/dist/chunks/chunk-AVDZJOCT.js.map +1 -0
- package/dist/chunks/chunk-BCMG64M3.js +94 -0
- package/dist/chunks/chunk-BCMG64M3.js.map +1 -0
- package/dist/chunks/chunk-CHFTTHPJ.js +383 -0
- package/dist/chunks/chunk-CHFTTHPJ.js.map +1 -0
- package/dist/chunks/chunk-DT72VPM7.js +32 -0
- package/dist/chunks/chunk-DT72VPM7.js.map +1 -0
- package/dist/chunks/chunk-E2WYWXM3.js +6888 -0
- package/dist/chunks/chunk-E2WYWXM3.js.map +1 -0
- package/dist/chunks/chunk-E4XNZM6H.js +383 -0
- package/dist/chunks/chunk-E4XNZM6H.js.map +1 -0
- package/dist/chunks/chunk-ECTDE6XC.js +646 -0
- package/dist/chunks/chunk-ECTDE6XC.js.map +1 -0
- package/dist/chunks/chunk-EN7ICTLG.js +94 -0
- package/dist/chunks/chunk-EN7ICTLG.js.map +1 -0
- package/dist/chunks/chunk-EV2QQBO6.js +94 -0
- package/dist/chunks/chunk-EV2QQBO6.js.map +1 -0
- package/dist/chunks/chunk-FJI6VGC6.js +94 -0
- package/dist/chunks/chunk-FJI6VGC6.js.map +1 -0
- package/dist/chunks/chunk-FKUTUG6E.js +94 -0
- package/dist/chunks/chunk-FKUTUG6E.js.map +1 -0
- package/dist/chunks/chunk-FOAIUAWY.js +627 -0
- package/dist/chunks/chunk-FOAIUAWY.js.map +1 -0
- package/dist/chunks/chunk-GR52YZQB.js +31 -0
- package/dist/chunks/chunk-GR52YZQB.js.map +1 -0
- package/dist/chunks/chunk-GRT2RDCX.js +6888 -0
- package/dist/chunks/chunk-GRT2RDCX.js.map +1 -0
- package/dist/chunks/chunk-GT4B3SMY.js +94 -0
- package/dist/chunks/chunk-GT4B3SMY.js.map +1 -0
- package/dist/chunks/chunk-I6JSNAIT.js +627 -0
- package/dist/chunks/chunk-I6JSNAIT.js.map +1 -0
- package/dist/chunks/chunk-IKNXVVXK.js +32 -0
- package/dist/chunks/chunk-IKNXVVXK.js.map +1 -0
- package/dist/chunks/chunk-KJ5Y7Q3K.js +94 -0
- package/dist/chunks/chunk-KJ5Y7Q3K.js.map +1 -0
- package/dist/chunks/chunk-KNV7LPEA.js +94 -0
- package/dist/chunks/chunk-KNV7LPEA.js.map +1 -0
- package/dist/chunks/chunk-LCYRSF7H.js +6888 -0
- package/dist/chunks/chunk-LCYRSF7H.js.map +1 -0
- package/dist/chunks/chunk-LLVJY74K.js +373 -0
- package/dist/chunks/chunk-LLVJY74K.js.map +1 -0
- package/dist/chunks/chunk-LOCV27GA.js +31 -0
- package/dist/chunks/chunk-LOCV27GA.js.map +1 -0
- package/dist/chunks/chunk-LVPRIPTY.js +94 -0
- package/dist/chunks/chunk-LVPRIPTY.js.map +1 -0
- package/dist/chunks/chunk-MHPLSF7C.js +645 -0
- package/dist/chunks/chunk-MHPLSF7C.js.map +1 -0
- package/dist/chunks/chunk-MWVK6TYO.js +94 -0
- package/dist/chunks/chunk-MWVK6TYO.js.map +1 -0
- package/dist/chunks/chunk-NC7KY56H.js +627 -0
- package/dist/chunks/chunk-NC7KY56H.js.map +1 -0
- package/dist/chunks/chunk-O55K2M54.js +94 -0
- package/dist/chunks/chunk-O55K2M54.js.map +1 -0
- package/dist/chunks/chunk-PEV4JLKR.js +374 -0
- package/dist/chunks/chunk-PEV4JLKR.js.map +1 -0
- package/dist/chunks/chunk-POTLDXHV.js +627 -0
- package/dist/chunks/chunk-POTLDXHV.js.map +1 -0
- package/dist/chunks/chunk-QA5CX4HN.js +94 -0
- package/dist/chunks/chunk-QA5CX4HN.js.map +1 -0
- package/dist/chunks/chunk-QCZ76WFB.js +6888 -0
- package/dist/chunks/chunk-QCZ76WFB.js.map +1 -0
- package/dist/chunks/chunk-QS6VHKJL.js +94 -0
- package/dist/chunks/chunk-QS6VHKJL.js.map +1 -0
- package/dist/chunks/chunk-RVZE4R2K.js +400 -0
- package/dist/chunks/chunk-RVZE4R2K.js.map +1 -0
- package/dist/chunks/chunk-SGUZHURT.js +94 -0
- package/dist/chunks/chunk-SGUZHURT.js.map +1 -0
- package/dist/chunks/chunk-SJYWAAZE.js +31 -0
- package/dist/chunks/chunk-SJYWAAZE.js.map +1 -0
- package/dist/chunks/chunk-STQBRYLA.js +31 -0
- package/dist/chunks/chunk-STQBRYLA.js.map +1 -0
- package/dist/chunks/chunk-TAO7UEFH.js +400 -0
- package/dist/chunks/chunk-TAO7UEFH.js.map +1 -0
- package/dist/chunks/chunk-TC3OIHDQ.js +6888 -0
- package/dist/chunks/chunk-TC3OIHDQ.js.map +1 -0
- package/dist/chunks/chunk-TOJHUALI.js +646 -0
- package/dist/chunks/chunk-TOJHUALI.js.map +1 -0
- package/dist/chunks/chunk-TPAA44Y7.js +31 -0
- package/dist/chunks/chunk-TPAA44Y7.js.map +1 -0
- package/dist/chunks/chunk-TRYCV7IM.js +31 -0
- package/dist/chunks/chunk-TRYCV7IM.js.map +1 -0
- package/dist/chunks/chunk-TVNMKAMJ.js +645 -0
- package/dist/chunks/chunk-TVNMKAMJ.js.map +1 -0
- package/dist/chunks/chunk-U4RFKBRP.js +94 -0
- package/dist/chunks/chunk-U4RFKBRP.js.map +1 -0
- package/dist/chunks/chunk-UGLQ4IE6.js +94 -0
- package/dist/chunks/chunk-UGLQ4IE6.js.map +1 -0
- package/dist/chunks/chunk-UJFRZXCT.js +647 -0
- package/dist/chunks/chunk-UJFRZXCT.js.map +1 -0
- package/dist/chunks/chunk-UMF3ZNLB.js +627 -0
- package/dist/chunks/chunk-UMF3ZNLB.js.map +1 -0
- package/dist/chunks/chunk-UPOAW5KH.js +6888 -0
- package/dist/chunks/chunk-UPOAW5KH.js.map +1 -0
- package/dist/chunks/chunk-UYO3TSPZ.js +373 -0
- package/dist/chunks/chunk-UYO3TSPZ.js.map +1 -0
- package/dist/chunks/chunk-VDCLAPUT.js +627 -0
- package/dist/chunks/chunk-VDCLAPUT.js.map +1 -0
- package/dist/chunks/chunk-WEBEBLJU.js +94 -0
- package/dist/chunks/chunk-WEBEBLJU.js.map +1 -0
- package/dist/chunks/chunk-WWFGVIQF.js +627 -0
- package/dist/chunks/chunk-WWFGVIQF.js.map +1 -0
- package/dist/chunks/chunk-XBCKVU3I.js +94 -0
- package/dist/chunks/chunk-XBCKVU3I.js.map +1 -0
- package/dist/chunks/chunk-XOKC45VV.js +631 -0
- package/dist/chunks/chunk-XOKC45VV.js.map +1 -0
- package/dist/chunks/chunk-YHEITHMB.js +6888 -0
- package/dist/chunks/chunk-YHEITHMB.js.map +1 -0
- package/dist/chunks/chunk-YSGGRW2E.js +6888 -0
- package/dist/chunks/chunk-YSGGRW2E.js.map +1 -0
- package/dist/chunks/chunk-ZLOEM737.js +94 -0
- package/dist/chunks/chunk-ZLOEM737.js.map +1 -0
- package/dist/index.js +7 -7
- package/dist/qti-components/index.js +2 -2
- package/dist/qti-components-jsx.d.ts +8 -10
- package/dist/qti-item/components/item-container.js +2 -2
- package/dist/qti-item/core/index.js +2 -2
- package/dist/qti-loader/index.js +2 -2
- package/dist/qti-test/components/index.js +3 -3
- package/dist/qti-test/components/test-container.js +2 -2
- package/dist/qti-test/components/test-show-correct-response.js +1 -1
- package/dist/qti-test/core/index.js +3 -3
- package/dist/qti-transformers/index.d.ts +3 -14
- package/dist/qti-transformers/index.js +1 -1
- package/dist/vscode.html-custom-data.json +7 -8
- package/package.json +1 -1
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
// src/lib/qti-transformers/qti-transformers.ts
|
|
2
|
+
var xml = String.raw;
|
|
3
|
+
var xmlToHTML = xml`<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
4
|
+
<xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
|
|
5
|
+
<xsl:template match="@*|node()">
|
|
6
|
+
<xsl:copy>
|
|
7
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
8
|
+
</xsl:copy>
|
|
9
|
+
</xsl:template>
|
|
10
|
+
|
|
11
|
+
<!-- remove existing namespaces -->
|
|
12
|
+
<xsl:template match="*">
|
|
13
|
+
<!-- remove element prefix -->
|
|
14
|
+
<xsl:element name="{local-name()}">
|
|
15
|
+
<!-- process attributes -->
|
|
16
|
+
<xsl:for-each select="@*">
|
|
17
|
+
<!-- remove attribute prefix -->
|
|
18
|
+
<xsl:attribute name="{local-name()}">
|
|
19
|
+
<xsl:value-of select="."/>
|
|
20
|
+
</xsl:attribute>
|
|
21
|
+
</xsl:for-each>
|
|
22
|
+
<xsl:apply-templates/>
|
|
23
|
+
</xsl:element>
|
|
24
|
+
</xsl:template>
|
|
25
|
+
</xsl:stylesheet>`;
|
|
26
|
+
function extendElementName(xmlFragment, tagName, extension) {
|
|
27
|
+
xmlFragment.querySelectorAll(tagName).forEach((element) => {
|
|
28
|
+
const newTagName = `${tagName}-${extension}`;
|
|
29
|
+
const newElement = createElementWithNewTagName(element, newTagName);
|
|
30
|
+
element.replaceWith(newElement);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function extendElementsWithClass(xmlFragment, classNamePattern) {
|
|
34
|
+
xmlFragment.querySelectorAll("*").forEach((element) => {
|
|
35
|
+
const classList = element.classList;
|
|
36
|
+
if (classList) {
|
|
37
|
+
classList.forEach((className) => {
|
|
38
|
+
if (className.startsWith(`${classNamePattern}:`)) {
|
|
39
|
+
const suffix = className.slice(`${classNamePattern}:`.length);
|
|
40
|
+
const newTagName = `${element.nodeName}-${suffix}`;
|
|
41
|
+
const newElement = createElementWithNewTagName(element, newTagName);
|
|
42
|
+
element.replaceWith(newElement);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function createElementWithNewTagName(element, newTagName) {
|
|
49
|
+
const newElement = document.createElement(newTagName);
|
|
50
|
+
for (const attr of element.attributes) {
|
|
51
|
+
newElement.setAttribute(attr.name, attr.value);
|
|
52
|
+
}
|
|
53
|
+
while (element.firstChild) {
|
|
54
|
+
newElement.appendChild(element.firstChild);
|
|
55
|
+
}
|
|
56
|
+
return newElement;
|
|
57
|
+
}
|
|
58
|
+
function itemsFromTest(xmlFragment) {
|
|
59
|
+
const items = [];
|
|
60
|
+
xmlFragment.querySelectorAll("qti-assessment-item-ref").forEach((el) => {
|
|
61
|
+
const identifier = el.getAttribute("identifier");
|
|
62
|
+
const href = el.getAttribute("href");
|
|
63
|
+
const category = el.getAttribute("category");
|
|
64
|
+
items.push({ identifier, href, category });
|
|
65
|
+
});
|
|
66
|
+
return items;
|
|
67
|
+
}
|
|
68
|
+
var currentRequest = null;
|
|
69
|
+
function loadXML(url, cancelPreviousRequest = false) {
|
|
70
|
+
if (cancelPreviousRequest && currentRequest !== null) {
|
|
71
|
+
currentRequest.abort();
|
|
72
|
+
}
|
|
73
|
+
return new Promise((resolve, reject) => {
|
|
74
|
+
const xhr = new XMLHttpRequest();
|
|
75
|
+
currentRequest = xhr;
|
|
76
|
+
xhr.open("GET", url, true);
|
|
77
|
+
xhr.responseType = "document";
|
|
78
|
+
xhr.onload = () => {
|
|
79
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
80
|
+
resolve(xhr.responseXML);
|
|
81
|
+
} else {
|
|
82
|
+
reject(xhr.statusText);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
xhr.onerror = () => {
|
|
86
|
+
reject(xhr.statusText);
|
|
87
|
+
};
|
|
88
|
+
xhr.send();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function parseXML(xmlDocument) {
|
|
92
|
+
const parser = new DOMParser();
|
|
93
|
+
const xmlFragment = parser.parseFromString(xmlDocument, "text/xml");
|
|
94
|
+
return xmlFragment;
|
|
95
|
+
}
|
|
96
|
+
function toHTML(xmlFragment) {
|
|
97
|
+
const processor = new XSLTProcessor();
|
|
98
|
+
const xsltDocument = new DOMParser().parseFromString(xmlToHTML, "text/xml");
|
|
99
|
+
processor.importStylesheet(xsltDocument);
|
|
100
|
+
const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);
|
|
101
|
+
return itemHTMLFragment;
|
|
102
|
+
}
|
|
103
|
+
function setLocation(xmlFragment, location) {
|
|
104
|
+
if (!location.endsWith("/")) {
|
|
105
|
+
location += "/";
|
|
106
|
+
}
|
|
107
|
+
xmlFragment.querySelectorAll("[src],[href],[primary-path]").forEach((elWithSrc) => {
|
|
108
|
+
let attr = "";
|
|
109
|
+
if (elWithSrc.getAttribute("src")) {
|
|
110
|
+
attr = "src";
|
|
111
|
+
}
|
|
112
|
+
if (elWithSrc.getAttribute("href")) {
|
|
113
|
+
attr = "href";
|
|
114
|
+
}
|
|
115
|
+
if (elWithSrc.getAttribute("primary-path")) {
|
|
116
|
+
attr = "primary-path";
|
|
117
|
+
}
|
|
118
|
+
const attrValue = elWithSrc.getAttribute(attr)?.trim();
|
|
119
|
+
if (!attrValue.startsWith("data:") && !attrValue.startsWith("http")) {
|
|
120
|
+
const newSrcValue = location + encodeURI(attrValue);
|
|
121
|
+
elWithSrc.setAttribute(attr, newSrcValue);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function convertCDATAtoComment(xmlFragment) {
|
|
126
|
+
const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value');
|
|
127
|
+
cdataElements.forEach((element) => {
|
|
128
|
+
const commentText = document.createComment(element.textContent);
|
|
129
|
+
element.replaceChild(commentText, element.firstChild);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function stripStyleSheets(xmlFragment) {
|
|
133
|
+
xmlFragment.querySelectorAll("qti-stylesheet").forEach((stylesheet) => stylesheet.remove());
|
|
134
|
+
}
|
|
135
|
+
function getShuffleQuerySelectorByTagName(tagName) {
|
|
136
|
+
switch (tagName) {
|
|
137
|
+
case "qti-choice-interaction":
|
|
138
|
+
case "qti-order-interaction":
|
|
139
|
+
return "qti-simple-choice";
|
|
140
|
+
case "qti-inline-choice-interaction":
|
|
141
|
+
return "qti-inline-choice";
|
|
142
|
+
case "qti-match-interaction":
|
|
143
|
+
return [
|
|
144
|
+
"qti-simple-match-set:first-of-type qti-simple-associable-choice",
|
|
145
|
+
"qti-simple-match-set:last-of-type > qti-simple-associable-choice"
|
|
146
|
+
];
|
|
147
|
+
case "qti-gap-match-interaction":
|
|
148
|
+
return "qti-gap-text";
|
|
149
|
+
case "qti-associate-interaction":
|
|
150
|
+
return "qti-simple-associable-choice";
|
|
151
|
+
default:
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// src/lib/qti-transformers/qti-transform-item.ts
|
|
156
|
+
var qtiTransformItem = (cache = false) => {
|
|
157
|
+
let xmlFragment;
|
|
158
|
+
const api = {
|
|
159
|
+
async load(uri, cancelPreviousRequest = false) {
|
|
160
|
+
const fullKey = encodeURI(uri);
|
|
161
|
+
if (cache) {
|
|
162
|
+
if (sessionStorage.getItem(fullKey)) {
|
|
163
|
+
return Promise.resolve(api.parse(sessionStorage.getItem(fullKey)));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return new Promise((resolve) => {
|
|
167
|
+
loadXML(uri, cancelPreviousRequest).then((xml2) => {
|
|
168
|
+
xmlFragment = xml2;
|
|
169
|
+
api.shuffleInteractions().path(uri.substring(0, uri.lastIndexOf("/")));
|
|
170
|
+
if (cache) sessionStorage.setItem(fullKey, new XMLSerializer().serializeToString(xmlFragment));
|
|
171
|
+
return resolve(api);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
parse(xmlString) {
|
|
176
|
+
xmlFragment = parseXML(xmlString);
|
|
177
|
+
return api;
|
|
178
|
+
},
|
|
179
|
+
path: (location) => {
|
|
180
|
+
setLocation(xmlFragment, location);
|
|
181
|
+
return api;
|
|
182
|
+
},
|
|
183
|
+
fn(fn) {
|
|
184
|
+
fn(xmlFragment);
|
|
185
|
+
return api;
|
|
186
|
+
},
|
|
187
|
+
pciHooks(uri) {
|
|
188
|
+
const attributes = ["hook", "module"];
|
|
189
|
+
const documentPath = uri.substring(0, uri.lastIndexOf("/"));
|
|
190
|
+
for (const attribute of attributes) {
|
|
191
|
+
const srcAttributes = xmlFragment.querySelectorAll("[" + attribute + "]");
|
|
192
|
+
srcAttributes.forEach((node) => {
|
|
193
|
+
const srcValue = node.getAttribute(attribute);
|
|
194
|
+
if (!srcValue.startsWith("data:") && !srcValue.startsWith("http")) {
|
|
195
|
+
node.setAttribute("base-url", uri);
|
|
196
|
+
node.setAttribute(
|
|
197
|
+
"module",
|
|
198
|
+
documentPath + "/" + encodeURI(srcValue + (srcValue.endsWith(".js") ? "" : ".js"))
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
return api;
|
|
204
|
+
},
|
|
205
|
+
shuffleInteractions() {
|
|
206
|
+
const shuffleElements = xmlFragment.querySelectorAll(`[shuffle="true"]`);
|
|
207
|
+
const shuffleInteractions = Array.from(shuffleElements).filter(
|
|
208
|
+
(e) => e.tagName?.toLowerCase().endsWith("-interaction")
|
|
209
|
+
);
|
|
210
|
+
for (const shuffleInteraction of shuffleInteractions) {
|
|
211
|
+
const query = getShuffleQuerySelectorByTagName(shuffleInteraction.tagName.toLowerCase());
|
|
212
|
+
const queries = Array.isArray(query) ? query : [query];
|
|
213
|
+
for (const q of queries) {
|
|
214
|
+
const choices = Array.from(shuffleInteraction.querySelectorAll(q));
|
|
215
|
+
const fixedChoices = choices.map((choice, originalOrder2) => ({
|
|
216
|
+
element: choice,
|
|
217
|
+
fixed: choice.hasAttribute("fixed") && choice.getAttribute("fixed") === "true",
|
|
218
|
+
originalOrder: originalOrder2
|
|
219
|
+
})).filter((choice) => choice.fixed);
|
|
220
|
+
const nonFixedChoices = choices.filter(
|
|
221
|
+
(choice) => !choice.hasAttribute("fixed") || choice.getAttribute("fixed") !== "true"
|
|
222
|
+
);
|
|
223
|
+
if (nonFixedChoices.length <= 1) {
|
|
224
|
+
console.warn("Shuffling is not possible with fewer than 2 non-fixed elements.");
|
|
225
|
+
return api;
|
|
226
|
+
}
|
|
227
|
+
const originalOrder = [...nonFixedChoices];
|
|
228
|
+
let shuffled = false;
|
|
229
|
+
let attempts = 0;
|
|
230
|
+
while (!shuffled && attempts < 20) {
|
|
231
|
+
attempts++;
|
|
232
|
+
for (let i = nonFixedChoices.length - 1; i > 0; i--) {
|
|
233
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
234
|
+
[nonFixedChoices[i], nonFixedChoices[j]] = [nonFixedChoices[j], nonFixedChoices[i]];
|
|
235
|
+
}
|
|
236
|
+
shuffled = !nonFixedChoices.every((choice, index) => choice === originalOrder[index]);
|
|
237
|
+
}
|
|
238
|
+
if (!shuffled) {
|
|
239
|
+
console.warn("Failed to shuffle the choices after multiple attempts.");
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
shuffleInteraction.removeAttribute("shuffle");
|
|
243
|
+
let nonFixedIndex = 0;
|
|
244
|
+
for (const nonFixedChoice of nonFixedChoices) {
|
|
245
|
+
nonFixedChoice.parentElement.insertBefore(nonFixedChoice, fixedChoices[nonFixedIndex]?.element);
|
|
246
|
+
nonFixedIndex++;
|
|
247
|
+
}
|
|
248
|
+
for (const fixedChoice of fixedChoices) {
|
|
249
|
+
fixedChoice.element.parentElement.insertBefore(
|
|
250
|
+
fixedChoice.element,
|
|
251
|
+
nonFixedChoices[fixedChoice.originalOrder]
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return api;
|
|
257
|
+
},
|
|
258
|
+
extendElementName: (tagName, extension) => {
|
|
259
|
+
extendElementName(xmlFragment, tagName, extension);
|
|
260
|
+
return api;
|
|
261
|
+
},
|
|
262
|
+
extendElementsWithClass: (param = "extend") => {
|
|
263
|
+
extendElementsWithClass(xmlFragment, param);
|
|
264
|
+
return api;
|
|
265
|
+
},
|
|
266
|
+
customInteraction(baseRef, baseItem) {
|
|
267
|
+
const qtiCustomInteraction = xmlFragment.querySelector("qti-custom-interaction");
|
|
268
|
+
const qtiCustomInteractionObject = qtiCustomInteraction.querySelector("object");
|
|
269
|
+
qtiCustomInteraction.setAttribute("data-base-ref", baseRef);
|
|
270
|
+
qtiCustomInteraction.setAttribute("data-base-item", baseRef + baseItem);
|
|
271
|
+
qtiCustomInteraction.setAttribute("data", qtiCustomInteractionObject.getAttribute("data"));
|
|
272
|
+
qtiCustomInteraction.setAttribute("width", qtiCustomInteractionObject.getAttribute("width"));
|
|
273
|
+
qtiCustomInteraction.setAttribute("height", qtiCustomInteractionObject.getAttribute("height"));
|
|
274
|
+
qtiCustomInteraction.removeChild(qtiCustomInteractionObject);
|
|
275
|
+
return api;
|
|
276
|
+
},
|
|
277
|
+
convertCDATAtoComment() {
|
|
278
|
+
convertCDATAtoComment(xmlFragment);
|
|
279
|
+
return api;
|
|
280
|
+
},
|
|
281
|
+
stripStyleSheets() {
|
|
282
|
+
stripStyleSheets(xmlFragment);
|
|
283
|
+
return api;
|
|
284
|
+
},
|
|
285
|
+
html() {
|
|
286
|
+
return new XMLSerializer().serializeToString(toHTML(xmlFragment));
|
|
287
|
+
},
|
|
288
|
+
xml() {
|
|
289
|
+
return new XMLSerializer().serializeToString(xmlFragment);
|
|
290
|
+
},
|
|
291
|
+
htmlDoc() {
|
|
292
|
+
return toHTML(xmlFragment);
|
|
293
|
+
},
|
|
294
|
+
xmlDoc() {
|
|
295
|
+
return xmlFragment;
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
return api;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// src/lib/qti-transformers/qti-transform-manifest.ts
|
|
302
|
+
var qtiTransformManifest = () => {
|
|
303
|
+
let xmlFragment;
|
|
304
|
+
const api = {
|
|
305
|
+
async load(uri) {
|
|
306
|
+
return new Promise((resolve) => {
|
|
307
|
+
loadXML(uri).then((xml2) => {
|
|
308
|
+
xmlFragment = xml2;
|
|
309
|
+
return resolve(api);
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
},
|
|
313
|
+
parse(xmlString) {
|
|
314
|
+
xmlFragment = parseXML(xmlString);
|
|
315
|
+
},
|
|
316
|
+
assessmentTest() {
|
|
317
|
+
const el = xmlFragment.querySelector('resource[type="imsqti_test_xmlv3p0"]');
|
|
318
|
+
return { href: el.getAttribute("href"), identifier: el.getAttribute("identifier") };
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
return api;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
// src/lib/qti-transformers/qti-transform-test.ts
|
|
325
|
+
var qtiTransformTest = () => {
|
|
326
|
+
let xmlFragment;
|
|
327
|
+
const api = {
|
|
328
|
+
async load(uri) {
|
|
329
|
+
return new Promise((resolve, _) => {
|
|
330
|
+
loadXML(uri).then((xml2) => {
|
|
331
|
+
xmlFragment = xml2;
|
|
332
|
+
api.path(uri.substring(0, uri.lastIndexOf("/")));
|
|
333
|
+
return resolve(api);
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
},
|
|
337
|
+
parse(xmlString) {
|
|
338
|
+
xmlFragment = parseXML(xmlString);
|
|
339
|
+
return api;
|
|
340
|
+
},
|
|
341
|
+
path: (location) => {
|
|
342
|
+
setLocation(xmlFragment, location);
|
|
343
|
+
return api;
|
|
344
|
+
},
|
|
345
|
+
fn(fn) {
|
|
346
|
+
fn(xmlFragment);
|
|
347
|
+
return api;
|
|
348
|
+
},
|
|
349
|
+
items() {
|
|
350
|
+
return itemsFromTest(xmlFragment);
|
|
351
|
+
},
|
|
352
|
+
html() {
|
|
353
|
+
return new XMLSerializer().serializeToString(toHTML(xmlFragment));
|
|
354
|
+
},
|
|
355
|
+
xml() {
|
|
356
|
+
return new XMLSerializer().serializeToString(xmlFragment);
|
|
357
|
+
},
|
|
358
|
+
htmlDoc() {
|
|
359
|
+
return toHTML(xmlFragment);
|
|
360
|
+
},
|
|
361
|
+
xmlDoc() {
|
|
362
|
+
return xmlFragment;
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
return api;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
export {
|
|
369
|
+
qtiTransformItem,
|
|
370
|
+
qtiTransformManifest,
|
|
371
|
+
qtiTransformTest
|
|
372
|
+
};
|
|
373
|
+
//# sourceMappingURL=chunk-UYO3TSPZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-transformers/qti-transformers.ts","../../src/lib/qti-transformers/qti-transform-item.ts","../../src/lib/qti-transformers/qti-transform-manifest.ts","../../src/lib/qti-transformers/qti-transform-test.ts"],"sourcesContent":["const xml = String.raw;\n\n/* <!-- convert CDATA to comments -->\n <xsl:template match=\"text()[contains(., 'CDATA')]\">\n <xsl:comment>\n <xsl:value-of select=\".\"/>\n </xsl:comment>\n</xsl:template>\n*/\n\n/*\n <!-- remove xml comments -->\n <xsl:template match=\"comment()\" />\n */\n\nconst xmlToHTML = xml`<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n<xsl:output method=\"html\" version=\"5.0\" encoding=\"UTF-8\" indent=\"yes\" />\n <xsl:template match=\"@*|node()\">\n <xsl:copy>\n <xsl:apply-templates select=\"@*|node()\"/>\n </xsl:copy>\n </xsl:template>\n\n <!-- remove existing namespaces -->\n <xsl:template match=\"*\">\n <!-- remove element prefix -->\n <xsl:element name=\"{local-name()}\">\n <!-- process attributes -->\n <xsl:for-each select=\"@*\">\n <!-- remove attribute prefix -->\n <xsl:attribute name=\"{local-name()}\">\n <xsl:value-of select=\".\"/>\n </xsl:attribute>\n </xsl:for-each>\n <xsl:apply-templates/>\n </xsl:element>\n</xsl:template>\n</xsl:stylesheet>`;\n\n// Function to extend elements with a specific tag name by adding an extension suffix\nexport function extendElementName(xmlFragment: XMLDocument, tagName: string, extension: string) {\n xmlFragment.querySelectorAll(tagName).forEach(element => {\n const newTagName = `${tagName}-${extension}`;\n const newElement = createElementWithNewTagName(element, newTagName);\n element.replaceWith(newElement);\n });\n}\n\n// Function to extend any element with a specific class pattern (e.g., \"extend:suffix\")\nexport function extendElementsWithClass(xmlFragment: XMLDocument, classNamePattern: string) {\n xmlFragment.querySelectorAll('*').forEach(element => {\n const classList = element.classList;\n if (classList) {\n classList.forEach(className => {\n if (className.startsWith(`${classNamePattern}:`)) {\n const suffix = className.slice(`${classNamePattern}:`.length);\n const newTagName = `${element.nodeName}-${suffix}`;\n const newElement = createElementWithNewTagName(element, newTagName);\n element.replaceWith(newElement);\n }\n });\n }\n });\n}\n\n// Helper function to create a new element with a new tag name and copy attributes and children\nfunction createElementWithNewTagName(element, newTagName) {\n const newElement = document.createElement(newTagName);\n // Copy attributes\n for (const attr of element.attributes) {\n newElement.setAttribute(attr.name, attr.value);\n }\n // Copy child nodes\n while (element.firstChild) {\n newElement.appendChild(element.firstChild);\n }\n return newElement;\n}\n\nexport function itemsFromTest(xmlFragment: DocumentFragment) {\n const items: { identifier: string; href: string; category: string }[] = [];\n xmlFragment.querySelectorAll('qti-assessment-item-ref').forEach(el => {\n const identifier = el.getAttribute('identifier');\n const href = el.getAttribute('href');\n const category = el.getAttribute('category');\n items.push({ identifier, href, category });\n });\n return items;\n}\n\nlet currentRequest: XMLHttpRequest | null = null;\n\nexport function loadXML(url, cancelPreviousRequest = false) {\n // console.trace('loadXML', url);\n if (cancelPreviousRequest && currentRequest !== null) {\n currentRequest.abort(); // Abort the ongoing request if there is one\n }\n\n return new Promise<XMLDocument | null>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n currentRequest = xhr; // Store the current request\n xhr.open('GET', url, true);\n xhr.responseType = 'document';\n\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(xhr.responseXML);\n } else {\n reject(xhr.statusText);\n }\n };\n\n xhr.onerror = () => {\n reject(xhr.statusText);\n };\n\n xhr.send();\n });\n}\n\nexport function parseXML(xmlDocument: string) {\n const parser = new DOMParser();\n const xmlFragment = parser.parseFromString(xmlDocument, 'text/xml');\n return xmlFragment;\n}\n\nexport function toHTML(xmlFragment: Document): DocumentFragment {\n const processor = new XSLTProcessor();\n const xsltDocument = new DOMParser().parseFromString(xmlToHTML, 'text/xml');\n processor.importStylesheet(xsltDocument);\n const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);\n return itemHTMLFragment;\n}\n\nexport function setLocation(xmlFragment: DocumentFragment, location: string) {\n if (!location.endsWith('/')) {\n location += '/';\n }\n\n xmlFragment.querySelectorAll('[src],[href],[primary-path]').forEach(elWithSrc => {\n let attr: 'src' | 'href' | 'primary-path' | '' = '';\n\n if (elWithSrc.getAttribute('src')) {\n attr = 'src';\n }\n if (elWithSrc.getAttribute('href')) {\n attr = 'href';\n }\n if (elWithSrc.getAttribute('primary-path')) {\n attr = 'primary-path';\n }\n const attrValue = elWithSrc.getAttribute(attr)?.trim();\n\n if (!attrValue.startsWith('data:') && !attrValue.startsWith('http')) {\n const newSrcValue = location + encodeURI(attrValue);\n elWithSrc.setAttribute(attr, newSrcValue);\n }\n });\n}\n\nexport function convertCDATAtoComment(xmlFragment: DocumentFragment) {\n const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class=\"js.org\"] > qti-base-value');\n cdataElements.forEach(element => {\n const commentText = document.createComment(element.textContent);\n element.replaceChild(commentText, element.firstChild);\n });\n}\n\nexport function stripStyleSheets(xmlFragment: DocumentFragment) {\n // remove qti-stylesheet tag\n xmlFragment.querySelectorAll('qti-stylesheet').forEach(stylesheet => stylesheet.remove());\n}\n\nexport function getShuffleQuerySelectorByTagName(tagName: string) {\n switch (tagName) {\n case 'qti-choice-interaction':\n case 'qti-order-interaction':\n return 'qti-simple-choice';\n case 'qti-inline-choice-interaction':\n return 'qti-inline-choice';\n case 'qti-match-interaction':\n return [\n 'qti-simple-match-set:first-of-type qti-simple-associable-choice',\n 'qti-simple-match-set:last-of-type > qti-simple-associable-choice'\n ];\n case 'qti-gap-match-interaction':\n return 'qti-gap-text';\n case 'qti-associate-interaction':\n return 'qti-simple-associable-choice';\n default:\n }\n}\n","/**\n * Browser based QTI-XML to HTML transformer.\n * Returns an object with methods to load, parse, transform and serialize QTI XML items.\n * @returns An object with methods to load, parse, transform and serialize QTI XML items.\n * @example\n * const qtiTransformer = qtiTransformItem();\n * await qtiTransformer.load('path/to/xml/file.xml');\n * qtiTransformer.path('/assessmentItem/itemBody');\n * const html = qtiTransformer.html();\n * const xml = qtiTransformer.xml();\n * const htmldoc = qtiTransformer.htmldoc();\n * const xmldoc = qtiTransformer.xmldoc();\n *\n * qtiTransformItem().parse(storyXML).html()\n */\nimport {\n convertCDATAtoComment,\n extendElementName,\n extendElementsWithClass,\n getShuffleQuerySelectorByTagName,\n loadXML,\n parseXML,\n setLocation,\n stripStyleSheets,\n toHTML\n} from './qti-transformers';\n\nexport type transformItemApi = {\n load: (uri: string, cancelPreviousRequest?: boolean) => Promise<transformItemApi>;\n parse: (xmlString: string) => transformItemApi;\n path: (location: string) => transformItemApi;\n fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;\n pciHooks: (uri: string) => transformItemApi;\n extendElementName: (elementName: string, extend: string) => transformItemApi;\n extendElementsWithClass: (param?: string) => transformItemApi;\n customInteraction: (baseRef: string, baseItem: string) => transformItemApi;\n convertCDATAtoComment: () => transformItemApi;\n shuffleInteractions: () => transformItemApi;\n stripStyleSheets: () => transformItemApi;\n html: () => string;\n xml: () => string;\n htmlDoc: () => DocumentFragment;\n xmlDoc: () => XMLDocument;\n};\n\nexport const qtiTransformItem = (cache: boolean = false) => {\n let xmlFragment: XMLDocument;\n\n const api: transformItemApi = {\n async load(uri: string, cancelPreviousRequest = false): Promise<typeof api> {\n const fullKey = encodeURI(uri);\n if (cache) {\n if (sessionStorage.getItem(fullKey)) {\n return Promise.resolve(api.parse(sessionStorage.getItem(fullKey)!));\n }\n }\n return new Promise<typeof api>(resolve => {\n loadXML(uri, cancelPreviousRequest).then(xml => {\n xmlFragment = xml;\n api.shuffleInteractions().path(uri.substring(0, uri.lastIndexOf('/')));\n if (cache) sessionStorage.setItem(fullKey, new XMLSerializer().serializeToString(xmlFragment));\n return resolve(api);\n });\n });\n },\n parse(xmlString: string): typeof api {\n xmlFragment = parseXML(xmlString);\n return api;\n },\n path: (location: string): typeof api => {\n setLocation(xmlFragment, location);\n return api;\n },\n fn(fn: (xmlFragment: XMLDocument) => void): typeof api {\n fn(xmlFragment);\n return api;\n },\n pciHooks(uri: string): typeof api {\n const attributes = ['hook', 'module'];\n const documentPath = uri.substring(0, uri.lastIndexOf('/'));\n for (const attribute of attributes) {\n const srcAttributes = xmlFragment.querySelectorAll('[' + attribute + ']');\n srcAttributes.forEach(node => {\n const srcValue = node.getAttribute(attribute)!;\n if (!srcValue.startsWith('data:') && !srcValue.startsWith('http')) {\n // Just paste the relative path of the src location after the documentrootPath\n // old pcis can have a .js, new pci's don't\n node.setAttribute('base-url', uri);\n node.setAttribute(\n 'module',\n documentPath + '/' + encodeURI(srcValue + (srcValue.endsWith('.js') ? '' : '.js'))\n );\n }\n });\n }\n return api;\n },\n shuffleInteractions(): typeof api {\n const shuffleElements = xmlFragment.querySelectorAll(`[shuffle=\"true\"]`);\n const shuffleInteractions = Array.from(shuffleElements).filter(e =>\n e.tagName?.toLowerCase().endsWith('-interaction')\n );\n\n for (const shuffleInteraction of shuffleInteractions) {\n const query = getShuffleQuerySelectorByTagName(shuffleInteraction.tagName.toLowerCase());\n const queries = Array.isArray(query) ? query : [query];\n\n for (const q of queries) {\n const choices = Array.from(shuffleInteraction.querySelectorAll(q)) as HTMLElement[];\n // const originalOrderIdentifiers = choices.map(choice => choice.getAttribute('identifier') || '');\n // const interactionId = (shuffelResults.length + 1).toString();\n\n // Normal shuffle logic if predefined order is not present\n const fixedChoices = choices\n .map((choice, originalOrder) => ({\n element: choice,\n fixed: choice.hasAttribute('fixed') && choice.getAttribute('fixed') === 'true',\n originalOrder\n }))\n .filter(choice => choice.fixed);\n\n const nonFixedChoices = choices.filter(\n choice => !choice.hasAttribute('fixed') || choice.getAttribute('fixed') !== 'true'\n );\n\n if (nonFixedChoices.length <= 1) {\n console.warn('Shuffling is not possible with fewer than 2 non-fixed elements.');\n return api;\n }\n\n const originalOrder = [...nonFixedChoices];\n let shuffled = false;\n let attempts = 0;\n\n while (!shuffled && attempts < 20) {\n attempts++;\n for (let i = nonFixedChoices.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [nonFixedChoices[i], nonFixedChoices[j]] = [nonFixedChoices[j], nonFixedChoices[i]];\n }\n shuffled = !nonFixedChoices.every((choice, index) => choice === originalOrder[index]);\n }\n\n if (!shuffled) {\n console.warn('Failed to shuffle the choices after multiple attempts.');\n return null;\n }\n\n // Remove the shuffle attribute\n shuffleInteraction.removeAttribute('shuffle');\n\n // Reorder the elements in the DOM\n let nonFixedIndex = 0;\n for (const nonFixedChoice of nonFixedChoices) {\n nonFixedChoice.parentElement.insertBefore(nonFixedChoice, fixedChoices[nonFixedIndex]?.element);\n nonFixedIndex++;\n }\n for (const fixedChoice of fixedChoices) {\n fixedChoice.element.parentElement.insertBefore(\n fixedChoice.element,\n nonFixedChoices[fixedChoice.originalOrder]\n );\n }\n\n // Extract shuffled order identifiers\n // const shuffledOrderIdentifiers = Array.from(shuffleInteraction.querySelectorAll(q)).map(\n // choice => choice.getAttribute('identifier') || ''\n // );\n\n // shuffelResults.push({\n // interactionId,\n // ids: { original: originalOrderIdentifiers, shuffled: shuffledOrderIdentifiers }\n // });\n }\n }\n\n return api;\n },\n extendElementName: (tagName: string, extension: string): typeof api => {\n extendElementName(xmlFragment, tagName, extension);\n return api;\n },\n extendElementsWithClass: (param: string = 'extend'): typeof api => {\n extendElementsWithClass(xmlFragment, param);\n return api;\n },\n customInteraction(baseRef: string, baseItem: string): typeof api {\n const qtiCustomInteraction = xmlFragment.querySelector('qti-custom-interaction');\n const qtiCustomInteractionObject = qtiCustomInteraction.querySelector('object');\n\n qtiCustomInteraction.setAttribute('data-base-ref', baseRef);\n qtiCustomInteraction.setAttribute('data-base-item', baseRef + baseItem);\n qtiCustomInteraction.setAttribute('data', qtiCustomInteractionObject.getAttribute('data'));\n qtiCustomInteraction.setAttribute('width', qtiCustomInteractionObject.getAttribute('width'));\n qtiCustomInteraction.setAttribute('height', qtiCustomInteractionObject.getAttribute('height'));\n\n qtiCustomInteraction.removeChild(qtiCustomInteractionObject);\n return api;\n },\n convertCDATAtoComment(): typeof api {\n convertCDATAtoComment(xmlFragment);\n return api;\n },\n stripStyleSheets(): typeof api {\n stripStyleSheets(xmlFragment);\n return api;\n },\n html() {\n return new XMLSerializer().serializeToString(toHTML(xmlFragment));\n },\n xml(): string {\n return new XMLSerializer().serializeToString(xmlFragment);\n },\n htmlDoc() {\n return toHTML(xmlFragment);\n },\n xmlDoc(): XMLDocument {\n return xmlFragment; // new XMLSerializer().serializeToString(xmlFragment);\n }\n };\n return api;\n};\n","import { loadXML, parseXML } from './qti-transformers';\n\nexport const qtiTransformManifest = (): {\n load: (uri: string) => Promise<typeof api>;\n assessmentTest: () => { href: string; identifier: string };\n} => {\n let xmlFragment: XMLDocument;\n\n const api = {\n async load(uri) {\n return new Promise<typeof api>(resolve => {\n loadXML(uri).then(xml => {\n xmlFragment = xml;\n return resolve(api);\n });\n });\n },\n parse(xmlString: string) {\n xmlFragment = parseXML(xmlString);\n },\n assessmentTest() {\n const el = xmlFragment.querySelector('resource[type=\"imsqti_test_xmlv3p0\"]');\n return { href: el.getAttribute('href'), identifier: el.getAttribute('identifier') };\n }\n };\n return api;\n};\n","/**\n * Returns an object with methods to load, parse and transform QTI tests.\n * @returns An object with methods to load, parse and transform QTI tests.\n * @example\n * const qtiTransformer = qtiTransformTest();\n * await qtiTransformer.load('https://example.com/test.xml');\n * const items = qtiTransformer.items();\n * const html = qtiTransformer.html();\n * const xml = qtiTransformer.xml();\n */\n\nimport { itemsFromTest, loadXML, parseXML, setLocation, toHTML } from './qti-transformers';\n\nexport type transformTestApi = {\n load: (uri: string) => Promise<transformTestApi>;\n parse: (xmlString: string) => transformTestApi;\n path: (location: string) => transformTestApi;\n fn: (fn: (xmlFragment: XMLDocument) => void) => transformTestApi;\n items: () => { identifier: string; href: string; category: string }[];\n html: () => string;\n xml: () => string;\n htmlDoc: () => DocumentFragment;\n xmlDoc: () => XMLDocument;\n};\n\nexport const qtiTransformTest = (): transformTestApi => {\n let xmlFragment: XMLDocument;\n\n const api: transformTestApi = {\n async load(uri) {\n return new Promise<transformTestApi>((resolve, _) => {\n loadXML(uri).then(xml => {\n xmlFragment = xml;\n\n api.path(uri.substring(0, uri.lastIndexOf('/')));\n return resolve(api);\n });\n });\n },\n parse(xmlString: string) {\n xmlFragment = parseXML(xmlString);\n return api;\n },\n path: (location: string): typeof api => {\n setLocation(xmlFragment, location);\n return api;\n },\n fn(fn: (xmlFragment: XMLDocument) => void) {\n fn(xmlFragment);\n return api;\n },\n items() {\n return itemsFromTest(xmlFragment);\n },\n html() {\n return new XMLSerializer().serializeToString(toHTML(xmlFragment));\n },\n xml(): string {\n return new XMLSerializer().serializeToString(xmlFragment);\n },\n htmlDoc() {\n return toHTML(xmlFragment);\n },\n xmlDoc(): XMLDocument {\n return xmlFragment;\n }\n };\n return api;\n};\n"],"mappings":";AAAA,IAAM,MAAM,OAAO;AAenB,IAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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