Change texts of a survey
limesurvey_update_survey_textsChange texts of a survey by code, also at an active survey: survey title, description, welcometext and endtext (set_language_properties per language), group title and description by group_id (set_group_properties with questiongroupl10ns)…
Instructions
Change texts of a survey by code, also at an active survey: survey title, description, welcometext and endtext (set_language_properties per language), group title and description by group_id (set_group_properties with questiongroupl10ns) and question, help and subquestion texts by question code (set_question_properties with questionl10ns on the question or subquestion). Every text is one string for every survey language or a map with some of them. Before anything is written the tool refuses: answers or attributes in texts (TEXT_NOT_WRITABLE: RemoteControl cannot write them; at an inactive survey use limesurvey_update_question_from_spec), an unknown code or a language the survey lacks (SPEC_INVALID with the path), a group of another survey (GROUP_SURVEY_MISMATCH), a row that holds an embedded data URI in any field, which LimeSurvey would remove on saving (DATA_URI_PRESENT), and an expected_fingerprint that does not match (STALE_SPEC). Returns { survey_id, survey_active, changes [{ path, language, current, desired }], changes_total, applied, verification { ok, differences }, side_effects (for example empty mail templates LimeSurvey fills on saving), collateral_changes (other fields of the saved rows that changed), fingerprint }. dry_run true only reads (write scope none) and shows the changes; its fingerprint can be passed as expected_fingerprint. If a write fails, every text the call wrote is reset and read back (TEXT_UPDATE_FAILED with rolled_back; manual_cleanup names the old values that are not back); if only the read-back after the writes fails, VERIFY_READ_FAILED says written: true. A subquestion, question or group named twice answers SPEC_INVALID. Needs the write scope content (dry run: none).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| texts | Yes | The texts to set. | |
| dry_run | No | true: only show the changes; nothing is written (default false). | |
| survey_id | Yes | Numeric LimeSurvey survey ID. | |
| expected_fingerprint | No | The fingerprint of a dry run: the call stops with STALE_SPEC if a text changed since. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | ||
| workflow | Yes |