Check out the LimeSurvey source code on GitHub!

Random Selection

2 years 7 months ago #110601 by AAlves
Hi everyone,

I've a challenge for two days ago without solution, and i would like to know if someone here has the key for it.

I've a multiple choice question with 7 arguments:

Argument 1
Argument 2
Argument 3
Argument 4
Argument 5
Argument 6
Argument 7

I tick 5 of them:

Argument 1
Argument 3
Argument 4
Argument 5
Argument 6

I want to do a few more questions regarding 3 of these arguments.
And i want Lime to random select them.

How can i do this?

Thanks in advance,
Américo

Please Log in to join the conversation.

2 years 7 months ago #110623 by tpartner
Assuming the following questions are types that array filter can be applied to...
  1. Set those questions to display the answers in random order
  2. Apply an array filter to those questions based on the first question
  3. Use JavaScript to hide all but the first 3 rows of those questions

Details of the JavaScript would depend on the question types.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

2 years 7 months ago #110631 by AAlves
Thank you, tpartner.

I will give it a try tomorrow morning.

BR.
AAlves

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form