Check out the LimeSurvey source code on GitHub!

Export -> Import. To remain the same group id, answer id.

More
5 years 6 months ago - 5 years 6 months ago #62475 by sitawit
Dear guys,

I have a survey created in another server and I want to export and then import it to another survey. The only problem is the ID of groups and answers are alter when it is in a new server.

I understand that it is because of inserting new data into the system the ID will just re-new generate according to auto-increment setting.

But how can we make it can be exact the same ID. I do have some issue that I need it to be the same ID. Is it possible? I use .lss format. I saw an exported ID in a file too. So it led me to believe I can do what I just ask but I can't.

Can someone guide me how?
Thanks
Last Edit: 5 years 6 months ago by sitawit.

Please Log in to join the conversation.

More
5 years 6 months ago - 5 years 6 months ago #62476 by Ben_V
Yes you can edit your .lss file changing the IDs values.

example for the survey ID:
a) open your .lss with a text editor
b) search for <sid>
c) change the number
d) upload and try

After for the question groups I imagine that you can get some troubles :P

BenoƮt

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last Edit: 5 years 6 months ago by Ben_V.

Please Log in to join the conversation.

More
5 years 6 months ago #62483 by greg_d
Hi,

as benitov said, you can change survey id in the .lss file, if such survey id does not exist in you database it will not be changed.
And this is the end of good news. Groups ids, questions ids, subquestions ids, conditions ids and so on are generated by auto-increment.
Take a look at admin/import_functions.php if interested.
If you are really desperate and survey is not very complicated you can try playing with ids inside database but then survey consistency is at risk.

Please Log in to join the conversation.

More
5 years 6 months ago #62499 by sitawit
Thanks, guys.

I'll try looking at import_functions.php. And I just wanna know why group id and answer id are there but can't remain the same when import to new server.

Please Log in to join the conversation.

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