Check out the LimeSurvey source code on GitHub!

Can I download data programatically?

More
6 years 2 weeks ago #54642 by Luke
Hi,

I need to script (automate) the following operations:

- download LS data
- validate the data
- process the data
- create a report

So, can I download anything programatically? I can see there is a command line tool for importing surveys (cmdline_importsurvey.php). I would need something just like this but for exporting data. Has anyone tried that?

Thanks,
Luke

Please Log in to join the conversation.

More
6 years 2 weeks ago #54649 by bkgray
Luke -

I create customized reports from LimeSurvey frequently. I create a custom PHP script for each survey, depending on the specific needs of the people who requested the survey.

I have attached a zip file containing a survey structure file (suitable for importing into LimeSurvey) and the two PHP files that create a report in a PDF file.

The survey is a course evaluation used by the Foreign Language department. It has some questions common to all languages and some specific to Chinese courses. After importing the survey, you will have to modify the PHP files to use the correct survey, group, and question numbers.

The PDF file is created by the tool at www.ros.co.nz/pdf/

This will give you an idea of how I approach this.

Good luck.

bkg
Attachments:

Please Log in to join the conversation.

More
6 years 2 weeks ago #54659 by DenisChenu

bkgray wrote: This will give you an idea of how I approach this.

Great job bkgray,

Can you put this file on the documentation/workarounds section ? With some explanation ?

I think it can be very interesting :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
6 years 1 week ago #54857 by Luke

bkgray wrote: Luke -

I create customized reports from LimeSurvey frequently. I create a custom PHP script for each survey, depending on the specific needs of the people who requested the survey.


Thanks, but that's not quite what I wanted:

a) in my data dump I need exact same columns as they appear in files generated by LS.

b) you explicitely list questions (their IDs) inside of the script. I have over 450 questions, I can't put them in a file.

I need a very generic script that would take one argument only (survey ID).

So I guess I'll have to work on that myself.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form