How to fetch additional question properties by JSON Remotecontrol API

More
2 years 2 months ago #126596 by kees
kees created the topic: How to fetch additional question properties by JSON Remotecontrol API
I'm trying to find out how to fetch certain question attributes by using the JSON Remotecontrol API. I know I can use get_question_properties() and fill up the aQuestionSettings with propertynames as used for the columns in the database table (lime_)questions, like 'title', 'mandatory' , ' relevance' , etc.

But I can't find out how to fetch the additional atrributes (by Remotecontrol API) stored in the table (lime_)question_attributes, like 'use dropdown', 'hidden', etc.

Can anyone help me out??

TIA,

Kees

Please Log in to join the conversation.

More
2 years 2 months ago #126633 by DenisChenu
DenisChenu replied the topic: How to fetch additional question properties by JSON Remotecontrol API
Hi,

Looking at code : github.com/LimeSurvey/LimeSurvey/blob/ma...rol_handle.php#L1378

Seems to return the attribute set, remind if attribute is 'default' : it's not set.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: kees

Please Log in to join the conversation.

More
2 years 2 months ago #126657 by kees
kees replied the topic: How to fetch additional question properties by JSON Remotecontrol API
Hi Denis,

It works!!! Retrieving all additional attributes in a subset.

THNX,

Kees

Please Log in to join the conversation.

More
3 months 1 week ago #158188 by limeAJ
limeAJ replied the topic: How to fetch additional question properties by JSON Remotecontrol API

kees wrote: It works!!! Retrieving all additional attributes in a subset.

May I ask how did you get it working?
Can you sanitize and post the get_survey_properties you used?

Please Log in to join the conversation.

More
3 months 1 week ago #158212 by DenisChenu
DenisChenu replied the topic: How to fetch additional question properties by JSON Remotecontrol API

limeAJ wrote:

kees wrote: It works!!! Retrieving all additional attributes in a subset.

May I ask how did you get it working?
Can you sanitize and post the get_survey_properties you used?

kees asking for QUESTION, not survey : github.com/LimeSurvey/LimeSurvey/blob/f6...rol_handle.php#L1422 : use null for question.

For survey : github.com/LimeSurvey/LimeSurvey/blob/f6...trol_handle.php#L257 get_survey_properties($sSessionKey,$iSurveyID) : get all attributes (since 2.65.2+170606 : github.com/LimeSurvey/LimeSurvey/commit/...17b471fdbc1a84b8ce26 )

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: limeAJ

Please Log in to join the conversation.

More
3 months 1 week ago #158222 by limeAJ
limeAJ replied the topic: How to fetch additional question properties by JSON Remotecontrol API
Yeah, that was an oops that I noticed after I posted.
Kees was asking for questions, and I was looking for survey.

I got it working after upgrading to the latest LimeSurvey version.

Thank you!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!