annotate docs/ProjectSpecificationDocument.tex @ 1460:1b81ab727352

Urgent Fix. Drag End function uses clientX mouse. Fixes rogue movement after drop on OSX.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Mon, 23 Nov 2015 15:48:07 +0000
parents 04e8a9c07c7e
children 2b8c36924bfd
rev   line source
nickjillings@1453 1 \documentclass{article}
nickjillings@1453 2
nickjillings@1453 3 \usepackage[margin=2cm]{geometry}
nickjillings@1453 4 \usepackage{listings}
nickjillings@1453 5
nickjillings@1453 6 \begin{document}
nickjillings@1453 7
nickjillings@1453 8 \large APE Browser Tool - Project Specification Document
nickjillings@1453 9
nickjillings@1453 10 \section{Document}
nickjillings@1453 11
nickjillings@1453 12 An XML file containing all project information to load and execute the project on the client. Certain interfaces are optional, however others are mandatory. This guide should reflect the changes in the XML project and keep track of the versions. Hopwfully this can remain simple!
nickjillings@1453 13
nickjillings@1453 14 \section{Root}
nickjillings@1453 15
nickjillings@1453 16 The XML root must be \texttt{<BrowserEvalProjectDocument>}. This should be sufficiently identifiable in both itself and in the JavaScript decoding as it will create an object called the root name.
nickjillings@1453 17
nickjillings@1453 18 There must also be a \texttt{<version>} tag which has the attribute \texttt{id} containing a numerical representation of the version. Currently everything in this document can be assumed to be version 1. If future updates or corrections are made post delivery this should give the flexibility to ensure past projects still work.
nickjillings@1453 19
nickjillings@1453 20 The root will also contain the following tags: setup and tracks.
nickjillings@1453 21
nickjillings@1453 22 \section{Setup tag}
nickjillings@1453 23
nickjillings@1453 24 The setup tag specifies certain global test settings including: the interface type to use, the project return location and any other setup instructions.
nickjillings@1453 25 Any general pre/post test questions must be specified in the relevant children tag. Any enabled metrics must also be specified in the metric child node.
nickjillings@1453 26
nickjillings@1453 27 \subsection{Attributes}
nickjillings@1453 28 \begin{itemize}
nickjillings@1453 29 \item \texttt{interface} - Mandatory, String. Defaults to APE, otherwise use to load any of the available interfaces. Currently only valid string is APE.
nickjillings@1453 30 \item \texttt{projectReturn} - Mandatory, String. Specify the URL to return the test results. If null client will generate XML locally and prompt user to return the file.
nickjillings@1453 31 \item \texttt{randomiseOrder} - Optional, default to false. Specify if the order of the test pages are to be randomised.
nickjillings@1453 32 \item \texttt{collectMetrics} - Deprecated. Optional, Boolean. Default to false. Determine if the test metrics should be collected. These include how long each test session took etc. The full metrics list can be modified in the 'metrics' tag.
nickjillings@1453 33 \end{itemize}
nickjillings@1453 34
nickjillings@1453 35 \subsection{Elements}
nickjillings@1453 36 None
nickjillings@1453 37
nickjillings@1453 38 \section{Metric tag}
nickjillings@1453 39 A 'setup' node child tag, metrics must be declared in the setup tag. This takes a set of children 'metricEnable' to define which metrics to collect and present, for example \texttt{<metricEnable> testTimer </metricEnable>}. The interface may not be able to utilise all of these features. It is up to the interface to determine whether to use the metric or not. For example, 'elementFlagMoved' would not be usable in an AB test as there are no interface value objects.
nickjillings@1453 40
nickjillings@1453 41 \subsection{metricEnable tag}
nickjillings@1453 42 This takes a single attribute to determine which metric to enable for collection. Some of these are a global, per track or per test instance.
nickjillings@1453 43 \begin{itemize}
nickjillings@1453 44 \item testTimer - Return the global test timer and test instance timers. Measures the time between the first start and final submit.
nickjillings@1453 45 \item elementTimer - Return the total time each audioElement in each test was listened too. Measures time between successive clicks on the track changer
nickjillings@1453 46 \item elementTracker - Return the initial position of each track
nickjillings@1453 47 \item elementTrackerFull - Return an enumerated pair of time and position. Track the entire movement of each element position. NOTE: Will override the elementTracker option above and throw an error into the browser console.
nickjillings@1453 48 \item elementFlagListenedTo - Return a boolean per elementck to see if the element was listened to
nickjillings@1453 49 \item elementFlagMoved - Return a boolean per element to see if the element slider was moved.
nickjillings@1453 50 \item elementFlagComments - Return a boolean per element to see if the element has comments.
nickjillings@1453 51 \end{itemize}
nickjillings@1453 52
nickjillings@1453 53 \section{Interface tag}
nickjillings@1453 54 This enables any interface options for each test page. Further interface tags in each audioHolder add further options. This takes option nodes only. Each option node takes a 'name' to determine what feature to enable. The following options are currently employed.
nickjillings@1453 55
nickjillings@1453 56 \subsection{Option nodes}
nickjillings@1453 57
nickjillings@1453 58 \begin{itemize}
nickjillings@1453 59 \item \texttt{fragmentPlayed} - Enforce each fragment be partially played before finishing the page
nickjillings@1453 60 \item \texttt{fragmentFullPlayback} - Enforce each fragment to be fully played from start to end before finishing the page. Not enabled if an audioHolder reports it is to be looped playback.
nickjillings@1453 61 \item \texttt{fragmentMoved} - Enforce each fragment to be moved at least once from its starting position.
nickjillings@1453 62 \item \texttt{fragmentComments} - Enforce each fragment comment to have some text entered.
nickjillings@1453 63 \item \texttt{playhead} - Show the playhead object.
nickjillings@1453 64 \item \texttt{page-count} - Show the current test page number and the total number
nickjillings@1453 65 \item \texttt{scalerange} - Must also have min and max values between 0 and 100. Enforce that at least one fragment is below the min value and one fragment is above the max value before continuing.
nickjillings@1453 66 \end{itemize}
nickjillings@1453 67
nickjillings@1453 68 \section{AudioHolder tag}
nickjillings@1453 69
nickjillings@1453 70 There should be one audioHolder tag for each test page, inside which each audioElement is specified as children. The audioHolder tag can help to generalise certain objects.
nickjillings@1453 71
nickjillings@1453 72 \subsection{Attributes}
nickjillings@1453 73 \begin{itemize}
nickjillings@1453 74 \item \texttt{id} - Mandatory, String. Give an ID string or number to identify the test in the result.
nickjillings@1453 75 \item \texttt{hostURL} - Optional, String. If all tracks are hosted from the same folder on a server, you can put in the lead here. For instance, if loading http://test.com/tracks/track1.wav and http://test.com/tracks/track2.wav, this could equal http://test.com/tracks/ and the url attribute in the track tag can be track1.wav or track2.wav. Equally http://test.com/ and then using tracks/track1.wav and tracks/track2.wav is valid.
nickjillings@1453 76 \item \texttt{sampleRate} - Optional, Number. If your test requires a specific sample rate, this should be set to the desired sample rate in Hertz. This does not set the browser to the correct sample rate, but forces the browser to check the sample rate matches. If this is undefined, no sample rate matching will occur.
nickjillings@1453 77 \item \texttt{randomiseOrder} - Optional, Boolean String. Defaults to false. Determine if the track order should be randomised. Must be true or false.
nickjillings@1453 78 \item \texttt{repeatCount} - Optional, Number. Defaults to 0 (ie: no repeats). The number of times a test should be repeated.
nickjillings@1453 79 \item \texttt{loop} - Optional, Boolean String. Defaults to false. Enable if audioElements should loop their playback or not.
nickjillings@1453 80 \item \texttt{elementComments} - Optional, Boolean String. Defaults to false. Enable to populate the test page with Comment Boxes linked to each fragment.
nickjillings@1453 81 \end{itemize}
nickjillings@1453 82
nickjillings@1453 83 \subsection{Elements}
nickjillings@1453 84 Contain the audioElements tags and the interfaceSetup tag.
nickjillings@1453 85
nickjillings@1453 86 \section{audioElements tag}
nickjillings@1453 87
nickjillings@1453 88 This must reside as children in the audioHolder tag. There must be one audioElement tag per sound sample to load into the test.
nickjillings@1453 89
nickjillings@1453 90 \subsection{Attributes}
nickjillings@1453 91 \begin{itemize}
nickjillings@1453 92 \item \texttt{id} - Mandatory, String. Must give a string or number to identify each audio element. This id is used in the output to identify each track once randomised.
nickjillings@1453 93 \item \texttt{url} - Mandatory, String. Contain the full URL to the track. If the Tracks tag hostURL is set, concatenate this tag with the hostURL attribute to obtain the full URL.
nickjillings@1453 94 \item \texttt{type} - Optional, String. Can be 'normal', 'anchor', 'reference' or 'outside-reference'. Default is for normal. Only one anchor can be specified per page. Only one reference can be specified per page. Only one outside-reference can be specified per page. If multiple audioelements have the same type in the same page, the browser console will explain the problem and the audioelements will be treated as 'normal' fragments.
nickjillings@1453 95 \end{itemize}
nickjillings@1453 96
nickjillings@1453 97 \section{interface tag}
nickjillings@1453 98
nickjillings@1453 99 This is contained within the audioHolder tag and outlines test instance specific requirements. These include the following children tags:
nickjillings@1453 100 \begin{itemize}
nickjillings@1453 101 \item 'title' - Contains the test title to be shown at the top of the page. Can only be one title node per interface.
nickjillings@1453 102 \item 'scale' - Takes the attribute position to be a value between 0 and 100 indicating where on the scale to place the text contained inside. Can be multiple scale tags per interface.
nickjillings@1453 103 \item 'option' - Can hold any of the option tags available in the setup tag. These will only be enabled for the page instance.
nickjillings@1453 104 \end{itemize}
nickjillings@1453 105
nickjillings@1453 106 \section {CommentQuestion tag}
nickjillings@1453 107
nickjillings@1453 108 This allows another question and comment box to be presented on the page. The results of these are passed back in the results XML with both the comment and the question. An id must be set, otherwise the result is undefined. Also the type must be set as follows.
nickjillings@1453 109 \begin{itemize}
nickjillings@1453 110 \item 'type="text"' - Default type. Creates a text box on the page. The text is included as the element.
nickjillings@1453 111 \item 'type="radio"' - Create radio button entry. Multiple equally spaced entried per box. Only one entry can be selected. Each radio button is specified by an option tag. The tag must contain a name attribute, which will be the response if true. Optional text can be included as the element to label the box. Presented question is included in a statement node.
nickjillings@1453 112 \item 'type="checkbox"' - Create a checkbox entry. Multiple equally space entries per box, multiple can be selected. Each checkbox is specified by an option tag. The tag must contain a name attribute. Optional text can be included as the element to label the checkbox. Presented question is included in a statement node.
nickjillings@1453 113 \end{itemize}
nickjillings@1453 114
nickjillings@1453 115
nickjillings@1453 116 \section {PreTest tag and PostTest tag}
nickjillings@1453 117
nickjillings@1453 118 These are 1st level tags. The PreTest tag allows for the specifying of pre test instructions and questions. These appear as a pop-up style window with next buttons and other automatic GUI. The postTest tag allows for specifying post test instructions, questions and resources. These appear as a pop-up style window after the submit button is pressed.
nickjillings@1453 119
nickjillings@1453 120 PreTest and PostTag nodes can be included in the audioHolders (for pre and post for that test page) and in the setup node for pre-test before the first page, and post-test for after the last test.
nickjillings@1453 121
nickjillings@1453 122 \subsection{Attributes}
nickjillings@1453 123 None.
nickjillings@1453 124
nickjillings@1453 125 \subsection{Elements}
nickjillings@1453 126
nickjillings@1453 127 Takes the following available tags to structure the pre and post test options. The order these are presented in the XML define the order they appear.
nickjillings@1453 128
nickjillings@1453 129 \subsubsection{Statement}
nickjillings@1453 130
nickjillings@1453 131 The statement tag simply prints the included string verbatim on a 'pop-up' window with a next button.
nickjillings@1453 132
nickjillings@1453 133 \subsubsection{Question}
nickjillings@1453 134
nickjillings@1453 135 This allows for a question to be asked pre/post the test. The response includes both the question asked and the response. The following attributes are used:
nickjillings@1453 136 \begin{itemize}
nickjillings@1453 137 \item \texttt{id} - Mandatory, String. Used to reference to the response.
nickjillings@1453 138 \item \texttt{mandatory} - Optional, String Boolean. Determine if this question must have some response. Defaults to false.
nickjillings@1453 139 \item \texttt{boxsize} - Optional, String. Defaults to normal. Allows 'small', 'normal', 'large' or 'huge'. This determines the size of the box entry. All entries are wrappable, so this does not determine the maximum size of the text response, but can be used to encourage (or dicourage) long answers.
nickjillings@1453 140 \end{itemize}
nickjillings@1453 141
nickjillings@1453 142 \subsubsection{Number}
nickjillings@1453 143
nickjillings@1453 144 Gives a number box entry defined with the following attributes:
nickjillings@1453 145 \begin{itemize}
nickjillings@1453 146 \item \texttt{id} - Mandatory, String. Used to reference to the response.
nickjillings@1453 147 \item \texttt{mandatory} - Optional, String Boolean. Determine if this question must have some response. Defaults to false.
nickjillings@1453 148 \item \texttt{min, max} - Optional, Number. Defaults to undefined. Used to bound the number response. If a number entered is below this, the pre/post sequence will not continued.
nickjillings@1453 149 \end{itemize}
nickjillings@1453 150
nickjillings@1453 151 \subsubsection{Radio}
nickjillings@1453 152
nickjillings@1453 153 Create a set of radio boxes. Only one element can be returned as true. The radio node must have an id to reference for the output. The radio node also must have a statment node which will contain the text to show on the popup. Radio buttons are created using option nodes. Each node must have a name attribute to indentify which radio was selected in the response. The option node can also contain any text to link to the node.
nickjillings@1453 154
nickjillings@1453 155 \subsubsection{Checkbox}
nickjillings@1453 156
nickjillings@1453 157 Create a set of checkbox boxes. Multiple elements can be returned as true. The checkbox node must have an id to reference for the output. The checkbox node also must have a statment node which will contain the text to show on the popup. Checkbox buttons are created using option nodes. Each node must have a name attribute to indentify which radio was selected in the response. The option node can also contain any text to link to the node.
nickjillings@1453 158
nickjillings@1453 159 \section{Example}
nickjillings@1453 160
nickjillings@1453 161 Here is an example XML structure
nickjillings@1453 162
nickjillings@1453 163 \begin{lstlisting}
nickjillings@1453 164 <?xml version="1.0" encoding="utf-8"?>
nickjillings@1453 165 <BrowserEvalProjectDocument>
nickjillings@1453 166 <setup interface="APE" projectReturn="null" randomiseOrder='true' collectMetrics='true'>
nickjillings@1453 167 <PreTest>
nickjillings@1453 168 <statement>Please listen to all mixes</statement>
nickjillings@1453 169 <question id="location" mandatory="true">Please enter your listening location</question>
nickjillings@1453 170 </PreTest>
nickjillings@1453 171 <PostTest>
nickjillings@1453 172 <statement>Thank you for taking this listening test.</statement>
nickjillings@1453 173 <question id="SessionID">Please enter your name.</question>
nickjillings@1453 174 </PostTest>
nickjillings@1453 175 <Metric>
nickjillings@1453 176 <metricEnable>testTimer</metricEnable>
nickjillings@1453 177 <metricEnable>elementTimer</metricEnable>
nickjillings@1453 178 <metricEnable>elementTracker</metricEnable>
nickjillings@1453 179 <metricEnable>elementFlagListenedTo</metricEnable>
nickjillings@1453 180 <metricEnable>elementFlagMoved</metricEnable>
nickjillings@1453 181 </Metric>
nickjillings@1453 182 </setup>
nickjillings@1453 183 <audioHolder id='0' hostURL="example_eval/" sampleRate="44100" randomiseOrder='true' repeatCount='1'>
nickjillings@1453 184 <interface>
nickjillings@1453 185 <title>Example Test Question</title>
nickjillings@1453 186 <scale position="0">Min</scale>
nickjillings@1453 187 <scale position="100">Max</scale>
nickjillings@1453 188 <scale position="50">Middle</scale>
nickjillings@1453 189 <scale position="20">20</scale>
nickjillings@1453 190 </interface>
nickjillings@1453 191 <audioElements url="0.wav" id="0"/>
nickjillings@1453 192 <audioElements url="1.wav" id="1"/>
nickjillings@1453 193 <audioElements url="2.wav" id="2"/>
nickjillings@1453 194 <audioElements url="3.wav" id="3"/>
nickjillings@1453 195 <audioElements url="4.wav" id="4"/>
nickjillings@1453 196 <audioElements url="5.wav" id="5"/>
nickjillings@1453 197 <audioElements url="6.wav" id="6"/>
nickjillings@1453 198 <audioElements url="7.wav" id="7"/>
nickjillings@1453 199 <audioElements url="8.wav" id="8"/>
nickjillings@1453 200 <audioElements url="9.wav" id="9"/>
nickjillings@1453 201 <audioElements url="10.wav" id="10"/>
nickjillings@1453 202 <CommentQuestion id='mixingExperiance'>What is your mixing experiance</CommentQuestion>
nickjillings@1453 203 <PreTest>
nickjillings@1453 204 <statement>Start the Test 3</statement>
nickjillings@1453 205 </PreTest>
nickjillings@1453 206 <PostTest>
nickjillings@1453 207 <statement>Please take a break before the next test</statement>
nickjillings@1453 208 <question id="testComment">How did you find the test</question>
nickjillings@1453 209 </PostTest>
nickjillings@1453 210 </audioHolder>
nickjillings@1453 211 </BrowserEvalProjectDocument>
nickjillings@1453 212 \end{lstlisting}
nickjillings@1453 213
nickjillings@1453 214
nickjillings@1453 215
nickjillings@1453 216 \end{document}