-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9_intermediate_feedback.html
73 lines (53 loc) · 2.64 KB
/
9_intermediate_feedback.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0">
<title>Intermediate Feedback</title>
<script src="jspsych-6.1.0/jspsych.js" ></script>
<script src="jspsych-6.1.0/plugins/jspsych-survey-text.js"></script>
<script src="./extra_functions/helper_functions.js"> </script>
<script src="jatos.js"></script>
<link rel="stylesheet" href="jspsych-6.1.0/css/jspsych.css" type="text/css"></link>
<link rel="stylesheet" href="./extra_files/congen.css" type="text/css"></link>
</head>
<body></body>
<script>
//start timeline
jatos.onLoad(function() {
if (jatos.studySessionData.debug){
jatos.startComponentByPos(jatos.studySessionData.script_comp_pos.qc_checks)
} else {
// Create the trials
var intermediate_feedback = {
type: 'survey-text',
questions: [
{prompt: "Did you encounter any technical difficulties or display issues (such as cut off text or images, or images loading too slowly) in the previous session? <br> If yes, please briefly describe.", rows: 10, columns: 40},
],
button_label: "Continue"
};
jsPsych.init({
timeline: [intermediate_feedback],
on_finish: function() {
// What phase is this?
[curr_phase,phase_string,curr_session,curr_global_trial] = getPhaseAndSession()
// Record data
let dataOut = jsPsych.data.get().values()[0];
// Add infor about which phase and which session this is
dataOut.phase = curr_phase
dataOut.session = curr_session
jatos.studySessionData.outputData.intermediate_feedback_results.push(dataOut)
jatos.submitResultData(
"[int_fb_start---" +
JSON.stringify(jatos.studySessionData) +
"---int_fb_end]", function(){
jatos.startComponentByPos(jatos.studySessionData.script_comp_pos.qc_checks);
}
);
// jsPsych.data.displayData();
} // on_finish
}); // jsPsych init
}
});
</script>
</html>