Welcome, Guest
Username: Password: Remember me

TOPIC: Question Randomization

Question Randomization 3 years 9 months ago #56274

  • ftrifoglio
  • ftrifoglio's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 1
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.
Last Edit: 3 years 9 months ago by ftrifoglio.
The administrator has disabled public write access.

Re: Question Randomization 3 years 9 months ago #56277

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
At the upcoming 1.91 there is an inbuild randomization feature, see docs.limesurvey.org/Advanced+question+se...eSurvey#random_group

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Question Randomization 3 years 9 months ago #56283

  • ftrifoglio
  • ftrifoglio's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 1
I took a look to the change log and I didn't find anything about randomization so I looked for a workaround.
I'm installing the RC2. Let's see if it fits my case.
The administrator has disabled public write access.

Re: Question Randomization 3 years 9 months ago #56330

  • ftrifoglio
  • ftrifoglio's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 1
The build-in randomization in the 1.91RC2 is awesome.
You can randomize questions within and between the groups and it works with the question per question format.
The administrator has disabled public write access.

Re: Question Randomization 3 years 9 months ago #56627

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
ftrifoglio wrote:
The build-in randomization in the 1.91RC2 is awesome.
You can randomize questions within and between the groups and it works with the question per question format.
Thanks for the flowers. Please describe this feature as detailled as possible at our manual so other users will know about how to use it.

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.113 seconds
Donation Image