Welcome, Guest
Username: Password: Remember me

TOPIC: Can I download data programatically?

Can I download data programatically? 3 years 9 months ago #54642

  • Luke
  • Luke's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 13
  • Thank you received: 1
  • Karma: 1
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
The administrator has disabled public write access.

Re: Can I download data programatically? 3 years 9 months ago #54649

  • bkgray
  • bkgray's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 2
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:
The administrator has disabled public write access.

Re: Can I download data programatically? 3 years 9 months ago #54659

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
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 :)
The administrator has disabled public write access.

Re: Can I download data programatically? 3 years 9 months ago #54857

  • Luke
  • Luke's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 13
  • Thank you received: 1
  • Karma: 1
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.107 seconds
Donation Image