Mercurial > hg > webaudioevaluationtool
changeset 2604:8188efa9415d
Merge branch 'vnext' into Dev_main
# Conflicts:
# css/core.css
# interfaces/ape.js
# js/specification.js
# tests/examples/APE_example.xml
# tests/examples/mushra_example.xml
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 14 Nov 2016 14:49:57 +0000 |
parents | 2577d983f291 (current diff) 1c8aac0ee5e9 (diff) |
children | ac9b08b961c0 |
files | css/core.css interfaces/ape.js js/core.js js/specification.js tests/examples/AB_example.xml tests/examples/APE_example.xml tests/examples/mushra_example.xml xml/test-schema.xsd |
diffstat | 4 files changed, 91 insertions(+), 71 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/ape.js Mon Nov 14 14:23:41 2016 +0000 +++ b/interfaces/ape.js Mon Nov 14 14:49:57 2016 +0000 @@ -277,7 +277,6 @@ if (audioHolderObject.label == "default" || audioHolderObject.label == "") { audioHolderObject.label = "number"; } - // Set the page title if (typeof audioHolderObject.title == "string" && audioHolderObject.title.length > 0) { document.getElementById("test-title").textContent = audioHolderObject.title
--- a/js/core.js Mon Nov 14 14:23:41 2016 +0000 +++ b/js/core.js Mon Nov 14 14:49:57 2016 +0000 @@ -3199,6 +3199,22 @@ this.storeErrorNode(str); return false; }; + this.checkAllCommented = function () { + var str = "You have not commented on all the fragments."; + var cont = true, + boxes = this.commentBoxes.boxes, + numBoxes = boxes.length, + i; + for (i = 0; i < numBoxes; i++) { + if (boxes[i].trackCommentBox.value === "") { + interfaceContext.lightbox.post("Error", str); + console.log(str); + this.storeErrorNode(str); + return false; + } + } + return true; + } this.checkScaleRange = function (min, max) { var page = testState.getCurrentTestPage(); var audioObjects = audioEngineContext.audioObjects;
--- a/python/comment_parser.html Mon Nov 14 14:23:41 2016 +0000 +++ b/python/comment_parser.html Mon Nov 14 14:49:57 2016 +0000 @@ -1,72 +1,78 @@ <html lang="en"> - <head> - <meta charset="utf-8" /> - <script type="text/javascript"> - function getXML() - { - var XMLHttp = new XMLHttpRequest(); - XMLHttp.open("GET","comment_parser.php?format=XML",true); - XMLHttp.onload = function() { - // Now we have the XML data, extract - var parse = new DOMParser(); - var ajax = parse.parseFromString(XMLHttp.response,'text/xml'); - - var parent = document.createElement("div"); - parent.appendChild(ajax.children[0]); - var file = [parent.innerHTML]; - var bb = new Blob(file,{type : 'application/xml'}); - generateLink(bb,".xml"); - } - XMLHttp.send(); + +<head> + <meta charset="utf-8" /> + <script type="text/javascript"> + function getXML() { + var XMLHttp = new XMLHttpRequest(); + XMLHttp.open("GET", "comment_parser.php?format=XML", true); + XMLHttp.onload = function() { + // Now we have the XML data, extract + var parse = new DOMParser(); + var ajax = parse.parseFromString(XMLHttp.response, 'text/xml'); + + var parent = document.createElement("div"); + parent.appendChild(ajax.children[0]); + var file = [parent.innerHTML]; + var bb = new Blob(file, { + type: 'application/xml' + }); + generateLink(bb, ".xml"); } - - function getJSON() - { - var XMLHttp = new XMLHttpRequest(); - XMLHttp.open("GET","comment_parser.php?format=JSON",true); - XMLHttp.onload = function() { - // Now we have the XML data, extract - var file = [XMLHttp.response]; - var bb = new Blob(file,{type : 'application/json'}); - generateLink(bb,".json"); - } - XMLHttp.send(); + XMLHttp.send(); + } + + function getJSON() { + var XMLHttp = new XMLHttpRequest(); + XMLHttp.open("GET", "comment_parser.php?format=JSON", true); + XMLHttp.onload = function() { + // Now we have the XML data, extract + var file = [XMLHttp.response]; + var bb = new Blob(file, { + type: 'application/json' + }); + generateLink(bb, ".json"); } - - function getCSV() - { - var XMLHttp = new XMLHttpRequest(); - XMLHttp.open("GET","comment_parser.php?format=CSV",true); - XMLHttp.onload = function() { - // Now we have the XML data, extract - var file = [XMLHttp.response]; - var bb = new Blob(file,{type : 'text/csv'}); - generateLink(bb,".csv"); - } - XMLHttp.send(); + XMLHttp.send(); + } + + function getCSV() { + var XMLHttp = new XMLHttpRequest(); + XMLHttp.open("GET", "comment_parser.php?format=CSV", true); + XMLHttp.onload = function() { + // Now we have the XML data, extract + var file = [XMLHttp.response]; + var bb = new Blob(file, { + type: 'text/csv' + }); + generateLink(bb, ".csv"); } - - function generateLink(blobfile,fmt) - { - var dnlk = window.URL.createObjectURL(blobfile); - var a = document.createElement("a"); - a.hidden = ''; - a.href = dnlk; - a.download = "save"+fmt; - a.textContent = "Save File"; - document.getElementById("download").appendChild(a); - } - </script> - </head> - <body> - <h1>WAET Test Results Analysis</h1> - <h2>Comment Extraction</h2> - <p>All of the XMLs in the server 'saves/' directory are automatically parsed and downloaded, extracting only the comments. Simply select the comments you wish to extract below and your desired data format.</p> - <div id="download"></div> - <div> - <button onclick="getXML();">XML</button> - <button onclick="getJSON();">JSON</button> - <button onclick="getCSV();">CSV</button> - </div> - </body> -</html> \ No newline at end of file + XMLHttp.send(); + } + + function generateLink(blobfile, fmt) { + var dnlk = window.URL.createObjectURL(blobfile); + var a = document.createElement("a"); + a.hidden = ''; + a.href = dnlk; + a.download = "save" + fmt; + a.textContent = "Save File"; + document.getElementById("download").appendChild(a); + } + + </script> +</head> + +<body> + <h1>WAET Test Results Analysis</h1> + <h2>Comment Extraction</h2> + <p>All of the XMLs in the server 'saves/' directory are automatically parsed and downloaded, extracting only the comments. Simply select the comments you wish to extract below and your desired data format.</p> + <div id="download"></div> + <div> + <button onclick="getXML();">XML</button> + <button onclick="getJSON();">JSON</button> + <button onclick="getCSV();">CSV</button> + </div> +</body> + +</html>
--- a/xml/test-schema.xsd Mon Nov 14 14:23:41 2016 +0000 +++ b/xml/test-schema.xsd Mon Nov 14 14:49:57 2016 +0000 @@ -96,7 +96,6 @@ </xs:restriction> </xs:simpleType> </xs:attribute> - <xs:attribute name="labelStart" use="optional" type="xs:string" default="" /> <xs:attribute ref="poolSize" /> <xs:attribute ref="alwaysInclude" /> <xs:attribute ref="preSilence" /> @@ -471,7 +470,7 @@ </xs:restriction> </xs:simpleType> </xs:attribute> - <xs:attribute name="url" type="xs:string" use="optional" default="" /> + <xs:attribute name="url" type="xs:string" use="optional" /> </xs:complexType> </xs:element> <xs:element name="surveyquestion" maxOccurs="unbounded" />