# HG changeset patch # User Nicholas Jillings # Date 1432544788 -3600 # Node ID 4d8846186db4913174f5191fbcef5f0bbc6dd59a # Parent f89182a5f28d786694605ce2db27a011e2464192 Fixed Bug #1233: Failure to correctly give IDs to text entry if a question was the first option on the statement. diff -r f89182a5f28d -r 4d8846186db4 ape.js --- a/ape.js Sun May 24 11:45:35 2015 +0100 +++ b/ape.js Mon May 25 10:06:28 2015 +0100 @@ -566,12 +566,14 @@ preTestOption.innerHTML = ''+child.textContent+''; } else if (child.nodeName == 'question') { - var questionId = child.attributes['id'].value; var textHold = document.createElement('span'); textHold.innerHTML = child.textContent; - textHold.id = questionId + 'response'; var textEnter = document.createElement('textarea'); + textEnter.id = child.attributes['id'].value + 'response'; + var br = document.createElement('br'); + preTestOption.innerHTML = null; preTestOption.appendChild(textHold); + preTestOption.appendChild(br); preTestOption.appendChild(textEnter); } var nextButton = document.createElement('button'); diff -r f89182a5f28d -r 4d8846186db4 example_eval/project.xml --- a/example_eval/project.xml Sun May 24 11:45:35 2015 +0100 +++ b/example_eval/project.xml Mon May 25 10:06:28 2015 +0100 @@ -3,7 +3,10 @@ Please listen to all mixes - Please enter your listening location + Please enter your name. + Please enter your listening location (Yellow Room/SSL Duality or Red Room/Neve VR). + Please enter your name. + Please enter your listening location (Yellow Room/SSL Duality or Red Room/Neve VR). Thank you for taking this listening test. @@ -18,7 +21,7 @@ elementFlagMoved - + Example Test Question Min @@ -42,8 +45,8 @@ Start the Test 3 - Please take a break before the next test How did you find the test + How would you describe the genre of this song? Multiple answers possible. \ No newline at end of file