Welcome, Guest
Username: Password: Remember me

TOPIC: File LSS - tag <cid> <qid> <cqid>

File LSS - tag <cid> <qid> <cqid> 2 years 3 months ago #79163

  • titoun31
  • titoun31's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 94
  • Thank you received: 11
  • Karma: 6
Hello all !

I've just one question about the exported file LSS from a survey: what means the tags <cid> <qid> and <cqid>? I think that it is an ID for the questions and maybe group but I don't understand the logic ... And I would like to know how is calculated the numbers inside those tags?

Just for your understanding, I would like to automate the design of this LSS file from a survey analysis software where I have a matrix of my questionnaire ...

Thank you very much for your support.

Thibault
The administrator has disabled public write access.

Re: File LSS - tag <cid> <qid> <cqid> 2 years 2 months ago #79171

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1061
  • Thank you received: 234
  • Karma: 74
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...
The administrator has disabled public write access.

Re: File LSS - tag <cid> <qid> <cqid> 2 years 2 months ago #79182

  • titoun31
  • titoun31's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 94
  • Thank you received: 11
  • Karma: 6
Thank you Benoit, I'll see it right now ...
The administrator has disabled public write access.

Re: File LSS - tag <cid> <qid> <cqid> 2 years 2 months ago #79189

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1061
  • Thank you received: 234
  • Karma: 74
the few things I know:

1)
<sid> survey id
<gid> group id
<qid> question id

2) Groups ids, questions ids, subquestions ids, conditions ids, assessments ids are generated by auto-increment.
=> See admin/import_functions.php

3) When you import a survey from a platform to another one (e.g. local to remote) only SID remain the same... all others id's change (For this reason it could be sometimes better to import the entire database via phpMyAdmin or similar !)

4) You can change without problem SID (survey id) into the XML .lss file
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...
Last Edit: 2 years 2 months ago by Ben_V.
The administrator has disabled public write access.

Re: File LSS - tag <cid> <qid> <cqid> 2 years 2 months ago #79192

  • titoun31
  • titoun31's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 94
  • Thank you received: 11
  • Karma: 6
So when you read an exported LSS file, e.g.:
<row>
<qid><![CDATA[628]]></qid>
<parent_qid><![CDATA[0]]></parent_qid>
<sid><![CDATA[51917]]></sid>
<gid><![CDATA[54]]></gid>
<type><![CDATA[M]]></type>
<title><![CDATA[Prel1]]></title>
<question><![CDATA[My first question?]]></question>
<preg><![CDATA[]]></preg>
<help><![CDATA[]]></help>
<other><![CDATA[N]]></other>
<mandatory><![CDATA[Y]]></mandatory>
<question_order><![CDATA[0]]></question_order>
<language><![CDATA[fr]]></language>
<scale_id><![CDATA[0]]></scale_id>
<same_default><![CDATA[0]]></same_default>
<relevance><![CDATA[]]></relevance>
</row>

The numbers into the tags qid and gid "628" and "54" have been auto-incremented in relation to my previous surveys ... I guess ....
As this, is my first question of my questionnaire, if I would like to import this survey with new ID beginning by "1" and "1" (first group, first question), in your opinion, Will there be a new auto-increment? ahah .... You're totally right (point 3 of your answer :!!!) !!

Thank you very much to have enlightened my way !!!! :))
The administrator has disabled public write access.

Re: File LSS - tag <cid> <qid> <cqid> 2 years 2 months ago #79199

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1061
  • Thank you received: 234
  • Karma: 74
For me it seems quiet impossible to manage the auto-increment except reset to 0 in case of special needs using the SQL query:
ALTER TABLE table_name AUTO_INCREMENT=0

'Special needs' can be for example if you had (in the past) surveys with conditions or assessments, deleted in the present and you want to launch a new serie starting with ids=1...

In the other hand managing the survey ids (<sid>) can be great for installations with clear categories of questionnaires:
<sid> with format 1xxx => internal surveys
<sid> with format 2xxx => external surveys
<sid> with format 3xxx => ...
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...
The administrator has disabled public write access.

Re: File LSS - tag <cid> <qid> <cqid> 2 years 2 months ago #79423

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
titoun31 wrote:
The numbers into the tags qid and gid "628" and "54" have been auto-incremented in relation to my previous surveys ... I guess ....
As this, is my first question of my questionnaire, if I would like to import this survey with new ID beginning by "1" and "1" (first group, first question), in your opinion, Will there be a new auto-increment? ahah .... You're totally right (point 3 of your answer :!!!) !!

Thank you very much to have enlightened my way !!!! :))
if this is a fresh system, the question ID will start at 1.

Do NEVER change the incrementing IDs, this might mess up your survey because of inconsistencies.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.118 seconds
Donation Image