n@156
|
1 <!DOCTYPE html>
|
n@156
|
2 <html lang="en">
|
n@156
|
3 <head>
|
n@156
|
4 <meta charset="utf-8">
|
n@156
|
5
|
n@156
|
6 <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
|
n@156
|
7 Remove this if you use the .htaccess -->
|
n@156
|
8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
n@156
|
9
|
n@156
|
10 <title>WAET Create Test</title>
|
n@156
|
11 <meta name="description" content="">
|
n@156
|
12 <meta name="author" content="">
|
n@156
|
13
|
n@156
|
14 <meta name="viewport" content="width=device-width; initial-scale=1.0">
|
n@157
|
15
|
n@157
|
16 <script type="text/javascript">
|
n@157
|
17 // To aid 'one-page set-up' all scripts and CSS must be included directly in this file!
|
n@157
|
18 var topLevel;
|
n@157
|
19 window.onload = function() {
|
n@157
|
20 // Initialise page
|
n@157
|
21 topLevel = document.getElementById('topLevelBody');
|
n@157
|
22 var setup = document.createElement('div');
|
n@157
|
23 setup.id = 'setupTagDiv';
|
n@157
|
24
|
n@157
|
25 };
|
n@157
|
26
|
n@157
|
27 function attributePair(string, type){
|
n@157
|
28 var id = document.createElement("span");
|
n@157
|
29 id.textContent = string;
|
n@157
|
30 var input = document.createElement("input");
|
n@157
|
31 input.type = type;
|
n@157
|
32 return [id, input];
|
n@157
|
33 }
|
n@157
|
34
|
n@157
|
35 function questionNode() {
|
n@157
|
36 var node = document.createElement("div");
|
n@157
|
37 node.setAttribute('class','head');
|
n@157
|
38 node.setAttribute('name','question-node');
|
n@157
|
39 var nodeTitle = document.createElement("span");
|
n@157
|
40 nodeTitle.textContent = "Question";
|
n@157
|
41 var attributes = document.createElement("div");
|
n@157
|
42 attributes.setAttribute('class','attrib');
|
n@157
|
43 var id = attributePair("ID:","text");
|
n@157
|
44 var question = attributePair("Question:","text");
|
n@157
|
45 node.appendChild(nodeTitle);
|
n@157
|
46 id.forEach(function(item){attributes.appendChild(item);},false);
|
n@157
|
47 question.forEach(function(item){attributes.appendChild(item);},false);
|
n@157
|
48 node.appendChild(attributes);
|
n@157
|
49 return node;
|
n@157
|
50 }
|
n@157
|
51
|
n@157
|
52 function statementNode() {
|
n@157
|
53 var node = document.createElement("div");
|
n@157
|
54 node.setAttribute('class','head');
|
n@157
|
55 node.setAttribute('name','question-node');
|
n@157
|
56 var nodeTitle = document.createElement("span");
|
n@157
|
57 nodeTitle.textContent = "Statement";
|
n@157
|
58 var attributes = document.createElement("div");
|
n@157
|
59 attributes.setAttribute('class','attrib');
|
n@157
|
60 var statement = attributePair("Statement:","text");
|
n@157
|
61 node.appendChild(nodeTitle);
|
n@157
|
62 statement.forEach(function(item){attributes.appendChild(item);},false);
|
n@157
|
63 node.appendChild(attributes);
|
n@157
|
64 return node;
|
n@157
|
65 }
|
n@157
|
66
|
n@157
|
67 function audioHolderNode() {
|
n@157
|
68 var audioHolderCounts = document.getElementsByName("audio-holder").length;
|
n@157
|
69 var node = document.createElement("div");
|
n@157
|
70 node.setAttribute("class","head");
|
n@157
|
71 node.setAttribute("name","audio-holder");
|
n@157
|
72 node.setAttribute("id","audio-holder-"+length);
|
n@157
|
73 var nodeTitle = document.createElement("span");
|
n@157
|
74 nodeTitle.textContent = "Audio Holder "+(length+1);
|
n@157
|
75
|
n@157
|
76 var attributes = document.createElement("div");
|
n@157
|
77 attributes.setAttribute('class','attrib');
|
n@157
|
78 var id = attributePair("ID:","text");
|
n@157
|
79 id[1].value=length;
|
n@157
|
80 }
|
n@157
|
81 </script>
|
n@157
|
82 <style>
|
n@157
|
83 div {
|
n@157
|
84 padding: 2px;
|
n@157
|
85 margin-top: 2px;
|
n@157
|
86 margin-bottom: 2px;
|
n@157
|
87 }
|
n@157
|
88 div.head{
|
n@157
|
89 margin-left: 10px;
|
n@157
|
90 border: black;
|
n@157
|
91 border-width: 2px;
|
n@157
|
92 border-style: solid;
|
n@157
|
93 }
|
n@157
|
94 div.attrib{
|
n@157
|
95 margin-left:25px;
|
n@157
|
96 border: black;
|
n@157
|
97 border-width: 2px;
|
n@157
|
98 border-style: dashed;
|
n@157
|
99 margin-bottom: 10px;
|
n@157
|
100 }
|
n@157
|
101 </style>
|
n@157
|
102
|
n@156
|
103 </head>
|
n@156
|
104
|
n@156
|
105 <body>
|
n@157
|
106 <h1>Create Test Setup XML</h1>
|
n@157
|
107 <div id="topLevelBody" align="left">
|
n@156
|
108 <!-- Interface goes here -->
|
n@157
|
109 <div name='test-setup'>
|
n@157
|
110 <div id="setup" class="head">
|
n@157
|
111 <h2>Setup Tag</h2>
|
n@157
|
112 <div id="setup-attribs" class="attrib">
|
n@157
|
113 <span>Interface</span>
|
n@157
|
114 <select id="interface">
|
n@157
|
115 <option value='APE'>APE</option>
|
n@157
|
116 </select>
|
n@157
|
117 <span>Project Return</span>
|
n@157
|
118 <input type="text" id="projectReturn">
|
n@157
|
119 <span>Randomise Test Page Order</span>
|
n@157
|
120 <input id="randomisePageOrder" type="checkbox" value="false">
|
n@157
|
121 <span>Collect Session Metrics</span>
|
n@157
|
122 <input id="collectMetrics" type="checkbox">
|
n@157
|
123 </div>
|
n@157
|
124 <div id="globalPreTest" class="head">
|
n@157
|
125 <h3>Pre Test</h3>
|
n@157
|
126 <button id="addPreTestQ" onclick="event.srcElement.parentElement.appendChild(questionNode());">Add Pre Test Question</button>
|
n@157
|
127 <button id="addPreTestS" onclick="event.srcElement.parentElement.appendChild(statementNode());">Add Pre Test Statement</button>
|
n@157
|
128 </div>
|
n@157
|
129 <div id="globalPostTest" class="head">
|
n@157
|
130 <h3>Post Test</h3>
|
n@157
|
131 <button id="addPreTestQ" onclick="event.srcElement.parentElement.appendChild(questionNode());">Add Post Test Question</button>
|
n@157
|
132 <button id="addPreTestS" onclick="event.srcElement.parentElement.appendChild(statementNode());">Add Post Test Statement</button>
|
n@157
|
133 </div>
|
n@157
|
134 <div id="globalMetric" class="head">
|
n@157
|
135 <h3>Global Metrics</h3>
|
n@157
|
136 <div id="globalMetric-attrib" class="attrib">
|
n@157
|
137 <span>Test Timer</span>
|
n@157
|
138 <input type="checkbox" id="testTimer" />
|
n@157
|
139 <span>Element Playback Timer</span>
|
n@157
|
140 <input type="checkbox" id="elementTimer" />
|
n@157
|
141 <span>Element Initial Position</span>
|
n@157
|
142 <input type="checkbox" id="elementInitialPosition" />
|
n@157
|
143 <span>Element Tracker</span>
|
n@157
|
144 <input type="checkbox" id="elementTracker" />
|
n@157
|
145 <span>Element Flag Listened To</span>
|
n@157
|
146 <input type="checkbox" id="elementFlagListened" />
|
n@157
|
147 <span>Element Flag Moved</span>
|
n@157
|
148 <input type="checkbox" id="elementFlagMoved" />
|
n@157
|
149 </div>
|
n@157
|
150 </div>
|
n@157
|
151 <button id="addAudioHolder">Add AudioHolder / Test Page</button>
|
n@157
|
152 </div>
|
n@157
|
153 </div>
|
n@156
|
154 </div>
|
n@156
|
155 </body>
|
n@156
|
156 </html>
|