Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Edit answer options via RPC

  • dolfim
  • dolfim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #143136 by dolfim
Edit answer options via RPC was created 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #143145 by tpartner
Replied by tpartner on topic Edit answer options via RPC

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • dolfim
  • dolfim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #143172 by tpartner
Replied by tpartner on topic Edit answer options via RPC
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.
The topic has been locked.
More
7 years 2 months ago #146631 by thomas12
Replied by thomas12 on topic Edit answer options via RPC
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146661 by DenisChenu
Replied by DenisChenu on topic Edit answer options via RPC

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 .
I don't answer to private message.
The topic has been locked.
More
7 years 2 months ago #146956 by dillusion13
Replied by dillusion13 on topic Edit answer options via RPC
Has anyone figured this out?
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose