Learning to criterion


Author
Message
raven
raven
Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)
Group: Forum Members
Posts: 52, Visits: 110
Dave - 11/5/2024
/ skip = [
    if (script.currentblock == "block_1" && values.trial_a_criterion_learned) {
        return true;
    };
    if (script.currentblock == "block_2" && values.trial_b_criterion_learned) {
        return true;
    };
]


Hi Dave, thanks for your reply.

I tried running the following code with three conditions, but when the first condition is met, it skips both the first and second conditions, and just keeps looping through trial_c instead.
/ skip = [
  if (script.currentblock == "block_1" && values.trial_a_criterion_learned) {
   return true;
  };
  if (script.currentblock == "block_2" && values.trial_b_criterion_learned) {
   return true;
  };
if (script.currentblock == "block_3" && values.trial_c_criterion_learned) {
 return true;
};
]


Any ideas?


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K
raven - 11/6/2024
Dave - 11/5/2024
/ skip = [
    if (script.currentblock == "block_1" && values.trial_a_criterion_learned) {
        return true;
    };
    if (script.currentblock == "block_2" && values.trial_b_criterion_learned) {
        return true;
    };
]


Hi Dave, thanks for your reply.

I tried running the following code with three conditions, but when the first condition is met, it skips both the first and second conditions, and just keeps looping through trial_c instead.
/ skip = [
  if (script.currentblock == "block_1" && values.trial_a_criterion_learned) {
   return true;
  };
  if (script.currentblock == "block_2" && values.trial_b_criterion_learned) {
   return true;
  };
if (script.currentblock == "block_3" && values.trial_c_criterion_learned) {
 return true;
};
]


Any ideas?


Post runnable code.
raven
raven
Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)Partner Member (505 reputation)
Group: Forum Members
Posts: 52, Visits: 110
Dave - 11/6/2024
raven - 11/6/2024
Dave - 11/5/2024
/ skip = [
    if (script.currentblock == "block_1" && values.trial_a_criterion_learned) {
        return true;
    };
    if (script.currentblock == "block_2" && values.trial_b_criterion_learned) {
        return true;
    };
]


Hi Dave, thanks for your reply.

I tried running the following code with three conditions, but when the first condition is met, it skips both the first and second conditions, and just keeps looping through trial_c instead.
/ skip = [
  if (script.currentblock == "block_1" && values.trial_a_criterion_learned) {
   return true;
  };
  if (script.currentblock == "block_2" && values.trial_b_criterion_learned) {
   return true;
  };
if (script.currentblock == "block_3" && values.trial_c_criterion_learned) {
 return true;
};
]


Any ideas?


Post runnable code.

I managed to find a workaround.
Thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search