Welcome, Guest
Username: Password: Remember me

TOPIC: type of subquestions in the database

type of subquestions in the database 2 years 1 month ago #84492

  • mykulyak
  • mykulyak's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hello,

I have to write a software that extracts information from LimeSurvey database and modify it in some ways. Some time ago I noticed that for "matrix" questions types of their subquestions can be either "F" or "T" (for "F" type questions) or either "M" or "T" (for "M" type questions). Is there any difference between them (in other words, does the type of subquestion matter) ?
The administrator has disabled public write access.

Re: type of subquestions in the database 2 years 1 month ago #84593

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Not sure where you read about these characters F/T/M, do you have a link?

Have a look at the $showsgqacode feature, this should help identifying the correct IDs:
docs.limesurvey.org/Optional+settings&st...nd_Response_Browsing

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.

Re: type of subquestions in the database 2 years 1 month ago #84611

  • mykulyak
  • mykulyak's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Some information I found here here, the rest was discovered by reverse engineering the database.

The following query to the database (we use MySQL 5.x, if it matters)
SELECT DISTINCT q1.parent_qid, q1.qid, 
        q2.type AS parent_type, q1.type AS type
FROM panel_questions AS q1
LEFT JOIN panel_questions AS q2 
    ON q1.parent_qid = q2.qid
ORDER BY qid, parent_qid

gives the following result

File Attachment:

File Name: resultset.html.txt
File Size: 73 KB
. Subquestions with qid<=875 have the same types as their parent questions (M->M, F->F), but later all subquestions have type T.

I tried this with LimeSurvey 1.92+ and 1.91+ Build 11804 - both give the same result.
Last Edit: 2 years 1 month ago by mykulyak. Reason: attachment ...
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.150 seconds
Donation Image