# HG changeset patch # User Nicholas Jillings # Date 1454410981 0 # Node ID 018539fa16c501432de5b6a856f1714474a05fa0 # Parent c0022a09c4f6632bb10ea1b81591ba7cc02e94b9 Bug #1395: Test timer is reset on each new test page. diff -r c0022a09c4f6 -r 018539fa16c5 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);