# HG changeset patch # User Nicholas Jillings # Date 1432913225 -3600 # Node ID 04fcd51441e5bdfa19dc0b7d6b74bf6f985566aa # Parent c849dcbe71aafc4a382e26be95447daacaf9dfb3 Bug #1258 Fixed. audioObject.metric.startListening now writes to console. diff -r c849dcbe71aa -r 04fcd51441e5 core.js --- a/core.js Thu May 28 19:27:39 2015 +0100 +++ b/core.js Fri May 29 16:27:05 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) { diff -r c849dcbe71aa -r 04fcd51441e5 example_eval/project.xml --- a/example_eval/project.xml Thu May 28 19:27:39 2015 +0100 +++ b/example_eval/project.xml Fri May 29 16:27:05 2015 +0100 @@ -18,7 +18,7 @@ elementFlagMoved - + Example Test Question Min