init
python
This commit is contained in:
79
PCSurvey/PCstatic/html/feedback.html
Normal file
79
PCSurvey/PCstatic/html/feedback.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 20px;
|
||||
background-color: #f4f4f4;
|
||||
color: #333;
|
||||
}
|
||||
button {
|
||||
display: block;
|
||||
width: 20%;
|
||||
padding: 10px;
|
||||
background: #bc0ba8;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
section {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
button:not(:disabled):hover {
|
||||
background: #5d0570;
|
||||
}
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<section>
|
||||
<h1 id="caption">Incorrect! You selected the wrong letter.</h1>
|
||||
<h3 id="info-text">Don't worry, you can try again!</h3>
|
||||
</section>
|
||||
|
||||
<button id="end-trial">Restart</button>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
var responses = JSON.parse(
|
||||
jsPsych.data.get().last(1).select("responses").values
|
||||
);
|
||||
var controlLetter = jsPsych.data.get().last(1).select("controlLetter1")
|
||||
.values[0];
|
||||
var controlLetter2 = jsPsych.data.get().last(1).select("controlLetter2")
|
||||
.values[0];
|
||||
|
||||
var controlLetter3 = jsPsych.data.get().last(1).select("controlLetter3")
|
||||
.values[0];
|
||||
|
||||
if (responses.Q1 == controlLetter && responses.Q2 == controlLetter2 && responses.Q3 == controlLetter3) {
|
||||
document.getElementById("caption").innerText = "Correct!";
|
||||
document.getElementById("info-text").innerText =
|
||||
"While searching for control letters, remember that rating the cloud quality is the top priority.";
|
||||
document.getElementById("end-trial").innerText = "Let's go!";
|
||||
} else {
|
||||
document.getElementById("caption").innerText =
|
||||
"Incorrect! You selected the wrong letter.";
|
||||
document.getElementById("info-text").innerText =
|
||||
"Don't worry, you can try again!";
|
||||
document.getElementById("end-trial").innerText = "Restart";
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user