comparison ape.js @ 692:2b3f19c4f607

Fixed bug where not defining postTest in audioHolder would crash progression.
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Wed, 22 Apr 2015 18:34:56 +0100
parents 06fbaccf3b58
children 55e8ab191227
comparison
equal deleted inserted replaced
691:06fbaccf3b58 692:2b3f19c4f607
739 } else if (currentState.substr(0,7) == 'testRun') 739 } else if (currentState.substr(0,7) == 'testRun')
740 { 740 {
741 var testId = currentState.substr(8,currentState.length-7); 741 var testId = currentState.substr(8,currentState.length-7);
742 // Check if we have any post tests to perform 742 // Check if we have any post tests to perform
743 var postXML = $(testXMLSetups[testId]).find('PostTest')[0]; 743 var postXML = $(testXMLSetups[testId]).find('PostTest')[0];
744 if (postXML.children.length > 0) 744 if (postXML == undefined) {
745 testEnded(testId);
746 }
747 else if (postXML.children.length > 0)
745 { 748 {
746 currentState = 'testRunPost-'+testId; 749 currentState = 'testRunPost-'+testId;
747 showPopup(); 750 showPopup();
748 preTestPopupStart(postXML); 751 preTestPopupStart(postXML);
749 } 752 }
750 else { 753 else {
751 754
752 755
753 // No post tests, check if we have another test to perform instead 756 // No post tests, check if we have another test to perform instead
754 testEnded(testId); 757
755 } 758 }
756 } 759 }
757 console.log(currentState); 760 console.log(currentState);
758 } 761 }
759 762