Mercurial > hg > webaudioevaluationtool
changeset 933:1265e2aebf17
Bug #1255: Will show a console warning if projectReturn is not set and assume projectReturn is "null".
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 29 May 2015 16:33:50 +0100 |
parents | ec9a867e4512 |
children | 20823d1467b1 |
files | ape.js example_eval/project.xml |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ape.js Fri May 29 16:27:05 2015 +0100 +++ b/ape.js Fri May 29 16:33:50 2015 +0100 @@ -179,7 +179,13 @@ pagetitle.appendChild(titleSpan); // Store the return URL path in global projectReturn - projectReturn = xmlSetup[0].attributes['projectReturn'].value; + projectReturn = xmlSetup[0].attributes['projectReturn']; + if (projectReturn == undefined) { + console.log("WARNING - projectReturn not specified! Will assume null."); + projectReturn = "null"; + } else { + projectReturn = projectReturn.value; + } // Create Interface buttons! var interfaceButtons = document.createElement('div');
--- a/example_eval/project.xml Fri May 29 16:27:05 2015 +0100 +++ b/example_eval/project.xml Fri May 29 16:33:50 2015 +0100 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <BrowserEvalProjectDocument> - <setup interface="APE" projectReturn="http://127.0.0.1:8000/save" randomiseOrder='true' collectMetrics='true'> + <setup interface="APE" projectReturn="/save" randomiseOrder='true' collectMetrics='true'> <PreTest> <question id="Location" mandatory="true">Please enter your location.</question> <statement>Please listen to all mixes</statement>