changeset 954:e7f5890351eb

Fixed projectReturn=null to show XML save in popup window.
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Tue, 26 May 2015 14:17:32 +0100
parents 17353d015d33
children 4b29eddf74ea
files core.js example_eval/project.xml
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/core.js	Tue May 26 14:07:51 2015 +0100
+++ b/core.js	Tue May 26 14:17:32 2015 +0100
@@ -178,7 +178,8 @@
 		loadTest(0);
 	} else if (currentState == 'postTest') {
 		postTestQuestions = popup.responses;
-		console.log('ALL COLLECTED!'); 
+		console.log('ALL COLLECTED!');
+		 createProjectSave(projectReturn);
 	}else if (currentState.substr(0,10) == 'testRunPre')
 	{
 		// Start the test
@@ -205,12 +206,6 @@
 			currentState = 'testRunPost-'+testId; 
 			popup.initState(postXML);
 		}
-		else {
-		
-		
-			// No post tests, check if we have another test to perform instead
-			
-		}
 	}
 	console.log(currentState);
 }
@@ -289,6 +284,9 @@
 		
 		var submitDiv = document.getElementById('download-point');
 		submitDiv.appendChild(a);
+		popup.showPopup();
+		popup.popupContent.innerHTML = null;
+		popup.popupContent.appendChild(submitDiv)
 	}
 	return submitDiv;
 }
--- a/example_eval/project.xml	Tue May 26 14:07:51 2015 +0100
+++ b/example_eval/project.xml	Tue May 26 14:17:32 2015 +0100
@@ -2,11 +2,12 @@
 <BrowserEvalProjectDocument>
 	<setup interface="APE" projectReturn="null" randomiseOrder='true' collectMetrics='true'>
 		<PreTest>
+			<question id="Location" mandatory="true">Please enter your location.</question>
 			<statement>Please listen to all mixes</statement>
 		</PreTest>
 		<PostTest>
+			<question id="SessionID" mandatory="true">Please enter your name.</question>
 			<statement>Thank you for taking this listening test.</statement>
-			<question id="SessionID" mandatory="true">Please enter your name.</question>
 		</PostTest>
 		<Metric>
 			<metricEnable>testTimer</metricEnable>
@@ -41,6 +42,7 @@
 			<statement>Start the Test 3</statement>
 		</PreTest>
 		<PostTest>
+			<question id="genre" mandatory="true">Please enter the genre</question>
 		</PostTest>
 	</audioHolder>
 </BrowserEvalProjectDocument>
\ No newline at end of file