- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show 60 time each question from random question pool
- Chiara_Posadinu
- Topic Author
- Offline
- New Member
Less
More
4 years 7 months ago #188504
by Chiara_Posadinu
Show 60 time each question from random question pool was created 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!
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!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 7 months ago #188510
by DenisChenu
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 .
I don't answer to private message.
Replied by DenisChenu on topic Show 60 time each question from random question pool
No,
Must construct a plugin for this …
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 .
I don't answer to private message.
The topic has been locked.
- Chiara_Posadinu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
4 years 7 months ago #188534
by Chiara_Posadinu
Replied by Chiara_Posadinu on topic Show 60 time each question from random question pool
As I thought. Thank you for the confirmation!
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
4 years 7 months ago #188579
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Show 60 time each question from random question pool
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.
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
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
4 years 7 months ago #188590
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Show 60 time each question from random question pool
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.
The topic has been locked.