giuliomoro@0: \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format giuliomoro@0: \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. giuliomoro@0: \geometry{letterpaper} % ... or a4paper or a5paper or ... giuliomoro@0: %\geometry{landscape} % Activate for rotated page geometry giuliomoro@0: \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent giuliomoro@0: \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode giuliomoro@0: % TeX will automatically convert eps --> pdf in pdflatex giuliomoro@0: giuliomoro@0: \usepackage{listings} % Source code giuliomoro@0: \usepackage{xcolor} % colour (source code for instance) giuliomoro@0: \definecolor{grey}{rgb}{0.1,0.1,0.1} giuliomoro@0: \definecolor{darkblue}{rgb}{0.0,0.0,0.6} giuliomoro@0: \definecolor{cyan}{rgb}{0.0,0.6,0.6} giuliomoro@0: giuliomoro@0: \usepackage{amssymb} giuliomoro@0: \usepackage{cite} giuliomoro@0: \usepackage{hyperref} % Hyperlinks giuliomoro@0: \usepackage[nottoc,numbib]{tocbibind} % 'References' in TOC giuliomoro@0: giuliomoro@0: \graphicspath{{img/}} % Relative path where the images are stored. giuliomoro@0: giuliomoro@0: \title{Instructions for \\ Web Audio Evaluation Tool} giuliomoro@0: \author{Nicholas Jillings, Brecht De Man and David Moffat} giuliomoro@0: \date{7 December 2015} % Activate to display a given date or no date giuliomoro@0: giuliomoro@0: \begin{document} giuliomoro@0: \maketitle giuliomoro@0: giuliomoro@0: These instructions are about use of the Web Audio Evaluation Tool on Windows and Mac OS X platforms. giuliomoro@0: giuliomoro@0: We request that you acknowledge the authors and cite our work when using it \cite{waet}, see also CITING.txt. giuliomoro@0: giuliomoro@0: The tool is available in its entirety including source code on \url{https://code.soundsoftware.ac.uk/projects/webaudioevaluationtool/}, under the GNU General Public License v3.0 (\url{http://choosealicense.com/licenses/gpl-3.0/}), see also LICENSE.txt. giuliomoro@0: giuliomoro@0: % TO DO: Linux (Android, iOS) giuliomoro@0: giuliomoro@0: \tableofcontents giuliomoro@0: giuliomoro@0: \clearpage giuliomoro@0: giuliomoro@0: \section{Installation} giuliomoro@0: Download the folder (\url{https://code.soundsoftware.ac.uk/hg/webaudioevaluationtool/archive/tip.zip}) and unzip in a location of your choice, or pull the source code from \url{https://code.soundsoftware.ac.uk/hg/webaudioevaluationtool} (Mercurial). giuliomoro@0: giuliomoro@0: \subsection{Contents} giuliomoro@0: The folder should contain the following elements: \\ giuliomoro@0: giuliomoro@0: \textbf{Main folder:} giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{analyse.html}: analysis and diagnostics of a set of result XML files giuliomoro@0: \item \texttt{core.css, graphics.css, structure.css}: core style files (edit to change appearance) giuliomoro@0: \item \texttt{CITING.txt, LICENSE.txt, README.txt}: text files with, respectively, the citation which we ask to include in any work where this tool or any portion thereof is used, modified or otherwise; the license under which the software is shared; and a general readme file referring to these instructions. giuliomoro@0: \item \texttt{core.js}: JavaScript file with core functionality giuliomoro@0: \item \texttt{index.html}: webpage where interface should appear (includes link to test configuration XML) giuliomoro@0: \item \texttt{jquery-2.1.4.js}: jQuery JavaScript Library giuliomoro@0: \item \texttt{loudness.js}: Allows for automatic calculation of loudness of Web Audio API Buffer objects, return gain values to correct for a target loudness or match loudness between multiple objects giuliomoro@0: \item \texttt{pythonServer.py}: webserver for running tests locally giuliomoro@0: \item \texttt{pythonServer-legacy.py}: webserver with limited functionality (no automatic storing of output XML files) giuliomoro@0: \item \texttt{save.php}: PHP script to store result XML files to web server\\ giuliomoro@0: \end{itemize} giuliomoro@0: \textbf{Documentation (./docs/)} giuliomoro@0: \begin{itemize} giuliomoro@0: \item \href{http://c4dm.eecs.qmul.ac.uk/dmrn/events/dmrnp10/#posters}{DMRN+10}: PDF and \LaTeX source of poster for 10\textsuperscript{th} Digital Music Research Network One-Day workshop (``soft launch'') giuliomoro@0: \item Instructions: PDF and \LaTeX source of these instructions giuliomoro@0: \item Project Specification Document (\LaTeX/PDF) giuliomoro@0: \item Results Specification Document (\LaTeX/PDF) giuliomoro@0: \item SMC15: PDF and \LaTeX source of 12th Sound and Music Computing Conference paper \cite{waet} giuliomoro@0: \item WAC2016: PDF and \LaTeX source of 2nd Web Audio Conference paper\\ giuliomoro@0: \end{itemize} giuliomoro@0: \textbf{Example project (./example\_eval/)} giuliomoro@0: \begin{itemize} giuliomoro@0: \item An example of what the set up XML should look like, with example audio files 0.wav-10.wav which are short recordings at 44.1kHz, 16bit of a woman saying the corresponding number (useful for testing randomisation and general familiarisation with the interface).\\ giuliomoro@0: \end{itemize} giuliomoro@0: \textbf{Interface files (./interfaces/} giuliomoro@0: \begin{itemize} giuliomoro@0: \item Each interface class has a JavaScript file and an optional CSS style file. These are loaded as needed. giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: \textbf{Output files (./saves/)} giuliomoro@0: \begin{itemize} giuliomoro@0: \item The output XML files of tests will be stored here by default by the \texttt{pythonServer.py} script.\\ giuliomoro@0: \end{itemize} giuliomoro@0: \textbf{Auxiliary scripts (./scripts/)} giuliomoro@0: \begin{itemize} giuliomoro@0: \item Helpful Python scripts for extraction and visualisation of data.\\ giuliomoro@0: \end{itemize} giuliomoro@0: \textbf{Test creation tool (./test\_create/)} giuliomoro@0: \begin{itemize} giuliomoro@0: \item Webpage for easily setting up your own test without having to delve into the XML.\\ giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: \subsection{Compatibility} giuliomoro@0: As Microsoft Internet Explorer doesn't support the Web Audio API\footnote{\url{http://caniuse.com/\#feat=audio-api}}, you will need another browser like Google Chrome, Safari or Firefox (all three are tested and confirmed to work). giuliomoro@0: giuliomoro@0: Firefox does not currently support other bit depths than 8 or 16 bit for PCM wave files. In the future, this will throw a warning message to tell the user that their content is being quantised automatically. %Nick? Right? To be removed if and when actually implemented giuliomoro@0: giuliomoro@0: The tool is platform-independent and works in any browser that supports the Web Audio API. It does not require any specific, proprietary software. However, in case the tool is hosted locally (i.e. you are not hosting it on an actual webserver) you will need Python (2.7), which is a free programming language - see the next paragraph. giuliomoro@0: giuliomoro@0: \clearpage giuliomoro@0: giuliomoro@0: giuliomoro@0: \section{Test setup} giuliomoro@0: giuliomoro@0: \subsection{Sample rate} giuliomoro@0: Depending on how the experiment is set up, audio is resampled automatically (the Web Audio default) or the sample rate is enforced. In the latter case, you will need to make sure that the sample rate of the system is equal to the sample rate of these audio files. For this reason, all audio files in the experiment will have to have the same sample rate. giuliomoro@0: giuliomoro@0: Always make sure that all other digital equipment in the playback chain (clock, audio interface, digital-to-analog converter, ...) is set to this same sample rate. giuliomoro@0: giuliomoro@0: Note that upon changing the sampling rate, the browser will have to be restarted for the change to take effect. giuliomoro@0: giuliomoro@0: \subsubsection{Mac OS X} giuliomoro@0: To change the sample rate in Mac OS X, go to \textbf{Applications/Utilities/Audio MIDI Setup} or find this application with Spotlight (see Figure \ref{fig:audiomidisetup}). Then select the output of the audio interface you are using and change the `Format' to the appropriate number. Also make sure the bit depth and channel count are as desired. giuliomoro@0: If you are using an external audio interface, you may have to go to the preference pane of that device to change the sample rate. giuliomoro@0: giuliomoro@0: Also make sure left and right channel gains are equal, as some applications alter this without changing it back, leading to a predominantly louder left or right channel. See Figure \ref{fig:audiomidisetup} for an example where the channel gains are different. giuliomoro@0: giuliomoro@0: \begin{figure}[tb] giuliomoro@0: \centering giuliomoro@0: \includegraphics[width=.65\textwidth]{img/audiomidisetup.png} giuliomoro@0: \caption{The Audio MIDI Setup window in Mac OS X} giuliomoro@0: \label{fig:audiomidisetup} giuliomoro@0: \end{figure} giuliomoro@0: giuliomoro@0: \subsubsection{Windows} giuliomoro@0: To change the sample rate in Windows, right-click on the speaker icon in the lower-right corner of your desktop and choose `Playback devices'. Right-click the appropriate playback device and click `Properties'. Click the `Advanced' tab and verify or change the sample rate under `Default Format'. % NEEDS CONFIRMATION giuliomoro@0: If you are using an external audio interface, you may have to go to the preference pane of that device to change the sample rate. giuliomoro@0: giuliomoro@0: \subsection{Local test} giuliomoro@0: If the test is hosted locally, you will need to run the local webserver provided with this tool. giuliomoro@0: giuliomoro@0: \subsubsection{Mac OS X \& Linux} giuliomoro@0: giuliomoro@0: On Mac OS X, Python comes preinstalled, as with most Unix/Linux distributions. giuliomoro@0: giuliomoro@0: Open the Terminal (find it in \textbf{Applications/Terminal} or via Spotlight), and go to the folder you downloaded. To do this, type \texttt{cd [folder]}, where \texttt{[folder]} is the folder where to find the \texttt{pythonServer.py} script you downloaded. For instance, if the location is \texttt{/Users/John/Documents/test/}, then type giuliomoro@0: giuliomoro@0: \texttt{cd /Users/John/Documents/test/} giuliomoro@0: giuliomoro@0: Then hit enter and run the Python script by typing giuliomoro@0: giuliomoro@0: \texttt{python pythonServer.py} giuliomoro@0: giuliomoro@0: and hit enter again. See also Figure \ref{fig:terminal}. giuliomoro@0: giuliomoro@0: \begin{figure}[htbp] giuliomoro@0: \begin{center} giuliomoro@0: \includegraphics[width=.75\textwidth]{pythonServer.png} giuliomoro@0: \caption{Mac OS X: The Terminal window after going to the right folder (\texttt{cd [folder\_path]}) and running \texttt{pythonServer.py}.} giuliomoro@0: \label{fig:terminal} giuliomoro@0: \end{center} giuliomoro@0: \end{figure} giuliomoro@0: giuliomoro@0: Alternatively, you can simply type \texttt{python} (follwed by a space) and drag the file into the Terminal window from Finder. % DOESN'T WORK YET giuliomoro@0: giuliomoro@0: You can leave this running throughout the different experiments (i.e. leave the Terminal open). Once running the terminal will report the current URL to type into your browser to initiate the test, usually this is http://localhost:8000/. giuliomoro@0: giuliomoro@0: To start the test, open the browser and type giuliomoro@0: giuliomoro@0: \texttt{localhost:8000} giuliomoro@0: giuliomoro@0: and hit enter. The test should start (see Figure \ref{fig:test}). giuliomoro@0: giuliomoro@0: To quit the server, either close the terminal window or press Ctrl+C on your keyboard to forcibly shut the server. giuliomoro@0: giuliomoro@0: \subsubsection{Windows} giuliomoro@0: giuliomoro@0: On Windows, Python 2.7 is not generally preinstalled and therefore has to be downloaded\footnote{\url{https://www.python.org/downloads/windows/}} and installed to be able to run scripts such as the local webserver, necessary if the tool is hosted locally. giuliomoro@0: giuliomoro@0: Simply double click the Python script \texttt{pythonServer.py} in the folder you downloaded. giuliomoro@0: giuliomoro@0: You may see a warning like the one in Figure \ref{fig:warning}. Click `Allow access'. giuliomoro@0: giuliomoro@0: \begin{figure}[htbp] giuliomoro@0: \begin{center} giuliomoro@0: \includegraphics[width=.6\textwidth]{warning.png} giuliomoro@0: \caption{Windows: Potential warning message when executing \texttt{pythonServer.py}.} giuliomoro@0: \label{fig:warning} giuliomoro@0: \end{center} giuliomoro@0: \end{figure} giuliomoro@0: giuliomoro@0: The process should now start, in the Command prompt that opens - see Figure \ref{fig:python}. giuliomoro@0: giuliomoro@0: \begin{figure}[htbp] giuliomoro@0: \begin{center} giuliomoro@0: \includegraphics[width=.75\textwidth]{python.png} giuliomoro@0: \caption{Windows: The Command Prompt after running \texttt{pythonServer.py} and opening the corresponding website.} giuliomoro@0: \label{fig:python} giuliomoro@0: \end{center} giuliomoro@0: \end{figure} giuliomoro@0: giuliomoro@0: You can leave this running throughout the different experiments (i.e. leave the Command Prompt open). giuliomoro@0: giuliomoro@0: To start the test, open the browser and type giuliomoro@0: giuliomoro@0: \texttt{localhost:8000} giuliomoro@0: giuliomoro@0: and hit enter. The test should start (see Figure \ref{fig:test}). giuliomoro@0: giuliomoro@0: \begin{figure}[htb] giuliomoro@0: \begin{center} giuliomoro@0: \includegraphics[width=.8\textwidth]{test.png} giuliomoro@0: \caption{The start of the test in Google Chrome on Windows 7.} giuliomoro@0: \label{fig:test} giuliomoro@0: \end{center} giuliomoro@0: \end{figure} giuliomoro@0: giuliomoro@0: If at any point in the test the participant reports weird behaviour or an error of some kind, or the test needs to be interrupted, please notify the experimenter and/or refer to Section \ref{sec:troubleshooting}. giuliomoro@0: giuliomoro@0: When the test is over (the subject should see a message to that effect, and click `Submit' one last time), the output XML file containing all collected data should have appeared in `saves/'. The names of these files are `test-0.xml', `test-1.xml', etc., in ascending order. The Terminal or Command prompt running the local web server will display the following file name. If such a file did not appear, please again refer to Section \ref{sec:troubleshooting}. giuliomoro@0: giuliomoro@0: It is advised that you back up these results as often as possible, as a loss of this data means that the time and effort spent by the subject(s) has been in vain. Save the results to an external or network drive, and/or send them to the experimenter regularly. giuliomoro@0: giuliomoro@0: To start the test again for a new participant, you do not need to close the browser or shut down the Terminal or Command Prompt. Simply refresh the page or go to \texttt{localhost:8000} again. giuliomoro@0: giuliomoro@0: giuliomoro@0: \subsection{Remote test} giuliomoro@0: Put all files on a web server which supports PHP. This allows the `save.php' script to store the XML result files in the `saves/' folder. If the web server is not able to store the XML file there at the end of the test, it will present the XML file locally to the user, as a `Save file' link. giuliomoro@0: giuliomoro@0: Make sure the \texttt{projectReturn} attribute of the \texttt{setup} node is set to the \texttt{save.php} script. giuliomoro@0: giuliomoro@0: Then, just go to the URL of the corresponding HTML file, e.g. \texttt{http://server.com/path/to/WAET/index.html?url=test/my-test.xml}. If storing on the server doesn't work at submission (e.g. if the \texttt{projectReturn} attribute isn't properly set), the result XML file will be presented to the subject on the client side, as a `Save file' link. giuliomoro@0: giuliomoro@0: \subsection{Load a test / Multiple test documents} giuliomoro@0: By default the index page will load a demo page of tests. To automatically load a test document, you need to append the location in the URL. If your URL is normally http://localhost:8000/index.html you would append the following: \texttt{?url=/path/to/your/test.xml}. Replace the fields with your actual path, the path is local to the running directory, so if you have your test in the directory \texttt{example\_eval} called \texttt{project.xml} you would append \texttt{?url=/example\_eval/project.xml}. giuliomoro@0: giuliomoro@0: \clearpage giuliomoro@0: giuliomoro@0: \section{Interfaces} giuliomoro@0: giuliomoro@0: The Web Audio Evaluation Tool comes with a number of interface styles, each of which can be customised extensively, either by configuring them differently using the many optional features, or by modifying the JavaScript files. giuliomoro@0: giuliomoro@0: To set the interface style for the whole test, set the attribute of the \texttt{setup} node to \texttt{interface="APE"}, where \texttt{"APE"} is one of the interface names below. giuliomoro@0: giuliomoro@0: \subsection{APE} giuliomoro@0: The APE interface is based on \cite{ape}, and consists of one or more axes, each corresponding with an attribute to be rated, on which markers are placed. As such, it is a multiple stimulus interface where (for each dimension or attribute) all elements are on one axis so that they can be maximally compared against each other, as opposed to rated individually or with regards to a single reference. giuliomoro@0: It also contains an optional text box for each element, to allow for clarification by the subject, tagging, and so on. giuliomoro@0: giuliomoro@0: \subsection{MUSHRA} giuliomoro@0: This is a straightforward implementation of \cite{mushra}, especially common for the rating of audio quality, for instance for the evaluation of audio codecs. This can also operate any vertical slider style test and does not necessarily have to match the MUSHRA specification. giuliomoro@0: giuliomoro@0: \subsection{AB} giuliomoro@0: Performs a pairwise comparison, but supports ABX and n-way comparison (in the example we demonstrate it performing a 7-way comparison). giuliomoro@0: giuliomoro@0: \subsection{Discrete/Likert} giuliomoro@0: Each audio element is given a discrete set of values based on the number of slider options specified. For instance, Likert specifies 5 values and therefore each audio element must be one of those 5 values. giuliomoro@0: giuliomoro@0: \subsection{ACR/CCR/DCR/horizontal} giuliomoro@0: Creates the same interfaces as MUSHRA except the sliders are horizontal, not vertical. giuliomoro@0: giuliomoro@0: giuliomoro@0: \clearpage giuliomoro@0: giuliomoro@0: \section{Project XML} giuliomoro@0: giuliomoro@0: Each test is defined by its project XML file, examples of these can be seen in the ./example\_eval/ directory. giuliomoro@0: giuliomoro@0: In the XML there are several nodes which must be defined: giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{}: The root node. giuliomoro@0: \item \texttt{}: The first child node, defines whole-test parameters giuliomoro@0: \item \texttt{}: Specifies a test page, attached \emph{after} the \texttt{}. giuliomoro@0: \item \texttt{}: Specifies an audio element. giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: The test uses XML validation, so the ordering of nodes is important to pass this validation. Some nodes also have specific attributes which must be set and may even have a certain format to apply them. This is done so error checking can be performed both quickly and succintly with easy to find errors before loading and running a test session. giuliomoro@0: giuliomoro@0: Before identifying any features, this part will walk you through the available nodes, their function and their attributes. giuliomoro@0: giuliomoro@0: \subsection{Root} giuliomoro@0: The root node is \texttt{}, it must have the following attributes: giuliomoro@0: giuliomoro@0: \texttt{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"} giuliomoro@0: giuliomoro@0: \texttt{xsi:noNamespaceSchemaLocation="test-schema.xsd"}. giuliomoro@0: giuliomoro@0: This will ensure it is checked against the XML schema for validation. giuliomoro@0: giuliomoro@0: \subsection{Set up} giuliomoro@0: The first child node, \texttt{} specifies any one time and global parameters. It takes the following attributes: giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{interface}: String, mandatory, specifies the interface to load giuliomoro@0: \item \texttt{projectReturn}: URL, mandatory, specifies the return point. Can be a 3rd party server or the local server. Set to null to disable automatic saving. Specifying ``save.php'' will trigger the return if either the PHP or python servers are used. On error, it will always default to presenting the save on page. giuliomoro@0: \item \texttt{randomiseOrder}: Boolean, optional, if true it will randomise the order of the test pages. Default is false. giuliomoro@0: \item \texttt{testPages}: non-negative integer, optional. Specifies the number of test pages to actually test with. Combined with randomiseOrder being true will give a random set of test pages per participant from the given pool of \texttt{} nodes. Specifying 0 disables this option, default is 0. giuliomoro@0: \item \texttt{loudness}: non-positive integer, optional. Set the default LUFS target value. See \ref{sec:loudness} for more. giuliomoro@0: \item \texttt{sampleRate}: positive integer, optional. If set, the sample rate reported by the Web Audio API must match this number. See \ref{sec:samplerate}. giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: The \texttt{} node takes the following child nodes, note these must appear in this order: giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{}: Min of 0, max of 2 occurences. See \ref{sec:survey} giuliomoro@0: \item \texttt{}: Must appear only once. giuliomoro@0: \item \texttt{}: Must appear only once. giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: \subsection{Page} giuliomoro@0: \label{sec:page} giuliomoro@0: The only other first level child nodes, these specify the test pages. It takes the following attributes: giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{id}: ID, mandatory. A string which must be unique across the entire XML. It is used to identify the page on test completion as pages are returned in the results in the order they appeared, not specified. giuliomoro@0: \item \texttt{hostURL}: URL, mandatory. Used in conjuction with the \texttt{} url to specify where the audio files are located. For instance if all your files are in the directory \texttt{./test/} you can set this attribute to ``/test/'' and the \texttt{} url attribute only needs to file name. Set to ``'' if no hostURL prefix desired. giuliomoro@0: \item \texttt{randomiseOrder}: Boolean, optional. If true the audio fragments are presented randomly rather than the order specified. See \ref{sec:randomisation}. Default is false. giuliomoro@0: \item \texttt{repeatCount}: non-negative integer, optional. Specify the number of times to repeat the test page (re-present). Each presentation will appear as an individual page in the results. Default is 0. giuliomoro@0: \item \texttt{loop}: Boolean, optional. If true, the audio elements will loop synchronously with each other. See \ref{sec:looping}. Default is false. giuliomoro@0: \item \texttt{showElementComments}: Boolean, optional. If true then there will be a comment box on the test page for each audio element presented, see \ref{sec:commentboxes}. giuliomoro@0: \item \texttt{loudness}: non-positive integer, optional. Set the LUFS target value for this page. Supersedes the \texttt{} loudness attribute for this page. See \ref{sec:loudness} for more. giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: The \texttt{} node takes the following child, nodes note these must appear in this order: giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{}: Appear once or not at all. The text content of this node specifies the title of the test page, for instance \texttt{<title>John Doe's Test} giuliomoro@0: \item \texttt{}: Must appear only once. giuliomoro@0: \item \texttt{}: Minimum of one. Specifies an audio element, see \ref{sec:audioelement}. giuliomoro@0: \item \texttt{}: Min of 0, max unlimited occurences. See \ref{sec:commentboxes}. giuliomoro@0: \item \texttt{}: Min of 0, max of 2 occurences. See \ref{sec:survey} giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: \subsection{Survey} giuliomoro@0: \label{sec:survey} giuliomoro@0: These specify any survey items to be presented. The must be a maximum of two of these per \texttt{} and \texttt{} nodes. These have one attribute, location, which must be set to one of the following: before, pre, after or post. In this case before == pre and after == post. This specifies where the survey must appear before or after the node it is associated with. When a child of \texttt{} then pre/before will be shown before the first test page and after/post shown after completing the last test page. When a child of \texttt{} then pre/before is before the test commences and after/post is once the test has been submitted. giuliomoro@0: giuliomoro@0: The survey node takes as its only set of childs the \texttt{} node of which there can be any number. giuliomoro@0: giuliomoro@0: \subsubsection{Survey Entry} giuliomoro@0: These nodes have the following attributes, which vary depending on the survey type wanted: giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{id}: ID, mandatory. Must be unique across the entire XML, used to identify the response in the results. giuliomoro@0: \item \texttt{type}: String, mandatory. Must be one of the following: statement, question, checkbox, radio or number. This defines the type to show. giuliomoro@0: \item \texttt{mandatory}: Boolean, optional. Defines if the survey must have a response or not. Does not apply to statements. Default is false. giuliomoro@0: \item \texttt{min}: Number, optional. Only applies when \texttt{type="number"}, the minimum valid response. giuliomoro@0: \item \texttt{max}: Number, optional. Only applies when \texttt{type="number"}, the maximum valid response. giuliomoro@0: \item \texttt{boxsize}: String, optional. Only applies when \texttt{type="question"} and must be one of the following: normal (default), small, large or huge. giuliomoro@0: \end{itemize} giuliomoro@0: giuliomoro@0: The nodes have the following children, which vary depending on the survey type wanted. giuliomoro@0: \begin{itemize} giuliomoro@0: \item \texttt{}: Must appear only once. Its text content specifies the text to appear as the statement or question for the user to respond to. giuliomoro@0: \item \texttt{