Last active
October 13, 2023 01:29
-
-
Save kishiyamat/cd62e2d58354338c753eab616c3ad930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PennController.ResetPrefix(null); // Shorten command names (keep this line here)) | |
// DebugOff() // Uncomment this line only when you are 100% done designing your experiment | |
// NOTE: Empty project からではなく Self-Paced Reading を選択してから作業する | |
// これは PennController.js が機能しないため。もしEmptyから作成したい場合、以下をDLしてULする。 | |
// https://github.com/PennController/penncontroller/blob/master/releases/2.0/PennController.js | |
// First show instructions, then experiment trials, send results and show end screen | |
Sequence("instructions", "experiment", SendResults(), "end") | |
// This is run at the beginning of each trial | |
// Declare a global Var element "ID" in which we will store the participant's ID | |
Header(newVar("ID").global()) | |
.log("id", getVar("ID")) // Add the ID to all trials' results lines | |
// Instructions | |
newTrial("instructions", | |
// Automatically print all Text elements, centered (これは大事) | |
defaultText.center().print(), | |
// 表示させる内容 | |
newText("Welcome!"+"<br>"+ | |
"In this task, you will have to read few sentences."+"<br>"+ | |
"Are you ready?"+"<br>"+ | |
"Please type in your ID below and then click on the Start button "+ | |
"to start the experiment."), | |
// Save ID -> Validate -> Store | |
newTextInput("inputID", "").center().print(), | |
// Only validate a click on Start when inputID has been filled | |
newButton("Start").center().print().wait(getTextInput("inputID").testNot.text("")), | |
// Store the text from inputID into the Var element in global scope | |
getVar("ID").set(getTextInput("inputID")) | |
) | |
newTrial("experiment", | |
newController( | |
"AcceptabilityJudgment", | |
{s : "Who do you think met Sue?", | |
as: ["1", "2", "3", "4", "5", "6", "7"], | |
presentAsScale: true, | |
leftComment: "Not Natural", | |
rightComment: "Natural"}) | |
.print().log().wait().remove(), | |
newButton("I'm done") | |
.print().wait() | |
) | |
// Final screen | |
newTrial("end", | |
newText("Thank you for your participation!").center().print(), | |
// This link a placeholder: replace it with a URL provided by your participant-pooling platform | |
// newText("<p><a href='https://www.pcibex.net/' target='_blank'>" + | |
// "Click here to validate your submission</a></p>").center().print(), | |
// Trick: stay on this trial forever (until tab is closed) | |
newButton().wait() | |
) | |
.setOption("countsForProgressBar",false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment