# HG changeset patch # User Nicholas Jillings # Date 1448269992 0 # Node ID 20325b53f543e043b3d1978feea7020f214399c3 # Parent d8fd1699f6de4fd3ec898a554ee6193644546ed9# Parent e40eb1c67933a1f286a093009b4cabe0826216e7 Merge from branch "WAC2016" diff -r e40eb1c67933 -r 20325b53f543 ape.css --- a/ape.css Fri Nov 20 15:39:01 2015 +0000 +++ b/ape.css Mon Nov 23 09:13:12 2015 +0000 @@ -21,18 +21,6 @@ font-size: 1.5em; } -div.testHalt { - /* Specify any colouring during the test halt for pre/post questions */ - background-color: rgba(0,0,0,0.5); - /* Don't mess with this bit */ - z-index: 2; - width: 100%; - height: 100%; - position: absolute; - left: 0px; - top: 0px; -} - button { /* Specify any button structure or style */ min-width: 20px; diff -r e40eb1c67933 -r 20325b53f543 core.css --- a/core.css Fri Nov 20 15:39:01 2015 +0000 +++ b/core.css Mon Nov 23 09:13:12 2015 +0000 @@ -58,6 +58,18 @@ background-color: #fff; } +div.testHalt { + /* Specify any colouring during the test halt for pre/post questions */ + background-color: rgba(0,0,0,0.5); + /* Don't mess with this bit */ + z-index: 2; + width: 100%; + height: 100%; + position: absolute; + left: 0px; + top: 0px; +} + textarea.trackComment { max-width: 594px; min-width: 350px; diff -r e40eb1c67933 -r 20325b53f543 core.js --- a/core.js Fri Nov 20 15:39:01 2015 +0000 +++ b/core.js Mon Nov 23 09:13:12 2015 +0000 @@ -1318,14 +1318,14 @@ function Specification() { // Handles the decoding of the project specification XML into a simple JavaScript Object. - this.interfaceType; - this.commonInterface; - this.projectReturn; - this.randomiseOrder; - this.collectMetrics; - this.testPages; - this.preTest; - this.postTest; + this.interfaceType = null; + this.commonInterface = null; + this.projectReturn = null; + this.randomiseOrder = null; + this.collectMetrics = null; + this.testPages = null; + this.preTest = null; + this.postTest = null; this.metrics =[]; this.audioHolders = []; @@ -1395,10 +1395,7 @@ } } } else if (this.type == 'anchor' || this.type == 'reference') { - this.value = Number(child.textContent); - this.enforce = child.getAttribute('enforce'); - if (this.enforce == 'true') {this.enforce = true;} - else {this.enforce = false;} + Console.log("WARNING: Anchor and Reference tags in the node are depricated"); } }; this.options = []; @@ -1543,24 +1540,32 @@ if (this.type == 'reference') {this.reference = true;} else {this.reference = false;} - this.marker = xml.getAttribute('marker'); - if (this.marker == null) {this.marker = undefined;} - - if (this.anchor == true) { - if (this.marker != undefined) {this.enforce = true;} - else {this.enforce = enforceAnchor;} - this.marker = anchor; + if (this.anchor == true || this.reference == true) + { + this.marker = xml.getAttribute('marker'); + if (this.marker != undefined) + { + this.marker = Number(this.marker); + if (isNaN(this.marker) == false) + { + if (this.marker > 1) + { this.marker /= 100.0;} + if (this.marker >= 0 && this.marker <= 1) + { + this.enforce = true; + return; + } else { + console.log("ERROR - Marker of audioElement "+this.id+" is not between 0 and 1 (float) or 0 and 100 (integer)!"); + console.log("ERROR - Marker not enforced!"); + } + } else { + console.log("ERROR - Marker of audioElement "+this.id+" is not a number!"); + console.log("ERROR - Marker not enforced!"); + } + } } - else if (this.reference == true) { - if (this.marker != undefined) {this.enforce = true;} - else {this.enforce = enforceReference;} - this.marker = reference; - } - - if (this.marker != undefined) { - this.marker = Number(this.marker); - if (this.marker > 1) {this.marker /= 100;} - } + this.marker = false; + this.enforce = false; }; this.commentQuestionNode = function(xml) { @@ -1616,50 +1621,6 @@ if (xml.getAttribute('elementComments') == "true") {this.elementComments = true;} else {this.elementComments = false;} - var anchor = xml.getElementsByTagName('anchor'); - var enforceAnchor = false; - if (anchor.length == 0) { - // Find anchor in commonInterface; - for (var i=0; i 1 && anchor < 100) {anchor /= 100.0;} - } - - if (typeof(reference) == 'number') { - if (reference > 1 && reference < 100) {reference /= 100.0;} - } - this.preTest = new parent.prepostNode('pretest',xml.getElementsByTagName('PreTest')); this.postTest = new parent.prepostNode('posttest',xml.getElementsByTagName('PostTest')); @@ -1697,36 +1658,6 @@ this.audioElements = randomiseOrder(this.audioElements); } - // Check only one anchor and one reference per audioNode - var anchor = []; - var reference = []; - this.anchorId = null; - this.referenceId = null; - for (var i=0; i 1) { - console.log('Error - cannot have more than one anchor!'); - console.log('Each anchor node will be a normal mode to continue the test'); - for (var i=0; i 1) { - console.log('Error - cannot have more than one anchor!'); - console.log('Each anchor node will be a normal mode to continue the test'); - for (var i=0; i diff -r e40eb1c67933 -r 20325b53f543 test_create/test_create.html --- a/test_create/test_create.html Fri Nov 20 15:39:01 2015 +0000 +++ b/test_create/test_create.html Mon Nov 23 09:13:12 2015 +0000 @@ -7,791 +7,2299 @@ Remove this if you use the .htaccess --> - WAET Create Test - - + WAET: Test Creator + - -

Create Test Setup XML

-
- Drag and Drop an XML specification file here to auto-load. -
- - - -
- -
-
-

Setup Tag

-
- Interface - - Project Return - - Randomise Test Page Order - - Collect Session Metrics - -
-
-

Pre Test

- - -
-
-

Post Test

- - -
-
-

Global Metrics

-
- Test Timer - - Element Playback Timer - - Element Initial Position - - Element Tracker - - Element Listen Tracker - - Element Flag Listened To - - Element Flag Moved - -
-
- -
-
-
+
diff -r e40eb1c67933 -r 20325b53f543 test_create/test_create_advanced.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test_create/test_create_advanced.html Mon Nov 23 09:13:12 2015 +0000 @@ -0,0 +1,793 @@ + + + + + + + + + test_create_2 + + + + + + + + + + + +

Create Test Setup XML

+
+ Drag and Drop an XML specification file here to auto-load. +
+ + +
+
+
+

Setup Node

+
+
+ Interface: + +
+
+ Project Return: + +
+
+ Randomise Page Order: + +
+
+ Collect Metrics: + +
+
+
+

Pre Test

+ + + + +
+
+

Post Test

+ + + + +
+
+

Metrics

+ +
+
+

Interface

+ + +
+
+ +
+ +