Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

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

Export -> Import. To remain the same group id, answer id. il y a 3 ans 2 mois #62475

  • sitawit
  • Portrait de sitawit
  • Hors ligne
  • Fresh Lemon
  • Messages : 6
  • Karma: 0
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
Dernière édition: il y a 3 ans 2 mois par sitawit.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Export -> Import. To remain the same group id, answer id. il y a 3 ans 2 mois #62476

  • Ben_V
  • Portrait de Ben_V
  • Hors ligne
  • Platinum Lime
  • Messages : 1068
  • Remerciements reçus 235
  • Karma: 74
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

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Dernière édition: il y a 3 ans 2 mois par Ben_V.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Export -> Import. To remain the same group id, answer id. il y a 3 ans 2 mois #62483

  • greg_d
  • Portrait de greg_d
  • Hors ligne
  • Senior Lime
  • Messages : 47
  • Remerciements reçus 7
  • Karma: 4
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.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Export -> Import. To remain the same group id, answer id. il y a 3 ans 2 mois #62499

  • sitawit
  • Portrait de sitawit
  • Hors ligne
  • Fresh Lemon
  • Messages : 6
  • Karma: 0
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.
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.136 secondes
Donation Image