# HG changeset patch # User Nicholas Jillings # Date 1454410981 0 # Node ID ee23bf531ec4e0068132314a01b8a49485b5bf94 # Parent 841de347591e3c06f2c55c7d18d1c42668f393b6 Bug #1395: Test timer is reset on each new test page. diff -r 841de347591e -r ee23bf531ec4 core.js --- a/core.js Mon Feb 01 10:38:54 2016 +0000 +++ b/core.js Tue Feb 02 11:03:01 2016 +0000 @@ -1159,7 +1159,7 @@ return this.audioObjects[audioObjectId]; }; - this.newTestPage = function(store) { + this.newTestPage = function(audioHolderObject,store) { this.pageStore = store; this.state = 0; this.audioObjectsReady = false; @@ -1169,6 +1169,8 @@ this.buffers[i].users = []; } this.audioObjects = []; + this.timer = new timer(); + this.loopPlayback = audioHolderObject.loop; }; this.checkAllPlayed = function() { @@ -2309,10 +2311,7 @@ this.newPage = function(audioHolderObject,store) { - audioEngineContext.newTestPage(store); - audioEngineContext.loopPlayback = audioHolderObject.loop; - // Delete any previous audioObjects associated with the audioEngine - audioEngineContext.audioObjects = []; + audioEngineContext.newTestPage(audioHolderObject,store); interfaceContext.deleteCommentBoxes(); interfaceContext.deleteCommentQuestions(); loadTest(audioHolderObject,store);