Commit bd677676 authored by Ruben van Bergen's avatar Ruben van Bergen

Fixing data save issue #5, typo fix

Changed refs to 'trials' to 'trials_loop'
parent 38e7cd71
......@@ -925,10 +925,10 @@ function trialRoutineEnd() {
this_digits = [digit0_idx, digit1_idx, digit2_idx, digit3_idx];
digits_posx = [digit0_posx, digit1_posx, digit2_posx, digit3_posx];
digits_posy = [digit0_posy, digit1_posy, digit2_posy, digit3_posy];
trials.addData("digits.ids", this_digits);
trials.addData("digits.posx", digits_posx);
trials.addData("digits.posy", digits_posy);
trials.addData("mask_path", mask_paths[Number.parseInt(mask_idx)]);
trials_loop.addData("digits.ids", this_digits);
trials_loop.addData("digits.posx", digits_posx);
trials_loop.addData("digits.posy", digits_posy);
trials_loop.addData("mask_path", mask_paths[Number.parseInt(mask_idx)]);
// the Routine "trial" was not non-slip safe, so reset the non-slip timer
routineTimer.reset();
......@@ -1324,9 +1324,9 @@ function trial_feedbackRoutineEnd() {
thisComponent.setAutoDraw(false);
}
});
trials.addData("rsp_str", text.text);
trials.addData("rsp_int", rsp_int);
trials.addData("perc_correct", (num_correct / all_d.length));
trials_loop.addData("rsp_str", text.text);
trials_loop.addData("rsp_int", rsp_int);
trials_loop.addData("perc_correct", (num_correct / all_d.length));
text.setText('') // empty the onscreen text ready for next input
......
......@@ -929,10 +929,10 @@ function trialRoutineEnd() {
this_digits = [digit0_idx, digit1_idx, digit2_idx, digit3_idx];
digits_posx = [digit0_posx, digit1_posx, digit2_posx, digit3_posx];
digits_posy = [digit0_posy, digit1_posy, digit2_posy, digit3_posy];
trials.addData("digits.ids", this_digits);
trials.addData("digits.posx", digits_posx);
trials.addData("digits.posy", digits_posy);
trials.addData("mask_path", mask_paths[Number.parseInt(mask_idx)]);
trials_loop.addData("digits.ids", this_digits);
trials_loop.addData("digits.posx", digits_posx);
trials_loop.addData("digits.posy", digits_posy);
trials_loop.addData("mask_path", mask_paths[Number.parseInt(mask_idx)]);
// the Routine "trial" was not non-slip safe, so reset the non-slip timer
routineTimer.reset();
......@@ -1326,9 +1326,9 @@ function trial_feedbackRoutineEnd() {
thisComponent.setAutoDraw(false);
}
}
trials.addData("rsp_str", text.text);
trials.addData("rsp_int", rsp_int);
trials.addData("perc_correct", (num_correct / all_d.length));
trials_loop.addData("rsp_str", text.text);
trials_loop.addData("rsp_int", rsp_int);
trials_loop.addData("perc_correct", (num_correct / all_d.length));
text.setText('') // empty the onscreen text ready for next input
......
......@@ -67,8 +67,8 @@
<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="this_digits = [digit0_idx, digit1_idx, digit2_idx, digit3_idx];&amp;#10;digits_posx = [digit0_posx, digit1_posx, digit2_posx, digit3_posx];&amp;#10;digits_posy = [digit0_posy, digit1_posy, digit2_posy, digit3_posy];&amp;#10;trials.addData(&quot;digits.ids&quot;, this_digits);&amp;#10;trials.addData(&quot;digits.posx&quot;, digits_posx);&amp;#10;trials.addData(&quot;digits.posy&quot;, digits_posy);&amp;#10;trials.addData(&quot;mask_path&quot;, mask_paths[Number.parseInt(mask_idx)]);&amp;#10;" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="this_digits = [digit0_idx, digit1_idx, digit2_idx, digit3_idx]&amp;#10;digits_posx = [digit0_posx, digit1_posx, digit2_posx, digit3_posx]&amp;#10;digits_posy = [digit0_posy, digit1_posy, digit2_posy, digit3_posy]&amp;#10;trials.addData('digits.ids', this_digits)&amp;#10;trials.addData('digits.posx', digits_posx)&amp;#10;trials.addData('digits.posy', digits_posy)&amp;#10;trials.addData('mask_path', mask_paths[int(mask_idx)])" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="this_digits = [digit0_idx, digit1_idx, digit2_idx, digit3_idx];&amp;#10;digits_posx = [digit0_posx, digit1_posx, digit2_posx, digit3_posx];&amp;#10;digits_posy = [digit0_posy, digit1_posy, digit2_posy, digit3_posy];&amp;#10;trials_loop.addData(&quot;digits.ids&quot;, this_digits);&amp;#10;trials_loop.addData(&quot;digits.posx&quot;, digits_posx);&amp;#10;trials_loop.addData(&quot;digits.posy&quot;, digits_posy);&amp;#10;trials_loop.addData(&quot;mask_path&quot;, mask_paths[Number.parseInt(mask_idx)]);&amp;#10;" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="this_digits = [digit0_idx, digit1_idx, digit2_idx, digit3_idx]&amp;#10;digits_posx = [digit0_posx, digit1_posx, digit2_posx, digit3_posx]&amp;#10;digits_posy = [digit0_posy, digit1_posy, digit2_posy, digit3_posy]&amp;#10;trials_loop.addData('digits.ids', this_digits)&amp;#10;trials_loop.addData('digits.posx', digits_posx)&amp;#10;trials_loop.addData('digits.posy', digits_posy)&amp;#10;trials_loop.addData('mask_path', mask_paths[int(mask_idx)])" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code" valType="code"/>
</CodeComponent>
......@@ -382,8 +382,8 @@
<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="trials.addData(&quot;rsp_str&quot;, text.text);&amp;#10;trials.addData(&quot;rsp_int&quot;, rsp_int);&amp;#10;trials.addData(&quot;perc_correct&quot;, (num_correct / all_d.length));&amp;#10;" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="trials.addData('rsp_str', text.text)&amp;#10;trials.addData('rsp_int', rsp_int)&amp;#10;trials.addData('perc_correct', num_correct/len(all_d))&amp;#10;" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="trials_loop.addData(&quot;rsp_str&quot;, text.text);&amp;#10;trials_loop.addData(&quot;rsp_int&quot;, rsp_int);&amp;#10;trials_loop.addData(&quot;perc_correct&quot;, (num_correct / all_d.length));&amp;#10;" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="trials_loop.addData('rsp_str', text.text)&amp;#10;trials_loop.addData('rsp_int', rsp_int)&amp;#10;trials_loop.addData('perc_correct', num_correct/len(all_d))&amp;#10;" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code_3" valType="code"/>
</CodeComponent>
......
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