Commit 8865c7d1 authored by Dasoo Milton Yoon's avatar Dasoo Milton Yoon

feeback

parent 6d8fa280
......@@ -129,7 +129,7 @@
<Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="End Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="&amp;#10;cur_items = [];&amp;#10;if (Prime == 1) {&amp;#10; cur_items = items_list_1;&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; cur_items = items_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; cur_items = items_list_3;&amp;#10;}" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="&amp;#10;cur_items = [];&amp;#10;if (Prime == 1) {&amp;#10; cur_items = items_list_1;&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; cur_items = items_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; cur_items = items_list_3;&amp;#10;}&amp;#10;&amp;#10;&amp;#10;feedback_items = [];&amp;#10;if (Prime == 1) {&amp;#10; feedback_items = feedback_list_1;&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; feedback_items = feedback_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; feedback_items = feedback_list_3;&amp;#10;}" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code_2" valType="code"/>
......@@ -207,7 +207,7 @@
<CodeComponent name="code">
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="function getRandomIntInclusive(min, max) {&amp;#10; min = Math.ceil(min);&amp;#10; max = Math.floor(max);&amp;#10; return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive &amp;#10;}&amp;#10;&amp;#10;&amp;#10;&amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="used_items = []&amp;#10;available_items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];&amp;#10;&amp;#10;&amp;#10;&amp;#10;function shuffle(a) {&amp;#10; var j, x, i;&amp;#10; for (i = a.length - 1; i &gt; 0; i--) {&amp;#10; j = Math.floor(Math.random() * (i + 1));&amp;#10; x = a[i];&amp;#10; a[i] = a[j];&amp;#10; a[j] = x;&amp;#10; }&amp;#10; return a;&amp;#10;}&amp;#10;&amp;#10;&amp;#10;available_items_shuffle = shuffle(available_items)&amp;#10;&amp;#10;items_list_1 = available_items_shuffle.slice(0, 5)&amp;#10;items_list_2 = available_items_shuffle.slice(5, 10)&amp;#10;items_list_3 = available_items_shuffle.slice(10, 15)" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="used_items = []&amp;#10;available_items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];&amp;#10;&amp;#10;&amp;#10;&amp;#10;function shuffle(a) {&amp;#10; var j, x, i;&amp;#10; for (i = a.length - 1; i &gt; 0; i--) {&amp;#10; j = Math.floor(Math.random() * (i + 1));&amp;#10; x = a[i];&amp;#10; a[i] = a[j];&amp;#10; a[j] = x;&amp;#10; }&amp;#10; return a;&amp;#10;}&amp;#10;&amp;#10;&amp;#10;available_items_shuffle = shuffle(available_items)&amp;#10;&amp;#10;items_list_1 = available_items_shuffle.slice(0, 5)&amp;#10;items_list_2 = available_items_shuffle.slice(5, 10)&amp;#10;items_list_3 = available_items_shuffle.slice(10, 15)&amp;#10;&amp;#10;curr_items_shuffle = shuffle(curr_items)&amp;#10;&amp;#10;feedback_list_1 = cur_items_shuffle.slice(0, 5)&amp;#10;feedback_list_2 = cur_items_shuffle.slice(5, 10)&amp;#10;feedback_list_3 = cur_items_shuffle.slice(10, 15)" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="JS" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
......@@ -405,7 +405,7 @@
<Param name="flip" updates="constant" val="" valType="str"/>
<Param name="font" updates="constant" val="Arial" valType="str"/>
<Param name="languageStyle" updates="None" val="LTR" valType="str"/>
<Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
<Param name="letterHeight" updates="constant" val="0.05" valType="code"/>
<Param name="name" updates="None" val="text_9" valType="code"/>
<Param name="opacity" updates="constant" val="1" valType="code"/>
<Param name="ori" updates="constant" val="0" valType="code"/>
......@@ -439,6 +439,21 @@
<Param name="storeCorrect" updates="constant" val="False" valType="bool"/>
<Param name="syncScreenRefresh" updates="constant" val="True" valType="bool"/>
</KeyboardComponent>
<CodeComponent name="code_3">
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="#same splicing function (splice currItems)&amp;#10;#shuffle and splice after the first 3&amp;#10;#rename it as feedback items&amp;#10;#loop around the instructions, have the loop look for feedbackitems instead of currItems)&amp;#10;#do the same for word&amp;#10;&amp;#10;#used_items = []&amp;#10;#available_items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];&amp;#10;&amp;#10;&amp;#10;curr_items_shuffle = shuffle(curr_items)&amp;#10;&amp;#10;feedback_list = curr_items_shuffle.slice(0, 2)" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="JS" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="End Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="&amp;#10;feedback_items = [];&amp;#10;if (Prime == 1) {&amp;#10; feeback_items = items_list_1;&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; feedback_items = items_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; feedback_items = items_list_3;&amp;#10;}" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code_3" valType="code"/>
</CodeComponent>
</Routine>
<Routine name="Feedback">
<TextComponent name="text_10">
......@@ -461,7 +476,7 @@
<Param name="stopType" updates="None" val="duration (s)" valType="str"/>
<Param name="stopVal" updates="constant" val="" valType="code"/>
<Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
<Param name="text" updates="constant" val="Feeback" valType="str"/>
<Param name="text" updates="constant" val="$items" valType="str"/>
<Param name="units" updates="None" val="from exp settings" valType="str"/>
<Param name="wrapWidth" updates="constant" val="" valType="code"/>
</TextComponent>
......@@ -519,9 +534,9 @@
<LoopTerminator name="trials"/>
<Routine name="Instruction_for_Feedback"/>
<LoopInitiator loopType="TrialHandler" name="trials_3">
<Param name="Selected rows" updates="None" val="" valType="str"/>
<Param name="conditions" updates="None" val="None" valType="str"/>
<Param name="conditionsFile" updates="None" val="" valType="str"/>
<Param name="Selected rows" updates="None" val="$feedback_items" valType="str"/>
<Param name="conditions" updates="None" val="[OrderedDict([('Items', '(7x5)-19=16'), ('corrANS', 's')]), OrderedDict([('Items', '(9x4)-18=19'), ('corrANS', 'k')]), OrderedDict([('Items', '(5x7)-17=18'), ('corrANS', 'k')]), OrderedDict([('Items', '(5x8)-16=24'), ('corrANS', 's')]), OrderedDict([('Items', '(5x9)-16=29'), ('corrANS', 'k')]), OrderedDict([('Items', '(4x6)-19=5'), ('corrANS', 's')]), OrderedDict([('Items', '(7x6)-18=22'), ('corrANS', 's')]), OrderedDict([('Items', '(4x7)-16=10'), ('corrANS', 'k')]), OrderedDict([('Items', '(5x8)-15=27'), ('corrANS', 's')]), OrderedDict([('Items', '(6x5)-19=11'), ('corrANS', 'k')]), OrderedDict([('Items', '(4x6)-16=10'), ('corrANS', 's')]), OrderedDict([('Items', '(4x6)-18=6'), ('corrANS', 'k')]), OrderedDict([('Items', '(5x8)-16=22'), ('corrANS', 's')]), OrderedDict([('Items', '(7x4)-17=11'), ('corrANS', 'k')]), OrderedDict([('Items', '(8x6)-17=31'), ('corrANS', 's')])]" valType="str"/>
<Param name="conditionsFile" updates="None" val="Items.xlsx" valType="str"/>
<Param name="endPoints" updates="None" val="[0, 1]" valType="num"/>
<Param name="isTrials" updates="None" val="True" valType="bool"/>
<Param name="loopType" updates="None" val="random" valType="str"/>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment