# HG changeset patch # User Nicholas Jillings # Date 1454323134 0 # Node ID 841de347591e3c06f2c55c7d18d1c42668f393b6 # Parent 47ab6c962962947c9a43e770fd95769da8ef094a# Parent da8b22838465622ff7e15f0d8e3bd46c629bb4eb Merge diff -r da8b22838465 -r 841de347591e core.js --- a/core.js Fri Jan 29 11:39:29 2016 +0000 +++ b/core.js Mon Feb 01 10:38:54 2016 +0000 @@ -2757,7 +2757,7 @@ // Update the playhead position, startPlay must be called if (this.timePerPixel > 0) { var time = this.playbackObject.getCurrentPosition(); - if (time > 0) { + if (time > 0 && time < this.maxTime) { var width = 490; var pix = Math.floor(time/this.timePerPixel); this.scrubberHead.style.left = pix+'px'; @@ -2873,6 +2873,7 @@ // Anchor is not set below console.log('Anchor node not below marker value'); alert('Please keep listening'); + this.storeErrorNode('Anchor node not below marker value'); return false; } } @@ -2888,7 +2889,8 @@ { if (ao.interfaceDOM.getValue() < (ao.specification.marker/100) && ao.specification.marker > 0) { // Anchor is not set below - console.log('Reference node not below marker value'); + console.log('Reference node not above marker value'); + this.storeErrorNode('Reference node not above marker value'); alert('Please keep listening'); return false; } @@ -2946,6 +2948,7 @@ } str_start += ". Please keep listening"; console.log("[ALERT]: "+str_start); + this.storeErrorNode("[ALERT]: "+str_start); alert(str_start); } }; @@ -2977,6 +2980,7 @@ str +='.'; alert(str); console.log(str); + this.storeErrorNode(str); return false; }; this.checkAllPlayed = function() @@ -3007,8 +3011,18 @@ str +='.'; alert(str); console.log(str); + this.storeErrorNode(str); return false; }; + + this.storeErrorNode = function(errorMessage) + { + var time = audioEngineContext.timer.getTestTime(); + var node = storage.document.createElement('error'); + node.setAttribute('time',time); + node.textContent = errorMessage; + testState.currentStore.XMLDOM.appendChild(node); + }; } function Storage()