Forum Replies Created
-
AuthorPosts
-
adamliter
ParticipantThanks, Jeremy! I’m just getting back to this after working on some other stuff. I can no longer see the demo experiment you posted because it uses
DashedSentence
, but I’ve tried to implement your suggestions and it seems like it is mostly working with the new PennController.js. The only issue is that there is no “Redo” button. The only thing I see at the end of the practice trial is the “Proceed” button. How can I add a “Redo” button so that they could redo the practice trial if they want to. Thanks in advance!March 2, 2021 at 12:16 pm in reply to: Automatically start recording at end of trial and have a submit button #6682adamliter
ParticipantThanks, Jeremy. Removing the superfluous
once
did not fix the issue, but adding a Timer element did. As always, thank you so much for your help. I really appreciate it!March 1, 2021 at 9:22 pm in reply to: Automatically start recording at end of trial and have a submit button #6680adamliter
ParticipantThanks for this suggestion, Jeremy! I had forgotten about the
callback
method. However, after trying this, all of my recordings now seem to be empty. The zip files are saved to my server, but when I unzip them I get the following error (using the command line utilityunzip
on macOS:warning [uploads/ef29bba9-9e2c-3325-5b27-5ee7bff1179a.zip]: zipfile is empty
Any idea why that might be the case?adamliter
ParticipantI just created an account with the new
farm.pcibex.net
and moved things to there, and it does seem to be working.adamliter
ParticipantHmm, that’s interesting. I do have
"trials"
in theSequence
command. I’ve pasted the full code below. I do still have this onexpt.pcibex.net
, notfarm.pcibex.net
, and I noticed the version of PennController I have is1.8-dev
, whereas it looks like the PennController version onfarm.pcibex.net
is1.9
. Could that be the issue?const ParticipantID = b64_md5((Date.now() + Math.random()).toString()); //PennController.DebugOff(); PennController.Sequence("setcounter", "consent", "demographics", "description", "trials", "send", "exit"); PennController.ResetPrefix(null); PennController("consent", newHtml("consent form", "consent.html") .print() , newText("my_consent_clear", "<br/><br/>") .print() , newButton("consent button", "By clicking this button, I consent to participate in this study.") .settings.center() .print() .wait() ) .log("ParticipantID", ParticipantID); PennController("demographics", defaultText .print() , newText("age_text", "What is your age?") , newTextInput("age_response") .settings.log() .settings.length(3) .print() , newText("my_age_clear", "<br/><br/>") , newText("live_in_text", "Did you live in the United States from birth until (at least) age 13?") , newScale("live_in_response", "Yes", "No") .settings.log() .settings.labelsPosition("left") .settings.size("auto") .print() , newText("my_live_in_clear", "<br/><br/>") , newText("native_lang_text", "Did your parents/guardians speak English to you at home?") , newScale("native_lang_response", "Yes", "No") .settings.log() .settings.labelsPosition("left") .settings.size("auto") .print() , newText("my_native_lang_clear", "<br/><br/>") , newText("town_text", "Which state did you grow up in (two letter abbreviation)?") , newTextInput("town_response") .settings.log() .settings.length(100) .print() , newText("my_town_clear", "<br/><br/>") , newButton("submit", "Submit") .print() .wait(getTextInput("age_response").testNot.text("") && getScale("live_in_response").test.selected() && getScale("native_lang_response").test.selected() && getTextInput("town_response").testNot.text("")) ) .log("ParticipantID", ParticipantID); PennController("description", newHtml("description", "description.html") .print() , newButton("start", "Begin experiment") .settings.center() .print() .wait() ) .log("ParticipantID", ParticipantID); PennController.Template("final_pilot_03_cnp_subj_items_all_lists.csv", row => PennController("trials", defaultText .settings.center() .print() , newController("AcceptabilityJudgment", {s: row.Sentence, as: ["1", "2", "3", "4", "5", "6", "7"], presentAsScale: true, leftComment: "very bad", rightComment: "very good"}) .print() .log() .wait() .remove() , (row.Question != "NA" ? newController("Question", {q: row.Question, as: ["Yes", "No"], hasCorrect: row.Answer}) .print() .log() .wait() .remove() : {}) ) .log("ParticipantID", ParticipantID) .log("Group", row.Group) .log("UniqID", row.UniqID) .log("Sentence", '"' + row.Sentence + '"') .log("Question", '"' + row.Question + '"') .log("Answer", row.Answer) ); PennController.SendResults("send"); PennController.SetCounter("setcounter"); PennController("exit", defaultText .print() , newText("thankyou", "<h1>Thank you!</h1><p>Thank you for participating in our study.</p>") , newText("code", "<p>To receive payment through Amazon Mechanical Turk, enter your unique identifying code in the other tab/window.</p><p>Your unique identifying code is: ".concat(ParticipantID, "</p>")) , newText("close", "<p>After copying your unique identifying code above, you can close this tab/window. Your results have been saved.</p>") , // A faux timer that is never started // in order to stay on page forever newTimer("faux", 10) .wait() ) .log("ParticipantID", ParticipantID) .setOption("countsForProgressBar", false);
adamliter
ParticipantSorry, I have another followup question. 🙂
I’m currently trying to use newController with the AcceptabilityJudgment and Question controllers from Ibex, but nothing shows up on the screen. I also don’t see any errors with the debugger. Do you have any idea what might be going on? Here’s what I have:
PennController.Template("final_pilot_03_cnp_subj_items_all_lists.csv", row => PennController("trials", defaultText .settings.center() .print() , newController("AcceptabilityJudgment", {s: row.Sentence, as: ["1", "2", "3", "4", "5", "6", "7"], presentAsScale: true, leftComment: "very bad", rightComment: "very good"}) .print() .log() .wait() .remove() , (row.Question != "NA" ? newController("Question", {s: row.Question, as: ["Yes", "No"], hasCorrect: row.Answer}) .print() .log() .wait() .remove() : {}) ) .log("ParticipantID", ParticipantID) .log("Group", row.Group) .log("UniqID", row.UniqID) .log("Sentence", '"' + row.Sentence + '"') .log("Question", '"' + row.Question + '"') .log("Answer", row.Answer) );
adamliter
ParticipantThanks! I did not know about the ability to inject controllers into PennController trials. Thanks for the reference, Jeremy
adamliter
ParticipantHi Jeremy,
I have a followup question to this for a different experiment. Is it possible to use the syntax of “
Template( row => ["label", "controllername", options, "controllername", options, ...] )
” with both controllers from Ibex but also the newTrial/PennController command?I’m trying to do an experiment where, in one trial, I (i) play an audio file, (ii) present a sentence using rapid serial visual presentation (RSVP), then (iii) have the participant type something in a text box, and finally (iv) collect a recording from them at the end of the trial. It seems like there are straightforward ways to do everything but the RSVP with PennController. I was thinking I could use the DashedSentence controller with the display set to “in place” from Ibex to do the RSVP, but I’m not sure if it’s possible to mix these things. Given the expected syntax, it doesn’t seem like
Template(row => ["trials", newTrial("trial-begin", newAudio("trial-begin", "trial-begin.mp3")), {}, DashedSentence, {s: row.sentence}, ... ]);
unfortunately. Am I correct in thinking this won’t work? If not, do you have any suggestions for a good way to do this? Maybe it’s easier to do RSVP of a full sentence with just PCIbex than I think. Thanks again in advance for your time!November 30, 2020 at 3:50 pm in reply to: Trying to set a unique participant ID/code for Amazon Mechanical Turk payment #6412adamliter
ParticipantThanks Jeremy! I really appreciate it. That seems to be working well.
November 30, 2020 at 1:23 pm in reply to: Trying to set a unique participant ID/code for Amazon Mechanical Turk payment #6410adamliter
ParticipantThanks Jeremy! I really appreciate how quick you always are to respond. 🙂
I have a (hopefully) quick followup question. I’m trying to access the value of “ParticipantID” inside of a
newText
element. I know this is possible by calling something like.after.text(getVar(...))
and.before.text(getVar(...))
on thenewText
element, but I’d rather not do this because it inserts a bunch of CSS around the element. I want something like this, but this currently returnsundefined
rather than the actual value of “ParticipantID”:PennController("exit", defaultText .print() , newText("code", "<p>Your unique identifying code is: ".concat(getVar("ParticipantID").value, "</p>")) );
November 30, 2020 at 12:26 pm in reply to: Trying to set a unique participant ID/code for Amazon Mechanical Turk payment #6405adamliter
ParticipantIt seems I misunderstood the b64_md5 algorithm. What I really wanted was this:
PennController("consent", newVar("ParticipantID", b64_md5((Date.now() + Math.random()).toString())) .global() ...
adamliter
ParticipantHi Jeremy,
Thanks for your quick response as always. Yes, just deleting the
"qst"
label gives me the result that I was trying to achieve. I really appreciate your help. Thank you!adamliter
ParticipantThanks, Jeremy. I really appreciate it. Don’t worry too much about finding a hack. It’s easy enough to add the information back in during the data analysis, since the sentence itself is recorded, but it would be nice if it were possible to log additional information somehow.
adamliter
ParticipantAh, thanks, Jeremy! I really appreciate the quick response.
adamliter
ParticipantAh, thanks! I should have thought to try that. That works perfectly.
-
AuthorPosts