-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·140 lines (131 loc) · 7.42 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mind Perception Survey</title>
<script src="jspsych-6.0/jspsych.js"></script>
<script src="jspsych-6.0/plugins/jspsych-survey-likert.js"></script>
<script src="jspsych-6.0/plugins/jspsych-survey-multi-choice.js"></script>
<script src="jspsych-6.0/plugins/jspsych-text.js"></script>
<script src="serverComm.js"></script>
<script src="config.js"></script>
<link href="jspsych-6.0/css/jspsych.css" rel="stylesheet" type="text/css"></link>
<style>
.jspsych-content {
max-width: 75%;
}
p {
margin-left: 20%;
margin-right: 20%;
}
</style>
</head>
<body></body>
<script>
/* generate a random subject ID */
var subject_id = jsPsych.randomization.randomID(45);
jsPsych.data.addProperties({
subject_id: subject_id,
term: config.term,
year: config.year
});
/* array containing character objects with name and description properties */
var characters = [
{ name: "is a green frog", description: "<h1>A Green Frog</h1><p>Found throughout eastern North America, "
+"this classic \"pond frog\" is medium-sized and green or bronze in color. "
+"Daily life includes seeking out permanent ponds or slow streams with "
+"plenty of vegetation.</p>", data: {character:"frog"}},
{ name: "is Charlie", description: "<h1>Charlie</h1><p>A 3-year-old Springer spaniel and "
+"a beloved member of the Graham family.</p>", data: {character:"Charlie"}},
// { name: "is Toby", description: "<h1>Toby</h1><p>A two-year-old chimpanzee living at an "
// +"outdoor laboratory in Uganda.</p>", data: {character:"Toby"}},
// { name: "is a 7 week fetus", description: "<h1>A 7 Week Fetus</h1><p>At 7 weeks, a human fetus "
// +"is almost half an inch long--roughly the size of a raspberry.</p>", data: {character:"fetus"}},
{ name: "is Nicholas Gannon", description: "<h1>Nicholas Gannon</h1><p>A five-month-old baby.</p>", data: {character:"Nicholas Gannon"}},
// { name: "is Samantha Hill", description: "<h1>Samantha Hill</h1><p>A five-year-old girl who lives "
// +"with her parents and older sister Jennifer.</p>", data: {character:"Samantha Hill"}},
{ name: "is Sharon Harvey", description: "<h1>Sharon Harvey</h1><p>A thirty-eight-year-old, "
+"works at an advertising agency in Chicago.</p>", data: {character:"Sharon Harvey"}},
// { name: "is Todd Billingsly", description: "<h1>Todd Billingsly</h1><p>A thirty-year-old accountant "
// +"who lives in New York City.</p>", data: {character:"Todd Billingsly"}},
// { name: "are you", description: "<h1>You</h1><p>When you look into a mirror, please consider "
// +"how you, yourself, would compare with the other characters presented.</p>", data: {character:"You"}},
{ name: "is Gerald Schiff", description: "<h1>Gerald Schiff</h1><p>Gerald has been in a persistent vegetative "
+"state (PVS) for the past six months. Although he has severe brain damage--Gerald does not "
+"appear to communicate with others or make purposeful movements--his basic bodily functions "
+"(such as breathing, sleeping, and circulation) are preserved.</p>", data: {character:"Gerald Schiff"}},
// { name: "is Delores Gleitman", description: "<h1>Delores Gleitman</h1><p>Delores recently passed away at the age "
// +"of 65. As you complete the survey, please draw upon your own personal beliefs about people "
// +"who have passed away.</p>", data: {character:"Delores Gleitman"}},
// { name: "is God", description: "<h1>God</h1><p>Many people believe that God is the creator of the universe "
// +"and the ultimate source of knowledge, power, and love. However, please draw upon your own "
// +"personal beliefs about God.</p>", data: {character:"God"}},
{ name: "is Kismet", description: "<h1>Kismet</h1><p>Kismet is part of a new class of 'sociable' robots "
+"that can engage people in natural interaction. To do this, Kismet perceives a variety of "
+"natural social signals from sound and sight, and delivers his own signals back to the human "
+"partner through gaze direction, facial expression, body posture, and vocal babbles.</p>", data: {character:"Kismet"}}
];
/* function that returns an array of Strings; each jsPsych.timelineVariable() call
returns a String value, rather than the function to retrieve that String had
'true' not been used as the second parameter for the function */
var questions = function(){
return [
// "How capable "+jsPsych.timelineVariable('name',true)+" of conveying thoughts and feelings?",
"How capable "+jsPsych.timelineVariable('name',true)+" of having experiences and being aware of things?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of longing or hoping for things?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of experiencing embarrassment?",
"How capable "+jsPsych.timelineVariable('name',true)+" of understanding how others are feeling?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of feeling afraid or fearful?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of feeling hungry?",
"How capable "+jsPsych.timelineVariable('name',true)+" of experiencing joy?",
"How capable "+jsPsych.timelineVariable('name',true)+" of remembering things?",
"How capable "+jsPsych.timelineVariable('name',true)+" of telling right from wrong and choosing to do the right thing?",
"How capable "+jsPsych.timelineVariable('name',true)+" of experiencing physical or emotional pain?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of having personality traits that make it unique from others?",
"How capable "+jsPsych.timelineVariable('name',true)+" of making plans and working towards a goal?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of experiencing physical or emotional pleasure?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of experiencing pride?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of experiencing violent or uncontrolled anger?",
// "How capable "+jsPsych.timelineVariable('name',true)+" of exercising self-restraint over desires, emotions, or impulses?",
"How capable "+jsPsych.timelineVariable('name',true)+" of thinking?",
];
}
/* the five-point scale to be used */
var scale = [ "Entirely Incapable", " ", " ", " ", " ", "Entirely Capable"];
var instructor_select = {
type: 'survey-multi-choice',
questions: ['Select your instructor:'],
options: [config.instructors],
on_finish: function(data) {
var instructor = JSON.parse(data.responses).Q0;
jsPsych.data.addProperties({instructor:instructor});
}
}
var introduction_block = {
type: 'text',
text: "<h1>What kinds of things have minds?</h1><p>It's assumed that things "
+"simply have more or less of a mind. For this survey, you will be judging "
+"18 individual mental capacties for 13 characters. Press any key to begin.</p>"
};
var survey_procedure = {
timeline: [
{
type: 'survey-likert',
questions: questions,
labels: [ scale, scale, scale, scale, scale, scale, scale, scale, scale,
scale, scale, scale, scale, scale, scale, scale, scale, scale ],
preamble: jsPsych.timelineVariable('description'),
data: jsPsych.timelineVariable('data')
}
],
timeline_variables: characters,
randomize_order: true
};
jsPsych.init({
timeline: [ instructor_select, introduction_block, survey_procedure ],
on_data_update: function(data) {
serverComm.save_data([data]);
}
});
</script>
</html>