Better Error Handling with Import Survey

More
2 years 11 months ago #129623 by litfincq
litfincq created the topic: Better Error Handling with Import Survey
Hi All,

(Not sure if this is a bug or a feature request, but...)

I have been messing around with Limesurvey's import a survey from file function (using Version 2.06+ Build 151205) and I was getting some very strange errors when importing tab-delimited files. I had a very hard time figuring out exactly what was causing them. It would have saved me a lot of time if the errors were more descriptive/were actually errors. I have listed examples below:

1. When importing a file which did not have the right structure (made in Excel 2003, switched to LibreOffice and it works fine) I got a "success" message with all the attribute values (questions, groups, etc) as "0". When I clicked on "Go to survey", I got a Page does not exist" message and the survey did not appear on the admin page. I would be nice if improper files generated an error, preferably directing the user to a page that explains about the whole Excel and CSV problem.

2. When importing a file which had a duplicate question number, I got a PHP error as opposed to a Limesurvey error. It was descriptive enough, but it would be nice if there was a proper Limesurvey error for this.

3. When importing a file with duplicate answer codes, I got an "error: array" Limesurvey message and nothing else. I checked my answer keys and there were no duplicates. However, I discovered by accident that answer keys are not case sensitive, where I assumed that they were since there was nothing in the documentation to the contrary. It would be nice if duplicate answer codes generated a specific error (as in, "Duplicate answer codes in question G01Q20" instead of the very generic "error: array" which could mean just about anything. It might also be a good idea to mention that answer codes are not case sensitive. (As an aside, the ability to have longer answer codes than 5 characters would be nice as well. 5 is not enough for a complicated survey. My university uses 8-character course codes, and it would be nice not to have to convert them to an arbitrary string just to deal with answer codes. Maybe 16 characters?)

Limesurvey is a great tool, don't get me wrong, but I think it still could use a few tweaks. Keep up the good work!

Yours,
Chris Litfin
McMaster University
Hamilton, Ontario, Canada

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago - 2 years 11 months ago #129820 by DenisChenu
DenisChenu replied the topic: Better Error Handling with Import Survey
TSV import is really hard actually to update, a lot of code and messy code. But this must be put in bug report i think (3 bug maybe).

WIth little file to test (1 or 2 question, please not more).

Denis

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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 2 years 11 months ago by DenisChenu.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!