GithubHelp home page GithubHelp logo

Comments (3)

soberhofer avatar soberhofer commented on June 28, 2024 1

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

from citric.

edgarrmondragon avatar edgarrmondragon commented on June 28, 2024

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_question1 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>

Footnotes

  1. https://citric.readthedocs.io/en/stable/_api/citric/client/index.html#citric.client.Client.import_question

from citric.

edgarrmondragon avatar edgarrmondragon commented on June 28, 2024

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 😅

from citric.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.