Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+xHi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected? > the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? You need to set the text elements' skip properties back to false again /onblockbegin. Hi Dave, I was able to use this successfully for one condition (where I present all 8 choices at once). However, when I try to apply it to the other condition (2 paired choices are presented at a time), the strike through is still there when I go to run this second condition another time. How do I allow people to redo the paired version again while keeping the same original pairings? I hope that makes sense. If not, please let me know and I can try to rephrase. Thank you. You obviously need to revert the strikethrough at the start of the block. <list options> / items = ("option a", "option b", "option c", "option d", "option e","option f", "option g", "option h") / selectionrate = always </list>
<values> / pair1a = "" / pair1b = "" / pair1apassage = 1 / pair1bpassage = 1 </values>
<list pair1responses> </list>
<expt> / onexptbegin = [ values.pair1a = list.options.nextvalue; values.pair1apassage = list.options.currentindex; values.pair1b = list.options.nextvalue; values.pair1bpassage = list.options.currentindex; ] / blocks = [1-2=exampleblock] </expt>
<block exampleblock> / onblockbegin = [ list.pair1responses.reset(); values.pair1a = replaceall(values.pair1a, "<s>", ""); values.pair1a = replaceall(values.pair1a, "</s>", ""); values.pair1b = replaceall(values.pair1b, "<s>", ""); values.pair1b = replaceall(values.pair1b, "</s>", ""); ]
/ trials = [1-2=pair1trial] </block>
<trial pair1trial> / ontrialend = [ list.pair1responses.appenditem(trial.pair1trial.response); ] / stimulusframes = [1=click, pair1a, pair1b] / inputdevice = mouse / validresponse = (pair1a, pair1b) / isvalidresponse = [ list.pair1responses.indexof(trial.pair1trial.response) == -1; ] / branch = [ if (trial.pair1trial.response == "pair1a") { values.pair1a = concat(concat("<s>", values.pair1a), "</s>"); return surveypage.pair1a_follow_up; } else if (trial.pair1trial.response == "pair1b") { values.pair1b = concat(concat("<s>", values.pair1b), "</s>"); return surveypage.pair1b_follow_up; }; ] </trial>
<text click> / items = ("Click on one of the below options:") / position = (50%, 10%) </text>
<text pair1a> / items = ("<%values.pair1a%>") / position = (50%, 30%) </text>
<text pair1b> / items = ("<%values.pair1b%>") / position = (50%, 40%) </text>
<surveypage pair1a_follow_up> / subcaption = "<%item.passages.item(values.pair1apassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<surveypage pair1b_follow_up> / subcaption = "<%item.passages.item(values.pair1bpassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<item passages> / 1 = "Passage pertaining to Option A" / 2 = "Passage pertaining to Option B" / 3 = "Passage pertaining to Option C" / 4 = "Passage pertaining to Option D" / 5 = "Passage pertaining to Option E" / 6 = "Passage pertaining to Option F" / 7 = "Passage pertaining to Option G" / 8 = "Passage pertaining to Option H" </item>
|
|
|
emoe
|
|
Group: Forum Members
Posts: 6,
Visits: 23
|
+x+xHi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected? > the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? You need to set the text elements' skip properties back to false again /onblockbegin. Hi Dave, I was able to use this successfully for one condition (where I present all 8 choices at once). However, when I try to apply it to the other condition (2 paired choices are presented at a time), the strike through is still there when I go to run this second condition another time. How do I allow people to redo the paired version again while keeping the same original pairings? I hope that makes sense. If not, please let me know and I can try to rephrase. Thank you.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+xHi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected? If there is no strikeout option, is there a way to keep the stimuli on the screen, but after they press on it once they cannot select it again? Like removing it as a valid response? The rationale is that we'd like to have each trial look the same. The script already does that. Also, I didn't say the option cannot be striked out. <list options> / items = ("option a", "option b", "option c", "option d", "option e","option f", "option g", "option h") / selectionrate = always </list>
<values> / pair1a = "" / pair1b = "" / pair1apassage = 1 / pair1bpassage = 1 </values>
<list pair1responses> </list>
<expt> / onexptbegin = [ values.pair1a = list.options.nextvalue; values.pair1apassage = list.options.currentindex; values.pair1b = list.options.nextvalue; values.pair1bpassage = list.options.currentindex; ] / blocks = [1=exampleblock] </expt>
<block exampleblock> / onblockbegin = [ list.pair1responses.reset(); ]
/ trials = [1-2=pair1trial] </block>
<trial pair1trial> / ontrialend = [ list.pair1responses.appenditem(trial.pair1trial.response); ] / stimulusframes = [1=click, pair1a, pair1b] / inputdevice = mouse / validresponse = (pair1a, pair1b) / isvalidresponse = [ list.pair1responses.indexof(trial.pair1trial.response) == -1; ] / branch = [ if (trial.pair1trial.response == "pair1a") { values.pair1a = concat(concat("<s>", values.pair1a), "</s>"); return surveypage.pair1a_follow_up; } else if (trial.pair1trial.response == "pair1b") { values.pair1b = concat(concat("<s>", values.pair1b), "</s>"); return surveypage.pair1b_follow_up; }; ] </trial>
<text click> / items = ("Click on one of the below options:") / position = (50%, 10%) </text>
<text pair1a> / items = ("<%values.pair1a%>") / position = (50%, 30%) </text>
<text pair1b> / items = ("<%values.pair1b%>") / position = (50%, 40%) </text>
<surveypage pair1a_follow_up> / subcaption = "<%item.passages.item(values.pair1apassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<surveypage pair1b_follow_up> / subcaption = "<%item.passages.item(values.pair1bpassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<item passages> / 1 = "Passage pertaining to Option A" / 2 = "Passage pertaining to Option B" / 3 = "Passage pertaining to Option C" / 4 = "Passage pertaining to Option D" / 5 = "Passage pertaining to Option E" / 6 = "Passage pertaining to Option F" / 7 = "Passage pertaining to Option G" / 8 = "Passage pertaining to Option H" </item>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xHi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected? If there is no strikeout option, is there a way to keep the stimuli on the screen, but after they press on it once they cannot select it again? Like removing it as a valid response? The rationale is that we'd like to have each trial look the same. The script already does that.
|
|
|
emoe
|
|
Group: Forum Members
Posts: 6,
Visits: 23
|
+xHi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected? If there is no strikeout option, is there a way to keep the stimuli on the screen, but after they press on it once they cannot select it again? Like removing it as a valid response? The rationale is that we'd like to have each trial look the same.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected? > the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice? You need to set the text elements' skip properties back to false again /onblockbegin.
|
|
|
emoe
|
|
Group: Forum Members
Posts: 6,
Visits: 23
|
Hi again, Participants are completing 2 of these blocks. If I try run the experiment twice, the second time the block is presented none of the options show up. Is there a way to reset the skips/present the same block twice?
Also, is there a strikeout feature instead of an option disappearing completely off the screen once it has been selected?
|
|
|
emoe
|
|
Group: Forum Members
Posts: 6,
Visits: 23
|
+x+xHi Dave, Thank you for your help! It all makes sense except I need to set a custom message per what is chosen for values.pair1a. A little more background on what I am trying to do: Similar to Jeopardy, I'd like to have people select 1 of 8 topics at a time (History, Psychology, Chemistry, etc.), and then be presented with a short passage to read about that topic. After that, they would be redirected back to the selection page and be prompted to select from the remaining un-read topics. My problem now is that I am having trouble bringing up the specific topic passage after the person has selected a topic. The <%values.pair1a%> puts the correct topic name into the caption statement of <surveypage pair1a_follow_up>, but I need also need to insert the correct associated passage into this follow up page. I don't know how to assign the specific passage to the randomized pair1a topic/ its follow up page. I tried doing something like the code snippet below but it failed. If Psychology is picked, "Psychology sKDFjasfsalkfjsafkj " prints on the screen. If it isn't Psychology, "test" prints on the screen. If I could get something like that to work, a large part of my problem would be solved. (I added to the caption you initially had below in the follow up) <surveypage pair1a_follow_up> / caption = "Follow-up questions about <%values.pair1a%> go here <%values.passage1%>" / showpagenumbers = false / showquestionnumbers = false </surveypage> <values passage> / branch = [ if (%values.pair1a% == "Psychology") { / passage1 = "Psychology sKDFjasfsalkfjsafkj "; } else if (%values.pair1a% != "Psychology") { / passage1 = "test"; }; ] Please let me know if my question made sense or if you need more clarification. Thank you again! I'm sorry, but that syntax makes no sense. You can assign the passages in the same way and at the same moment the pairs are assigned /onexptbegin. <list options> / items = ("option a", "option b", "option c", "option d", "option e","option f", "option g", "option h") / selectionrate = always </list>
<values> / pair1a = "" / pair1b = "" / pair1apassage = 1 / pair1bpassage = 1 </values>
<list pair1responses> </list>
<expt> / onexptbegin = [ values.pair1a = list.options.nextvalue; values.pair1apassage = list.options.currentindex; values.pair1b = list.options.nextvalue; values.pair1bpassage = list.options.currentindex; ] / blocks = [1=exampleblock] </expt>
<block exampleblock> / trials = [1-2=pair1trial] </block>
<trial pair1trial> / ontrialend = [ list.pair1responses.appenditem(trial.pair1trial.response); ] / stimulusframes = [1=click, pair1a, pair1b] / inputdevice = mouse / validresponse = (pair1a, pair1b) / isvalidresponse = [ list.pair1responses.indexof(trial.pair1trial.response) == -1; ] / branch = [ if (trial.pair1trial.response == "pair1a") { text.pair1a.skip = true; return surveypage.pair1a_follow_up; } else if (trial.pair1trial.response == "pair1b") { text.pair1b.skip = true; return surveypage.pair1b_follow_up; }; ] </trial>
<text click> / items = ("Click on one of the below options:") / position = (50%, 10%) </text>
<text pair1a> / items = ("<%values.pair1a%>") / position = (50%, 30%) </text>
<text pair1b> / items = ("<%values.pair1b%>") / position = (50%, 40%) </text>
<surveypage pair1a_follow_up> / caption = "Follow-up questions about <%values.pair1a%> go here" / subcaption = "<%item.passages.item(values.pair1apassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<surveypage pair1b_follow_up> / caption = "Follow-up questions about <%values.pair1b%> go here" / subcaption = "<%item.passages.item(values.pair1bpassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<item passages> / 1 = "Passage pertaining to Option A" / 2 = "Passage pertaining to Option B" / 3 = "Passage pertaining to Option C" / 4 = "Passage pertaining to Option D" / 5 = "Passage pertaining to Option E" / 6 = "Passage pertaining to Option F" / 7 = "Passage pertaining to Option G" / 8 = "Passage pertaining to Option H" </item>
Thank yo. This part is now working. I will keep coding.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHi Dave, Thank you for your help! It all makes sense except I need to set a custom message per what is chosen for values.pair1a. A little more background on what I am trying to do: Similar to Jeopardy, I'd like to have people select 1 of 8 topics at a time (History, Psychology, Chemistry, etc.), and then be presented with a short passage to read about that topic. After that, they would be redirected back to the selection page and be prompted to select from the remaining un-read topics. My problem now is that I am having trouble bringing up the specific topic passage after the person has selected a topic. The <%values.pair1a%> puts the correct topic name into the caption statement of <surveypage pair1a_follow_up>, but I need also need to insert the correct associated passage into this follow up page. I don't know how to assign the specific passage to the randomized pair1a topic/ its follow up page. I tried doing something like the code snippet below but it failed. If Psychology is picked, "Psychology sKDFjasfsalkfjsafkj " prints on the screen. If it isn't Psychology, "test" prints on the screen. If I could get something like that to work, a large part of my problem would be solved. (I added to the caption you initially had below in the follow up) <surveypage pair1a_follow_up> / caption = "Follow-up questions about <%values.pair1a%> go here <%values.passage1%>" / showpagenumbers = false / showquestionnumbers = false </surveypage> <values passage> / branch = [ if (%values.pair1a% == "Psychology") { / passage1 = "Psychology sKDFjasfsalkfjsafkj "; } else if (%values.pair1a% != "Psychology") { / passage1 = "test"; }; ] Please let me know if my question made sense or if you need more clarification. Thank you again! I'm sorry, but that syntax makes no sense. You can assign the passages in the same way and at the same moment the pairs are assigned /onexptbegin. <list options> / items = ("option a", "option b", "option c", "option d", "option e","option f", "option g", "option h") / selectionrate = always </list>
<values> / pair1a = "" / pair1b = "" / pair1apassage = 1 / pair1bpassage = 1 </values>
<list pair1responses> </list>
<expt> / onexptbegin = [ values.pair1a = list.options.nextvalue; values.pair1apassage = list.options.currentindex; values.pair1b = list.options.nextvalue; values.pair1bpassage = list.options.currentindex; ] / blocks = [1=exampleblock] </expt>
<block exampleblock> / trials = [1-2=pair1trial] </block>
<trial pair1trial> / ontrialend = [ list.pair1responses.appenditem(trial.pair1trial.response); ] / stimulusframes = [1=click, pair1a, pair1b] / inputdevice = mouse / validresponse = (pair1a, pair1b) / isvalidresponse = [ list.pair1responses.indexof(trial.pair1trial.response) == -1; ] / branch = [ if (trial.pair1trial.response == "pair1a") { text.pair1a.skip = true; return surveypage.pair1a_follow_up; } else if (trial.pair1trial.response == "pair1b") { text.pair1b.skip = true; return surveypage.pair1b_follow_up; }; ] </trial>
<text click> / items = ("Click on one of the below options:") / position = (50%, 10%) </text>
<text pair1a> / items = ("<%values.pair1a%>") / position = (50%, 30%) </text>
<text pair1b> / items = ("<%values.pair1b%>") / position = (50%, 40%) </text>
<surveypage pair1a_follow_up> / caption = "Follow-up questions about <%values.pair1a%> go here" / subcaption = "<%item.passages.item(values.pair1apassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<surveypage pair1b_follow_up> / caption = "Follow-up questions about <%values.pair1b%> go here" / subcaption = "<%item.passages.item(values.pair1bpassage)%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<item passages> / 1 = "Passage pertaining to Option A" / 2 = "Passage pertaining to Option B" / 3 = "Passage pertaining to Option C" / 4 = "Passage pertaining to Option D" / 5 = "Passage pertaining to Option E" / 6 = "Passage pertaining to Option F" / 7 = "Passage pertaining to Option G" / 8 = "Passage pertaining to Option H" </item>
|
|
|
emoe
|
|
Group: Forum Members
Posts: 6,
Visits: 23
|
Hi Dave,
Thank you for your help!
It all makes sense except I need to set a custom message per what is chosen for values.pair1a.
A little more background on what I am trying to do: Similar to Jeopardy, I'd like to have people select 1 of 8 topics at a time (History, Psychology, Chemistry, etc.), and then be presented with a short passage to read about that topic. After that, they would be redirected back to the selection page and be prompted to select from the remaining un-read topics.
My problem now is that I am having trouble bringing up the specific topic passage after the person has selected a topic. The <%values.pair1a%> puts the correct topic name into the caption statement of <surveypage pair1a_follow_up>, but I need also need to insert the correct associated passage into this follow up page. I don't know how to assign the specific passage to the randomized pair1a topic/ its follow up page.
I tried doing something like the code snippet below but it failed.
If Psychology is picked, "Psychology sKDFjasfsalkfjsafkj " prints on the screen. If it isn't Psychology, "test" prints on the screen. If I could get something like that to work, a large part of my problem would be solved.
(I added to the caption you initially had below in the follow up)
<surveypage pair1a_follow_up> / caption = "Follow-up questions about <%values.pair1a%> go here <%values.passage1%>" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<values passage> / branch = [ if (%values.pair1a% == "Psychology") { / passage1 = "Psychology sKDFjasfsalkfjsafkj "; } else if (%values.pair1a% != "Psychology") { / passage1 = "test"; }; ]
Please let me know if my question made sense or if you need more clarification.
Thank you again!
|
|
|