I love working with Limesurvey (I am using Version 3.17.3+190429)
and have already made several surveys.
However, this time I have to customize the XML of an LSS.
Example: I have 20 words as answer options in one question and want to create 30 surveys or
30 variants of this question, each time with a different set of 20 words.
So my first question is: is that possible to do within Limesurvey?
I guess not without much manual input, thus my more important second question:
1. I make my survey and export it as .lss. I can re-import it just fine, even if the same survey exists. New ID is created.
2. I change my words in the XML (with R) and save the .lss.
3. I get the error message upon importing:
"It is not a valid Limesurvey-XML-file. Cannot import survey."
In German: "Diese Datei ist keine gültige LimeSurvey-Umfrage-XML Datei. Import fehlgeschlagen."
I tried to change the <sid> fields and the title in R. Did not work.
I tried to just export the .lss and and re-import it. Worked.
I tried to manually edit one word in Notepad++. Worked.
So, what do I have to do that Limesurvey accepts my new .lss file?
Anything to do with my importing it in R?
I attach both the working version and the not working version ("doesnotwork.lss").
If it is only to change these 20 words, just copy the survey 30 times inside LimeSurvey.
Here you are free to set the survey title and a survey ID.
Then change your words in these new created surveys.
In my opinion the best option.
Other option: export to *.txt, open in EXCEl or OpenOffice, change and import the *.txt again
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Thanks for the fast reply!
However, that does not help. I have > 1000 words from which I sample.
These will go in several rounds of different surveys... Too much to do manually.
Did you really compare the two files in a text editor (like notepad++)?
Then you would have seen the quotes (probably added by R).
The first line of your "doesnotwork.lss": "<?xml version=""1.0"" encoding=""UTF-8""?>"
The first line of your "working survey.lss":<?xml version="1.0" encoding="UTF-8"?>
Remove the quotes and everything is fine.
Joffm
BTW: There are much more quotes in the lss file, which you have to remove. <gid><![CDATA[48]]></gid>
<sid><![CDATA[93232]]></sid>
<group_name><![CDATA[Einordnen von Verben in eine Hierarchie]]></group_name>
<group_order><![CDATA[2]]></group_order>
"<description><![CDATA[<p>Deine Aufgabe ist es, die folgenden Verben in eine Reihenfolge zu bringen - von allgemein, abstrakt und breit anwendbar zu speziell, unwichtig und eng.</p>"
""
<p>Es gelten die vorhin genannten 2 Merkmale:</p>
""
"<p>1. Allgemeinheit (= es gibt viele Unterkonzepte, z. B. drehen, laufen, springen zum Oberkonzept bewegen)</p>"
""
"<p>2. Breite Anwendbarkeit (das Verb lässt sich mit vielen Substantiven aus verschiedenen Bereichen (z. B. Tieren, Dingen, Ereignissen, usw.) sinnvoll kombinieren.</p>"
""
<p>Beispiele für die Ebenen:</p>
""
"<p>Ebene ""Sehr allgemein oder allgemein"" => bewegen</p>"
""
"<p>Ebene ""Relativ allgemein"" => springen</p>"
""
"<p>Ebene ""Speziell"" => herunterspringen</p>"
]]></description>
<language><![CDATA[de-informal]]></language>
Volunteers are not paid.
Not because they are worthless, but because they are priceless
thanks - that was it!
After some hours of re-importing (also without quotes) I found that it works only if
a) no quotation marks are there
b) first line is the xml header
c) the double quotation marks inside the first line have to removed, too.
For all R users that may read this - just add quote=FALSE, row.names = FALSE at the end of write.table when saving the survey.
For a prior customer, have done a development based on Excel for a very similar situation. He was able to choose the words on excel abd surveys were created automatically.
Please contact me at gabriel@encuesta.biz if need some help.
Thanks
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
I found your answer to the export/ import question and thought you might be able to solve my problem. These are not my own questinaires, but I was asked because I do create the users on our limesurvey installation at oldenburg university.
I do get the error message for every exported survey, when trying to import it again: Fehler
"Diese Datei ist keine gültige LimeSurvey-Umfrage-XML Datei. Import fehlgeschlagen."
The questionaires came direct from LimeSurvey and were imported without manipulating. But this morning we didt an update: "Die Datenbank wurde von Version 356 auf Version 359 aktualisiert." Now it works. Thank you for looking at my question.