Mercurial > hg > webaudioevaluationtool
changeset 2251:6893f2930849
If there are no surveys it would silently fail. Now shows the get data buttons.
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 19 Apr 2016 15:25:59 +0100 |
parents | 30c012132427 |
children | aa36a634c8a6 |
files | analysis/analysis.js |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/analysis/analysis.js Tue Apr 19 14:58:40 2016 +0100 +++ b/analysis/analysis.js Tue Apr 19 15:25:59 2016 +0100 @@ -774,7 +774,14 @@ break; } } - for (var survey_entry of specification.preTest.options.concat(specification.postTest.options)) { + var options = []; + if(specification.preTest) { + options = options.concat(specification.preTest.options); + } + if (specification.postTest) { + options = options.concat(specification.postTest.options); + } + for (var survey_entry of options) { switch(survey_entry.type) { case "number": case "radio":