Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: Can I create my own import file?

Can I create my own import file? 2 Jahre 5 Monate her #76130

  • acp_tests
  • acp_testss Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 30
  • Karma: 0
We are a medical professional society and we publish a medical self-assessment product. It has about 12 sections, and each section has 100-150 multiple choice (4-5 choices) questions. We want to publish the questions online for about 250 users per section to assess the quality of the questions. We had written a custom app to do this in the past, but are hoping to find and on-line product that will save us the trouble.

We have the questions in an XML format. What I want to know is: can I create an import file from these XML files and import into LimeSurvey? I know LS can export a survey you've created by hand and re-import it, but can I create an import file from my XML and load it?

I created a sample question by hand and then exported the survey in lss format. Looking at the resultant file, there is a lot of stuff in there I'm not sure I can know, such as IDs and other things.

When you choose Import in LS it says you can import a CSV format, but I don't see anywhere that it tells me how that CSV file should be structured. That would be ideal and I could easily create it from our XML if I had a target format.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 5 Monate her #76157

  • Mazi
  • Mazis Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 5324
  • Dank erhalten: 293
  • Karma: 248
The import formats Limesurvey supports depend on a certain, predefined syntax. Once you break that, import will fail. Due to these restrictions I receommend to create the survey by using the admin interface. Creating a working import will probably take far more time.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: acp_tests

Re: Can I create my own import file? 2 Jahre 5 Monate her #76201

  • acp_tests
  • acp_testss Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 30
  • Karma: 0
Thanks for your response. I have 1500 of questions. If I have to create them by hand then I cannot use LimeSurvey. I already have the questions in an XML format. I don't agree it would take longer to create program to convert my XML than it would to create them all by hand if I understand the syntax. Is there any documentation re: the .lss file format?

I did an experiment. I created one question by hand of the most complicated type I think I have. Then I exported it to .lss. Then I imported that as a new test. When I diff'd the two files, the only things that appeared to change were the various ids (group ip, question id, etc.) Working from that I think I can see how I would do this.

I think I also read that when you do an import the questions, groups, etc. get new ids 'intelligently' so as not to overwrite any surveys that you already have that might have those ids.

So what I'm thinking is that I can create a program to generate the ids using my own internal but consistent numbering of groups and questions, and then import them.

Do you think this approach will work? Would I be violating any terms of use if I did this? Most of the big players in this space do not allow any sort of import, so I think facilitating this for capable developers would be a market advantage for your company.
Letzte Änderung: 2 Jahre 5 Monate her von acp_tests.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 5 Monate her #76222

  • TMSWhite
  • TMSWhites Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 759
  • Dank erhalten: 82
  • Karma: 36
Although there is no formal DTD or XSD for the LimeSurvey XML syntax, you can glean it from the source file - /admin/import_functions.php. The function is XMLImportSurvey()

I would expect that it may be faster to build an XML mapping interface than trying to re-create 1500 questions via the admin interface. There aren't any licensing or terms-of-use restrictions to trying to build such an import strategy.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 5 Monate her #76224

  • acp_tests
  • acp_testss Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 30
  • Karma: 0
Thanks! I'm going to give it a shot. I'll let you know how it goes.

But are you confirming that as long as I keep my numbering consistent everything should go in OK?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 5 Monate her #76272

  • dbrd
  • dbrds Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 11
  • Dank erhalten: 2
  • Karma: 1
I wonder, if you have 1500 questions whether you might have many similar questions where just the topic changes? I have a similar circumstance, surveys of 70 to 95 questions in groups, in which only the topics change in subsequent surveys. I find it convenient to export groups, then change the topic using search and replace in a text editor. Then import the resulting modified groups and build a new survey from scratch in a very short period of time.

You could do similar by creating and exporting prototypical questions, in which case you would find it easy to edit the questions directly in a text editor. Save under a new name, and then import.

My 2 cents.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: acp_tests

Re: Can I create my own import file? 2 Jahre 5 Monate her #76273

  • acp_tests
  • acp_testss Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 30
  • Karma: 0
I appreciate the suggestion, but that is not the case here. The questions are all different.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 4 Monate her #77219

  • TMSWhite
  • TMSWhites Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 759
  • Dank erhalten: 82
  • Karma: 36
acp_tests-

Do you still need an import format? If so, we have a new one available on the Yii branch. It is stable enough that you can use it import surveys from Excel, export them as .lss files, and then re-import those into a 1.92+installation.

Documentation of the format is here.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 4 Monate her #77263

  • acp_tests
  • acp_testss Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 30
  • Karma: 0
I was able to figure out how to create an .lss file from our question XML and they are importing just fine. As long as I keep the numbering consistent in my output file, everything works even if things get renumbered on upload.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Can I create my own import file? 2 Jahre 2 Monate her #81205

  • RBornat
  • RBornats Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 15
  • Karma: 0
I have need of an import format. I'm generating a programming questionnaire automatically, and the possibility of an import format is why I'm using LimeSurvey and not S*rv*yM*nk*y. When I clicked on the link in your message (the format is _here_) I didn't find it.

Is it still available? Or is there a better idea? (I couldn't get 2.0RC1 working on my Mac, but 1.92 is working fine.)
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.179 Sekunden
Donation Image