Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

another attempted fix for numberletter #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions number_letter/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ for (i = 0; i < half_block_len; i++) {
on_finish: function(data) {
var correct = false
var correct_response = 0
if (['a', 'e', 'i', 'o', 'u'].indexOf(data.stim_id[1].toLowerCase()) === -1) {
if (['a', 'e', 'i', 'o', 'u'].indexOf(data.stim_id[0].toLowerCase()) === -1) {
correct_response = correct_responses[2][1]
}
else {
Expand All @@ -242,6 +242,7 @@ for (i = 0; i < half_block_len; i++) {
number_letter_experiment.push(bottom_block)
number_letter_experiment.push(gap_block)
}

for (i = 0; i < rotate_block_len; i++) {
stim = getRotateStim()
var rotate_block = {
Expand All @@ -263,14 +264,16 @@ for (i = 0; i < rotate_block_len; i++) {
var correct_response = 0
if (data.stim_place === "bottomleft" | data.stim_place === "bottomright") {
condition = 'consonantvowel'
if (['a', 'e', 'i', 'o', 'u'].indexOf(data.stim_id[1].toLowerCase()) === -1) {
// if consonant
if (['a', 'e', 'i', 'o', 'u'].indexOf(data.stim_id[0].toLowerCase()) === -1) {
correct_response = correct_responses[2][1]
}
// if vowel
else {
correct_response = correct_responses[3][1]
}
} else {
if (data.trial_id[1] % 2 === 0) {
if (data.stim_id[1] % 2 === 0) {
correct_response = correct_responses[1][1]
}
else {
Expand Down