Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Randomly generate questions

  • spalan
  • spalan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #171371 by spalan
Randomly generate questions was created by spalan
Hi everybody,

I would like to do the following in a survey:

  • I provide a list of five-word sets, in for example a .csv file (example for one set: "weather, fine, is, The, today")
  • Limesurvey should randomly draw sets from this list and display them to the people taking the survey
  • Participants have to enter the order of the words to form a correct sentence (e.g., 4, 1, 3, 2, 5; which would correspond to "The weather is fine today")
  • This repeats for a fixed amount of time, e.g., 5 minutes

Is this possible? How would I go about implementing this?

Thanks,
Stefan.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 9 months ago - 5 years 9 months ago #171389 by LouisGac
Replied by LouisGac on topic Randomly generate questions

spalan wrote: Hi everybody,

Is this possible?



In computer science, the answer to that question is always "yes". It's a just a matter of time, money and skills.

There is different ways to do what you want in limesurvey.

Simple one: using label sets, rank questions and branching
Complex one: creating a question theme or a plugin for that.


Label sets:
manual.limesurvey.org/Label_sets

Ranking question:
manual.limesurvey.org/Question_types#Ranking

Branching:
via condition manager (easy, with mouse) : manual.limesurvey.org/Setting_conditions..._conditions_designer

writting expressions: manual.limesurvey.org/Expression_Manager


maybe the other limesurvey users in the forum will have other ideas to do what you want.
Last edit: 5 years 9 months ago by LouisGac.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171400 by tpartner
Replied by tpartner on topic Randomly generate questions
I don't have suggestions for the survey structure but I do wonder how this data will ever be analyzed.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • spalan
  • spalan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #171404 by spalan
Replied by spalan on topic Randomly generate questions
Dear LouisGac,

Thanks! This looks very helpful. I can see that the Ranking question will be very helpful and once I have gotten to the depths of them, so seem the label sets. I am not sure I need branching, since I do not plan on judging correctness within LimeSurvey, but maybe I misunderstood what you meant me to do with this functionality.

Best regards,
Stefan.
The topic has been locked.
  • spalan
  • spalan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #171405 by spalan
Replied by spalan on topic Randomly generate questions
Dear Tony Partner,

I plan on running experiments related to the work of www.econstor.eu/bitstream/10419/32599/1/622374273.pdf .

Best,
Stefan.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago - 5 years 9 months ago #171407 by Joffm
Replied by Joffm on topic Randomly generate questions
Hi, spalan,
my suggestion:

1. Create a question of type "long free text" (Fr) with your word sets as lines
#1#This,a,high,is,house
#2#nice,a,Karen,is,girl
#3#bull,The,runs, quickly,very
#4#Phoenix,capital,Arizona,the,is
All lines should have the same length (right filled with blanks)

2. LimeSurvey does not support loops.
So you have to create a maximum number of question groups, let's say 30.
In each group you
  • create a random number between 1 and the numbert of word sets
  • select the set by string functions like "trim(substr(Fr, strpos(Fr, '#' + random + '#') + strlen(random) + 2, [fixed length of line]))"]
  • put each word of the set into the ranking question

3. LimeSurvey doesn't have a surveywide timer.
So your respondents will do all tests. Therefore estimate before how much will be necessary to fill 5 minutes.
Afterwards (in the analysis) remove all answers of the respondent that exceeded the 5 minutes.
In the export you will get the duration of each group.

For the first part I have an example. I will adapt it to your desire tomorrow.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 9 months ago by Joffm.
The following user(s) said Thank You: LouisGac, spalan
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171410 by Joffm
Replied by Joffm on topic Randomly generate questions
Second suggestion, the very easy way:

create as many ranking questions as there are word sets
create two groups
put as many questions into the first group as you wish to be answered (this group has relevance = 1)
put the rest of the questions into the second group (this group has relevance = 0)
all questions are in the same randomization group.

So you will get randomly selected questions out of the total pool.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • spalan
  • spalan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #171412 by spalan
Replied by spalan on topic Randomly generate questions
Dear Joffm,

Thanks so much for your suggestions. I will start playing around with them tomorrow. However, I first need to address the timing issue. It is essential that I be able to set a certain time limit for this task. Is there a possibility to, say, save the time when participants get to the first word puzzle and then in later questions, when participants submit their answers, conditional on the time elapsed since the first puzzle direct them either to the next word puzzle or to a different question?

Best,
Stefan.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171413 by tpartner
Replied by tpartner on topic Randomly generate questions
Regarding the survey timer, the way I have handled this in the past is to initiate a cookie to store and update the elapsed time every second. When the allowed time passes, the (hidden) index is clicked to direct the respondent to a final message.

Details of the required scripts and style would depend on the LimeSurvey version and template used.

It should be noted that this method is not respondent-proof. It is possible, with a little knowledge, for the respondent to reset/delete the cookie. Also, cookies are browser specific, so restarting the survey on another device or in another browser would re-initiate the timer.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LouisGac, spalan
The topic has been locked.
  • spalan
  • spalan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #171421 by spalan
Replied by spalan on topic Randomly generate questions
It seems my organization is using Version 2.05+ Build 150508. I take it this is a pretty old version, would this still be possible?

Best regards,
Stefan.
The topic has been locked.
  • spalan
  • spalan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #171422 by spalan
Replied by spalan on topic Randomly generate questions
If not, I could use the limesurvey.org hosted version, I guess.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171440 by Joffm
Replied by Joffm on topic Randomly generate questions
Hi,

here is an example of my first suggestion.

Only 6 texts and 3 rankings.
But you see the structure and how to extend.

Tested in Version 2.06+ Build 160129

File Attachment:

File Name: limesurvey...5231.lss
File Size:26 KB


Joffm

Example of second later.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: LouisGac, spalan
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose