Show 60 time each question from random question pool

More
1 month 2 weeks ago #188504 by Chiara_Posadinu
Hi,
I created a survey with 153 questions, but each participant can see only 10 of these picked randomly from the question pool. But, I also need 60 answer for each question. Is there an automatich way to stop to show the quastions that have 60 answer and keep randomize the others?

Thanks in advance!

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 1 week ago #188510 by DenisChenu
No,

Must construct a plugin for this …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188534 by Chiara_Posadinu
As I thought. Thank you for the confirmation!

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188579 by Joffm
Hi, Chiara,
if you have some knowledge in php and access to your server, you can do an ajax call.
Create a question of type "short text" (let's call it "rq") where you start your ajax call and store the result.
A small php program queries the LimeSurvey database to find all questions with less than 60 answers
and returns a string with 10 randomly selected questions like
,4,23,67,134,49,17,121,143,87,45,

In LimeSurvey you put all 153 questions into one group with the same randomization group name.
Then you can set the relevance equation of each question to
question 1: strpos(rq,",1,")!==false // meaning: If the string ",1," was found in "rq", display the question
...
question 87: strpos(rq,",87,")!==false
...
question 153: strpos(rq,",153,")!==false


Joffm

At the moment I am on vacation; so I don't have time to create an example. Maybe later.


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188590 by tpartner
Yes, you could also use the API to detect questions with more than 60 responses but be careful where you put the AJAX call - it will take some time to return a result so should be in a previous group or the relevance may be set before the AJAX return.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!