- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Edit answer options via RPC
- dolfim
- Topic Author
- Offline
- New Member
Less
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?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
7 years 5 months ago #143145
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Edit answer options via RPC
Perhaps update_response() -
api.limesurvey.org/classes/remotecontrol...thod_update_response
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
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?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
7 years 5 months ago #143172
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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.
- thomas12
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13910
- Thank you received: 2548
7 years 2 months ago #146661
by DenisChenu
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.
Replied by DenisChenu on topic Edit answer options via RPC
Maybe an issue with this version ..... update to last 2.06 version and see what happenthomas12 wrote: Does anyone know where the problem lies?
I'm using Version 2.05+ Build 140502.
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.
- dillusion13
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
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.