# HG changeset patch # User Nicholas Jillings # Date 1454323134 0 # Node ID c0022a09c4f6632bb10ea1b81591ba7cc02e94b9 # Parent f7da0ea7a4c158407f0623d33843ce2a39ac378d# Parent 0e28f934820564da058cb3ca572291090745b7da Merge diff -r f7da0ea7a4c1 -r c0022a09c4f6 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()