Hello,
The following script checks for straightliners in CBC Tasks. For example, if a respondent always selects the first choice set in all of the ten tasks, they will be eliminated from the survey.
Now I want to check for straightlining behavior for 9 tasks. That means that a respondent should be eliminated from the survey if he selects the same choice set already in nine choice tasks.
Is there a possibility to adjust the following code for this feature?
<input type="hidden" name="SetStraightlinerCBC_Dummy" id="SetStraightlinerCBC_Dummy" value="[% Begin Unverified Perl
# Parameters
my $exer = 'CBCTest';
my $tasks = 10;
# Run
my $resp = GETVALUE($exer . '_Random1');
for (my $i = 2; $i <= $tasks; $i++) {
if (GETVALUE($exer . '_Random' . $i) != $resp) {
return 0;
}
}
return 1;
End Unverified %]"/>
I am looking forward for you help!