Changeset |
Integrated Patch #410 by Ippa/Raffaella: Question type with answers based on .csv files. This patch gives the possibility for somebody who composes the survey to import a CSV file containing the possible answers to one question. In this way, somebody who makes up the survey if has the possible answers to one question in a .CSV file or in â.xlsâ file (convertible in CSV file) or in a database (the queries are easily exportable in CSV file), has the possibility to import them quickly, without spending time to insert them manually.
So, I have added two new types: âCSV Oneâ and âCSV Moreâ. With the type âCSV Oneâ is given to the end-user the possibility to choose by the list only one answers, while with âCSV Moreâ are possible multiple choices.
Once chosen one of the new types, it will open a form for the upload of the CSV file having the title: âUpload operations of CSV file runningâ. The first row of this file have to contain the description of the fields and it will be automatically removed. The upload could be KO, so some controls and some alerts for the end-user are included.
If the upload is OK it will open a form where are shown two list boxes: with the first on the left side is possible to visualize the file imported, while with the other the end-user can choose the number of the field that it will form the possible answers for a question.
The bottom âTo be continuedâ will complete the operations.
The code inserted in the various files is delimited by BEGIN and END. You can also find some commented code with OLD.
I hope that my explanations are enough clear, my English isnât very good!.
The descriptions are made in Italian too.
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@1692 b72ed6b6-b9f8-46b5-92b4-906544132732 |