Hi folks,
I am looking for a solution to display randomly 4 out of 8 question groups.
That is, I have the question groups G1, G2, G3, …, G8. Each participant should answer the questions of 4 out of these 8 groups. E.g., groups G3, G5, G7, G8 would be presented to participant A, groups G2, G3, G6, G8 to participant B and so forth.
G1 to G8 belong to the same randomization group, i.e. the four randomly selected groups will be presented in random order.
My current approach:
Because permutation is too much trouble - (n! / (n-k)! k!) = (8! / 4! 4!) = 70 combinations -, I am currently trying a solution with random numbers. If I can have four random numbers as answer to the hidden question qrand1, qrand2, qrand3, qrand4 with the constraint that no random number appears twice (qrand1 != qrand2 != qrand3 != qrand4), I could check with the relevance of the questions group if a corresponding random number was drawn (e.g. for G1: ((qrand1 = 1) OR (qrand2 = 1) OR (qrand3 = 1) OR (qrand4 = 1)). Not pretty, but I think it could work.
I can generate 4 random numbers with different values with java script but I have no idea how I can refer to those numbers in limesurvey (e.g., read a question value from java script or write an integer as a new answer value).
Does anyone know how to solve this issue?
Any help would be appreciated.
Thanks,
Alex
The topic has been locked.