Open soberhofer opened 7 months ago
Hi @soberhofer, thanks for filing!
Unfortunately, the RemoteControl API doesn't seem to support it: https://forums.limesurvey.org/forum/development/134557-rpc-api-set-attributes-with-set_question_properties#241626.
The workaround recommended in that thread is to use import_question
^1 with question files edited by other means:
with open("my_question_file.lsq", "rb") as file:
client.import_question(file, survey_id=..., group_id=...)
For question types where it's relevant, you should be looking for a random_order
attribute I think:
<row>
<qid><![CDATA[207]]></qid>
<attribute><![CDATA[random_order]]></attribute>
<value><![CDATA[1]]></value>
<language/>
</row>
And FWIW I've wanted to add features to this library to help programmatically construct XML for questions and surveys but it seems daunting since the schema is undocumented ... and it's XML 😅
Thank you very much for your input. I guess i'll have to to programmatically edit the lsq or the lsg, and then import it that way. Yeah, daunting is the right word. :D
Citric Version
1.0.0
Python Version
3.10
LimeSurvey Version
6.4.10
Backend database
Limesurvey Hosted
Operating System
Limesurvey Hosted
Description
I am trying to programmatically update the
answer_order
of all questions in a survey torandom
.I have confirmed I can update other properties such as
title
usingbut when I try
I get
No valid Data
is setting nested properties not supported? I couldn't find anything in the documentation.
Code
No response
Permissions Matrix
No response