-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7_post_practice_instructions.html
87 lines (72 loc) · 4.38 KB
/
7_post_practice_instructions.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
<!DOCTYPE html>
<html>
<head>
<title>post practice instructions</title>
<script src="jatos.js"></script>
<script src="./jspsych-6.1.0/jspsych.js"></script>
<script src="./jspsych-6.1.0/plugins/jspsych-instructions.js"></script>
<script src="./extra_functions/helper_functions.js"> </script>
<link href="./jspsych-6.1.0/css/jspsych.css" rel="stylesheet" type="text/css"></link>
<link rel="stylesheet" href="./extra_files/congen.css" type="text/css"></link>
</head>
<body></body>
<script>
jatos.onLoad(function() {
[curr_phase,phase_string,curr_session,curr_global_trial] = getPhaseAndSession()
let middle_sentence = {
phase_1: '<p><b>After that, if your learning score for each toy is '+
jatos.studySessionData.training_criterion +'% or more, you will move to phase 2! </b></p>',
phase_2: '<p><b>After that, if your learning score for each toy is '+
jatos.studySessionData.training_criterion +'% or more, you will move to phase 3! </b></p>',
phase_3: '<p><b>After that, if your learning score for each toy is ' +
jatos.studySessionData.training_criterion +'% or more, you will move to the debriefing survey, ' +
'after which the experiment is over! </b></p>',
}
var practice_trials_end = {
type: "instructions",
pages: [
'<div class= "header">'+
'<h1> Instructions </h1>'+
'</div>'+
'<div class="instruct">'+
'<p>This is the end of the practice trials. </p>' +
'<p>You will now start the 1st session of phase '+ curr_phase +', with '+
+ jatos.studySessionData.inputData.nTrials +
' trials! </p>' +
'<p>You will have to do a minimum of '+
jatos.studySessionData.qc_criteria.min_training_sess + ' training sessons.</p>' +
middle_sentence[phase_string] +
'<p>If not, you will get more training sessions (maximum ' + jatos.studySessionData.qc_criteria.max_training_sess + '). </p>' +
'<p>Keep in mind, the scores reset at the start of each session! </p>' +
'</div>',
'<div class= "header">'+
'<h1> Instructions </h1>'+
'</div>'+
'<div class="instruct"> <br>'+
'<p>Please note that your responses are monitored automatically.</p>' +
'<p><b>You might be disqualified during the study if your responses have signs of inattention.</p>' +
'<p>If you do not reach ' + jatos.studySessionData.training_criterion + '% on each toy after ' + jatos.studySessionData.qc_criteria.max_training_sess + ' sessions of playing the game, we will unfortunately have to stop the experiment and pay you only for the sessions completed.</b></p>' +
'<p><br>Your data will help us understand how the human brain works!</p>' +
'<p>Please be attentive and complete this game truthfully. Thank you so much!</p>' +
'<p> Click next to start the 1st session! Good luck! </p>' +
'</div>',
],
show_clickable_nav: true,
button_label_next: "<span style='color: blue';> <strong> Next </stong></span>"
};
jsPsych.init({
timeline: [practice_trials_end],
on_finish: function(data) {
// Make JATOS remember that this session was run
jatos.studySessionData.latestFinishedComponentId = jatos.componentId;
jatos.studySessionData.latestFinishedComponentPos = jatos.componentPos;
// Add the data from this component to the studySessionData.outputData
jatos.studySessionData.outputData.post_practice_instructions_results[phase_string] = jsPsych.data.get().values()[0];
jatos.submitResultData("[post_ex_trials_start---" +
JSON.stringify(jatos.studySessionData) +
"---post_ex_trials_end]", jatos.startNextComponent);
}
});
});
</script>
</html>