comparison js/core.js @ 2695:211364181d16

JSHint ABX (#180)
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Sat, 11 Mar 2017 18:38:12 +0000
parents 1ccc083552d5
children 67db38680bc0
comparison
equal deleted inserted replaced
2694:1ccc083552d5 2695:211364181d16
1309 if (this.stateIndex > -2) { 1309 if (this.stateIndex > -2) {
1310 storage.update(); 1310 storage.update();
1311 } 1311 }
1312 if (this.stateIndex == -2) { 1312 if (this.stateIndex == -2) {
1313 this.stateIndex++; 1313 this.stateIndex++;
1314 if (this.preTestSurvey !== null) { 1314 if (this.preTestSurvey !== undefined) {
1315 popup.initState(this.preTestSurvey, storage.globalPreTest); 1315 popup.initState(this.preTestSurvey, storage.globalPreTest);
1316 } else { 1316 } else {
1317 this.advanceState(); 1317 this.advanceState();
1318 } 1318 }
1319 } else if (this.stateIndex == -1) { 1319 } else if (this.stateIndex == -1) {
1329 } 1329 }
1330 } else if (this.stateIndex == this.stateMap.length) { 1330 } else if (this.stateIndex == this.stateMap.length) {
1331 // All test pages complete, post test 1331 // All test pages complete, post test
1332 console.log('Ending test ...'); 1332 console.log('Ending test ...');
1333 this.stateIndex++; 1333 this.stateIndex++;
1334 if (this.postTestSurvey === null) { 1334 if (this.postTestSurvey === undefined) {
1335 this.advanceState(); 1335 this.advanceState();
1336 } else { 1336 } else {
1337 popup.initState(this.postTestSurvey, storage.globalPostTest); 1337 popup.initState(this.postTestSurvey, storage.globalPostTest);
1338 } 1338 }
1339 } else if (this.stateIndex > this.stateMap.length) { 1339 } else if (this.stateIndex > this.stateMap.length) {
1359 elements = randomiseOrder(elements); 1359 elements = randomiseOrder(elements);
1360 } 1360 }
1361 this.currentStateMap.audioElements = elements.concat(ref); 1361 this.currentStateMap.audioElements = elements.concat(ref);
1362 1362
1363 this.currentStore = storage.testPages[this.stateIndex]; 1363 this.currentStore = storage.testPages[this.stateIndex];
1364 if (this.currentStateMap.preTest !== null) { 1364 if (this.currentStateMap.preTest !== undefined) {
1365 this.currentStatePosition = 'pre'; 1365 this.currentStatePosition = 'pre';
1366 popup.initState(this.currentStateMap.preTest, storage.testPages[this.stateIndex].preTest); 1366 popup.initState(this.currentStateMap.preTest, storage.testPages[this.stateIndex].preTest);
1367 } else { 1367 } else {
1368 this.currentStatePosition = 'test'; 1368 this.currentStatePosition = 'test';
1369 } 1369 }