# HG changeset patch # User Nicholas Jillings # Date 1432544788 -3600 # Node ID 48e05b7a16e0ae7ace487bc36fccb0d2f2d3cc0b # Parent 46eca4a8ad438d3a90686ff5cfc2ff88f99c6702 Fixed Bug #1233: Failure to correctly give IDs to text entry if a question was the first option on the statement. diff -r 46eca4a8ad43 -r 48e05b7a16e0 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 46eca4a8ad43 -r 48e05b7a16e0 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