I was looking for a way to randomize the questions within a group and keep the order of those in another one.
I came across this page
docs.limesurvey.org/tiki-index.php?page=...aviour#Randomization and these two articles:
- Randomize the order of questions within individual groups - JavaScript solution
- Selective Question Randomization
The first one is simple and it works but doesn't fit my case beacuse it does an array randomization, but I want display one question per page.
The second one is less straightforward. I had to add a column in a mysql table and to change two php pages.
I get some errors due to some ">" and "/" in the code, but at last it worked, though not well.
To explain what happened, let's that I have two groups G1 and G2.
If G1 must appears before G2 and
G1 is random and G2 is ordered => G1 before G2
G1 is ordered and G2 is random => G1 after G2
G1 is random and G2 is random => G1 before G2
G1 is ordered and G2 is ordered => I get the error below
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and parent_qid=0 group by type' at line 1:SELECT type FROM `lime_questions` WHERE qid= and parent_qid=0 group by type
On the other hand if G2 must appears before G1 and
G1 is random and G2 is ordered => G2 after G1
G1 is ordered and G2 is random => G2 before G1
G1 is random and G2 is random => G2 before G1
G1 is ordered and G2 is ordered => I get the error above
Bottom line the randomized group appears always before the ordered group and if both are ordered I get the sql error.