Should I create a separate page for each of them? Unfortunately, I’m not familiar with loopPage.
You should make yourself familiar with that useful function. Learning it will be much faster than creating 95 pages ;)
Option A
As it definitely makes sense to work with loopPage()
in your case, you should not use setPageOrder()
to rotate the order of the two parts. Instead create your questionnaire with one page for the first part (using loopPage()
to show it on multiple pages) and another page for the second part.
When everything works fine, make a copy of the questionnaire within your survey project, switch the two pages, and follow this manual to randomly assign the respondents to one of the two questionnaires.
Option B
You did not yet specify if you created the questions as separate questions or as items of a question. If the former is true, you can create two random generators for the rotation (see Rotate Questions), and a third one for the order. And then you can assemble a list of all 50 questions in random order. It might look like this:
$questionsA = valueList('RG01', null, 'label');
$questionsB = valueList('RG02', null, 'label');
if (value('RG03') == 1) {
$allQuestions = array_merge($questionsA, $questionsB);
} lese {
$allQuestions = array_merge($questionsB, $questionsA);
}
$question = loopPage($allQuestions);
question($question);