This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
executable file
·177 lines (135 loc) · 6.75 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
session_start();
$token = md5(uniqid(rand(), TRUE));
$_SESSION['token'] = $token;
$_SESSION['token_time'] = time();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>NASA Task Load Index</title>
<!--
This implements the NASA TLX via a single web page using JavaScript.
It first collects the user's rating for 6 scale, the user can
click on one of 20 different positions equating to a rating of 5-100
in increments of 5. The user then selects the more important scale
in 15 pairings presented in random order.
Copyright 2011 by Keith Vertanen
http://www.keithv.com/software/nasa_tlx
-->
<script language="JavaScript" type="text/javascript">
<!--
// Participant vars
var participant_id = "<?php echo $_GET['id']; ?>";
var token = "<?php echo $token; ?>";
// Create a set of parallel arrays for each of the scales
var scale = new Array();
var left = new Array();
var right = new Array();
var def = new Array();
var NUM_SCALES = 6;
scale[0] = "Mental Demand";
left[0] = "Low";
right[0] = "High";
def[0] = "<i class='icon-question-sign icon-2x' rel='tooltip' title='How much mental and perceptual activity was required (e.g. thinking, deciding, calculating, remembering, looking, searching, etc)? Was the task easy or demanding, simple or complex, exacting or forgiving?'></i>";
scale[1] = "Physical Demand";
left[1] = "Low";
right[1] = "High";
def[1] = "<i class='icon-question-sign icon-2x' rel='tooltip' title='How much physical activity was required (e.g. pushing, pulling, turning, controlling, activating, etc)? Was the task easy or demanding, slow or brisk, slack or strenuous, restful or laborious?'></i>";
scale[2] = "Temporal Demand";
left[2] = "Low";
right[2] = "High";
def[2] = "<i class='icon-question-sign icon-2x' rel='tooltip' title='How much time pressure did you feel due to the rate of pace at which the tasks or task elements occurred? Was the pace slow and leisurely or rapid and frantic?'></i>";
scale[3] = "Performance";
left[3] = "Good";
right[3] = "Poor";
def[3] = "<i class='icon-question-sign icon-2x' rel='tooltip' title='How successful do you think you were in accomplishing the goals of the task set by the experimenter (or yourself)? How satisfied were you with your performance in accomplishing these goals?'></i>";
scale[4] = "Effort";
left[4] = "Low";
right[4] = "High";
def[4] = "<i class='icon-question-sign icon-2x' rel='tooltip' title='How hard did you have to work (mentally and physically) to accomplish your level of performance?'></i>";
scale[5] = "Frustration";
left[5] = "Low";
right[5] = "High";
def[5] = "<i class='icon-question-sign icon-2x' rel='tooltip' title='How insecure, discouraged, irritated, stressed and annoyed versus secure, gratified, content, relaxed and complacent did you feel during the task?'></i>";
var scale_error = 'A value must be selected for every scale!';
// -->
</script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/nasatlx.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/nasatlx.js"></script>
<script>
$(document).ready(function(){
$("[rel=tooltip]").tooltip({ placement: 'right', delay: 0});
});
</script>
</head>
<body onload="onLoad();">
<div id="wrap">
<div class="container">
<div class="page-header">
<h1>NASA-TLX</h1>
</div>
<div id="div_part1">
<p class="lead">Click on each scale at the point that best indicates your experience of the task.</p>
<p>In other words: think back on what was easy and what was difficult or annoying about the task. How low or high were the mental demands, physical demands, etc... Drag your cursor over the question marks for more information.</p>
<p><strong>There are no right or wrong answers. If something is not entirely clear, follow your intuition.</strong></p>
<div id="scale0"></div>
<div id="scale1"></div>
<div id="scale2"></div>
<div id="scale3"></div>
<div id="scale4"></div>
<div id="scale5"></div>
<br>
<input class="next btn btn-primary pull-right" id="next" type="button" value="Continue >>" onclick="buttonPart1();">
</div>
<div id="div_part2" style="display:none">
<p class="lead">One each of the following 15 screens, click on the scale title that represents the more important contributor to workload for the task.</p>
<p><strong>In other words: which factor made the task more tedious than the other?</strong></p>
<br>
<input class="next btn btn-primary pull-right" id="next" type="button" value="Continue >>" onclick="buttonPart2();">
</div>
<div id="div_part3" style="display:none">
<p class="lead">Click on the factor that represents the more important contributor to workload for the task.</p>
<p><strong>In other words: which factor made the task more tedious than the other?</strong></p>
<br>
<table>
<tbody><tr>
<td><input class="pair" id="pair1" type="button" value="" onclick="buttonPair1();"> </td>
<td class="def"><div id="pair1_def"></div></td>
</tr>
<tr>
<td align="center"> or </td>
<td></td>
</tr>
<tr>
<td><input class="pair" id="pair2" type="button" value="" onclick="buttonPair2();"></td>
<td class="def"><div id="pair2_def"></div></td>
</tr>
</tbody></table>
</div>
<div id="div_part4" style="display:none">
<p class="lead">Results</p>
<div id="success" class="alert alert-success" style="display:none">
<strong>All done!</strong> Results submitted. Thank you for participating.
</div>
<div id="error" class="alert alert-danger" style="display:none">
<strong>Error!</strong> Something went wrong when submitting the results:<br/>
<span id='error_msg'></span>
</div>
<div id="results">
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted credit"></p>
</div>
</div>
</body>
</html>