WebEnq

Online surveys and reporting

This project is maintained by Nivocer

Import data

Supported formats

At this moment we can import two type of datafiles:

Default spreadsheet

Questions are in columns, respondents in rows, the first row contains the question labels

Questback spreadsheets

A questback file has 3 tabs:

Questback has a limitation of 254 columns per tab, if it needs more than 254 columns multiple data-tabs are present.

Procedure

classes/Webenq/Import/Default.php::_getQuestionnaireQuestions (input is questions and answers)
calls: Webenq_Model_Question::factory($answers, $language)
calls: Webenq_Model_Question::_determinType()
is it a closed question:
no answers-> false
do we have >50 different answers -> false
if we have >7 different answers and the the average number of same answers is <3: false
is the difference between the shortest answers and longest answer >100: false
determine the type of closed question:
is it a scale (metric) question
do we have a answerPossibilityGroup in the database and is it metric?: true
is it a scale two-seven:
do we have a answerpossibilityGroup in the database with all the answers: obsolete.
do we have more different (not 'null') answers than the scale should have? (6 different answers on a 5-scale): false
only on 5:if ($question->otherValuesThanDefinedValid()): obsolete
is it a percentage question:
if all answers are numeric: false
if all answers are unique: false
is it a open question: always true
is it date: open_date
is it email: open_email
is it numeric: open_number
is it text: always true: open_text

we take care of so called null values ('don't know', 'n/a') with: Webenq_Model_Questions::getUniqueValuesExcludingNullValues(), this reads the values from the database table answerPossiblityNullValues and adds ""

open date has precedence above any closed question type
order is further defined by the protected variable $_childeren in Webenq_Model_Question and child classes:
closed
scale
five
six
seven
four
three
two
percentage
open
Email
Date
Number
Text

remark: webenq_model_question_group is not used, because it is not defined at webenq_model_question::_$childeren