Mercurial > hg > webaudioevaluationtool
changeset 141:3a19b2ab9a67 Dev_main
Merge from the default branch
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Sat, 30 May 2015 10:20:47 +0100 |
parents | 29e89da26051 (current diff) ea6424dc5f04 (diff) |
children | 7168f3616a00 |
files | ape.js |
diffstat | 3 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ape.js Fri May 29 12:38:26 2015 +0100 +++ b/ape.js Sat May 30 10:20:47 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/core.js Fri May 29 12:38:26 2015 +0100 +++ b/core.js Sat May 30 10:20:47 2015 +0100 @@ -511,7 +511,7 @@ this.id = id; this.state = 0; // 0 - no data, 1 - ready this.url = null; // Hold the URL given for the output back to the results. - this.metric = new metricTracker(); + this.metric = new metricTracker(this); this.played = false; @@ -654,7 +654,7 @@ this.initialiseTest = function(){}; } -function metricTracker() +function metricTracker(caller) { /* Custom object to track and collect metric data * Used only inside the audioObjects object. @@ -668,6 +668,7 @@ this.wasListenedTo = false; this.wasMoved = false; this.hasComments = false; + this.parent = caller; this.initialised = function(position) { @@ -689,8 +690,9 @@ this.wasListenedTo = true; this.listenStart = time; this.listenHold = true; - } - } + console.log('slider ' + this.parent.id + ' played (' + time + ')'); // DEBUG/SAFETY: show played slider id + } + }; this.stopListening = function(time) {
--- a/example_eval/project.xml Fri May 29 12:38:26 2015 +0100 +++ b/example_eval/project.xml Sat May 30 10:20:47 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>