0 votes
in SoSci Survey (English) by s194719 (130 points)

Hello,

I am conducting an online experiment, in which I have five page blocks that I want to put in random order for each participant. Even though I used the random generator, wrote the PHP code and clicked 'drawing without putting back' (and said to draw 5 times), it still only draws four of the blocks instead of five.

I'm somewhat desperate because I feel like I tried everything, nothing seems to work. I'd very much appreciate an answer or any tips and tricks! Thanks :)

by SoSci Survey (304k points)
Please add the following information:

1) What does the debug information say on the page with the PHP code?
2) What PHP code did you use?
3) What is the content of your random generator an how many elements do you draw from the generator in each interview?
by s194719 (130 points)
1) There is no debug information
2) I used this code:
question('ZS04');  //Draw slips in random order
$pages = valueList('ZS04', NULL, 'label');  // Drawn slips
setPageOrder($pages, 'Validation');  // Define pages as page sequence
3) In each interview I draw 5 elements (meaning 5 blocks, each consisting of 1-4 pages in the questionnaire). The content of the random generator thus consists of pages that I named.
by SoSci Survey (304k points)
ad 1) There always is, if you open it on the upper right in the debug mode:
https://www.soscisurvey.de/help/doku.php/en:create:debugging

The code looks fine, so in addition to (1) I would like to add another question:

4) Do you use setPageOrder(), setNextPage(), loopPage() or loopToPage() on any of the subsequent pages?
by s194719 (130 points)
1) Thanks for the info! However, there is no error information whatsoever. The debug only showed that the questionnaire has been answered 81% even if it is on the last page.
4) Yes, I do. In the course of the questionnaire, I use this twice to randomise a set of pictures (within module 5) and to randomly allocate an experimental group (also module 5). The code I use follows the same as the one that I entered before.
by SoSci Survey (304k points)
ad 1) I am not looking for error information, I just want to know what the random generator has drawn :) Please kindly post the debug information from the respective page as context information for me.

1a) You mal add debug($pages); at the end of the code, and additionally post the information that is shown for $pages

ad 4) Please note that (according to the manual) any use of these functions will break your page order as dfined by setPageOrder(). If you need to combine them, then you will have to create a combined page order in the beginning (including the block order and eventually any loops).
by s194719 (130 points)
1)
[Information]    Interview started (new case no. 232)
[Information]    Questionnaire FQ from project filmandgenre will be used
[Processing]    Create page 1 in questionnaire FQ
[Content]    Create question SC01
[Content]    Create question ZS04
[Information]    The random generator ZS04 drew these codes: 2, 3, 5, 4, 1, 2, 4, 5, 1, 3
[Content]    Create question ZS04
[Information]    The random generator ZS04 was run earlier in the interview. The codes, already drawn, are preserved: 2, 3, 5, 4, 1, 2, 4, 5, 1, 3
[Information]    According to setPageOrder() the subsequent pages will be shown next:
6 [Media Use], 7 [Life Satisfaction], 8 [Wellbeing], 12 [Disclaimer], 13, 14, 15, 16, 17, 18, 19, 20, 21 [Selection], 9 [ER Intro], 10, 11 [Media Emotion], 2 [Age], 3, 4, 5 [Kids], 6 [Media Use], 9 [ER Intro], 10, 11 [Media Emotion], 12 [Disclaimer], 13, 14, 15, 16, 17, 18, 19, 20, 21 [Selection], 2 [Age], 3, 4, 5 [Kids], 7 [Life Satisfaction], 8 [Wellbeing], 22 [Validation]
=> this is the debug info that I receive.

4) Where do I find how to create a combined page order? What codes do I use for that and where can I find the explanations?

Thank you!

1 Answer

0 votes
by SoSci Survey (304k points)

Alright, as the code on that page (according to the debug information) works fine, it looks like you have an issue with loopPage() or other functions that modify which pages are displayed in which order.

Where do I find how to create a combined page order? What codes do I use for that and where can I find the explanations?

That requires some coding, nothing that can be easily standardized. You'll not get around some reading, trial and error. If you post a new question with the exact procedure (which block, wich repetitions/rotations) I may be ablte to give you hints.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...