Edit answer options via RPC

More
3 years 2 days ago #143136 by dolfim
Is it possible to set the answer options via the RPC interface?

I tried with the set_question_properties function (since the get_question_properties returns this data), but I only get "No valid Data". Looking at the code it looks like the answer options are in some other table which is accessed in set_question_properties.

Is there any other way to modify these settings programmatically?

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 years 2 days ago #143145 by tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
3 years 2 days ago #143164 by dolfim
Replied by dolfim on topic Edit answer options via RPC
I actually want to change the text of the answer options (actually translate it).

Is update_response() supposed to do so?
It looks to me this function will modify the response of a participant, or?

Please Log in or Create an account to join the conversation.

More
3 years 1 day ago #143172 by tpartner
No, it would be set_question_properties() . Note that this will modify the question for all future respondents.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #146631 by thomas12
Hi everyone,
I'm writing here because I have got the same problem and there was no obvious solution.

I tried to change a questiontext of a question with set_question_properties(). This worked perfectly as described.

I only got a problem when changing the answer options of a question. In this case set_question_properties() always returns "No valid Data".

This is my function call:

$answer = $this->client->set_question_properties(
$this->sessionkey,
$qid,
array(
'answeroptions' => array(
'1' => array(
'answer' => 'test test test'
)
)
),
'de'
);


Does anyone know where the problem lies?
I'm using Version 2.05+ Build 140502.

Best regards

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #146661 by DenisChenu

thomas12 wrote: Does anyone know where the problem lies?
I'm using Version 2.05+ Build 140502.

Maybe an issue with this version ..... update to last 2.06 version and see what happen

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #146956 by dillusion13
Has anyone figured this out?

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!