+xI have a question concerning the instruction pages in your script “Decision Board”.
I want to run the script (like standard) with a decision board for two applicants.
Before the decision board for the first applicant (Applicant1) starts, I want two instruction pages to appear (Userinfo1, Userinfo2). The second applicant (Applicant2) has two other instruction pages (Userinfo3, Userinfo4). The order of the two applicants is random.
I want the script to run like this:
Userinfo1
Userinfo2
Applicant1
Userinfo3
Userinfo4
Applicant2
Or respectively:
Userinfo3
Userinfo4
Applicant2
Userinfo1
Userinfo2
Applicant1
I tried something like this:
<htmlpage userinfo1>
/file = "dba_userinformation1.htm"
</htmlpage>
<htmlpage userinfo2>
/file = "dba_userinformation2.htm"
</htmlpage>
<htmlpage userinfo3>
/file = "dba_userinformation3.htm"
</htmlpage>
<htmlpage userinfo4>
/file = "dba_userinformation4.htm"
</htmlpage>
<list applicantindex>
/items = (1, 2)
/replace = false
/resetinterval = 0
</list>
<trial userinfo>
/ontrialbegin [if (values.applicantindex=1) htmlpage.userinfo1; htmlpage.userinfo2]
/ontrialbegin [if (values.applicantindex=2) htmlpage.userinfo3; htmlpage.userinfo4]
</trial>
<block userinfo>
/trials = [1 = userinfo]
</block>
Is there any mistake? Unfortunately it doesn´t work…
<htmlpage> elements aren't trials, so you cannot display them via a block's /trials attribute. Nor are <htmlpage> elements stimuli, so you cannot display them via a <trial> either. Beyond that
<trial userinfo>
/ontrialbegin [if (values.applicantindex=1) htmlpage.userinfo1; htmlpage.userinfo2]
/ontrialbegin [if (values.applicantindex=2) htmlpage.userinfo3; htmlpage.userinfo4]
</trial>
is invalid syntax that will not actually do anything (I'm unclear about what it is supposed to achieve or mean to begin with).
<htmlpage>s are instruction pages, the exclusive way to display them is via an <expt>'s or <block>'s /pre- and /postinstructions attributes.
Set up two <block>s, one that displays pages userinfo1 and userinfo2
<block userinfo1and2>
/ preinstructions = (userinfo1, unserinfo2)
</block>
and another one that displays userinfo3 and 4:
<block userinfo3and4>
/ preinstructions = (userinfo3, unserinfo4)
</block>
Then /branch to the applicable block based on your applicantindex variable:
<block userinfo>
...
/ branch = [if (values.applicantindex == 1) block.userinfo1and2]
/ branch = [if (values.applicantindex == 2) block.userinfo3and4]
</block>