Welcome to the LimeSurvey Community Forum

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

Add multiples questions at once

  • ferdeng
  • ferdeng's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 1 month ago - 6 years 1 month ago #163104 by ferdeng
Add multiples questions at once was created by ferdeng
Hi all,

I read some things about adding multiple questions at once. From what I understood, this is not possible. What could work is the manipulation of the LSS backup file - I took a look at it but it seems to be very complex.

What I actually need is to ask 1 out of a few hundred questions - so I thought to add all questions at once to one category and make Limesurvey pick one of them randomly in every survey. Naturally, I don't want to copy all of these questions manually into the interface.

Is there an easy way to do this? Or at least an explanation about the structure of backup files?
Thanks in advance
Edit: What I forgot to mention is that I just need to change the question - everything else (categories etc.) is the same for all of them.
Last edit: 6 years 1 month ago by ferdeng. Reason: .
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 1 month ago #163112 by LouisGac
Replied by LouisGac on topic Add multiples questions at once
LimeSurvey doesn't have a loop question type. Jelo insisted a lot about how useful would be such a feature, so it's highly possible will offer a way to do it in the future.

For now, I see 2 different solutions to your problem:

1. Use the "copy question functionality". It will copy the whole question ("categories", etc), and then you'll just have to edit the question text

2. If you have some coding/script skills, you can also work directly on the lss files. Create a survey with 3 or 4 of the 100 questions, then export the survey as a lss archive. It's indeed an XML file that you can open with any editor. Then, you can write a script (or even an excel macro) to create the 100 questions, and directly edit the question text in the file.

Depending on your coding skills, 2 can be faster than 1. Whatever: it will be funnier, and you'll can reuse those script for further surveys.
The topic has been locked.
  • ferdeng
  • ferdeng's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 1 month ago #163115 by ferdeng
Replied by ferdeng on topic Add multiples questions at once
Thank you!
Yes, I think I can do option with a friend - however, is there some sort of documentation of the structure of LSS files? It puzzles me, I don't really understand some things like how IDs are assigned.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #163122 by tpartner
Replied by tpartner on topic Add multiples questions at once
You can modify the survey ID in the XML file and , if that ID does not already exist, it will be used. Otherwise a random ID will be assigned on import.

Group, question, sub-question and answer IDs cannot be assigned in the XML file. They are assigned sequentially on import.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 1 month ago - 6 years 1 month ago #163125 by LouisGac
Replied by LouisGac on topic Add multiples questions at once
I don't know if this document is up to date, but it could still help you:
manual.limesurvey.org/Tab_Separated_Value_survey_structure#Tips

Here is the function that decodes the XML inside the lss file, that could help you too:
github.com/LimeSurvey/LimeSurvey/blob/ma...elper.php#L792-L1528
Last edit: 6 years 1 month ago by LouisGac.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose