SurveyJSON was storing a lot of redundant information (every setting on
every single section/question/answer, which, in most cases, will simply
take on the default values). This was bloating the surveyJSON property in
the db, and equally as importantly, slowing down Survey because it had to
do a lot of JSON parsing on the serialised surveyJSON object.
We now factor out and store the current section/question/answer defaults
along with the surveyJSON data itself, which means that we only needs to
store properties that differ from the defaults. This results is a massive
reduction in the size of the serialized surveyJSON stored in the database,
as well as a speed-up in json parsing time.
The compression/uncompression happens transparently to the rest of Survey.
Cleaned up edit page tabs
Improved API docs
Added noCreate option to responseId so that it doesn't create unnecessary responses
Added groupToTakeSurvey priv check to takeSurvey
For Sections with questions spread out over multiple pages, branch
expressions should only happen on the last page of the Section.
Added explicit test.
initSurveyOrder now builds a lookup cache to speed up branching
Test suite caches surveyOrder and response itself
Unnecessary sub calls reduced
Updated tests
My largest survey instance test suite, which contains > 1000 tests,
now runs nearly 8 times faster.
Fixed invalid calendar markup so that Date question type works in IE
Minor tweaks to ResponseJSON for more robustness
Fixed Number question type javascript
Fixed bugs in the handling of logical sections,
creating of responses and counting of responses.
Added in a bunch of new tests.
Jslinting of all survye js files
Fixed bug in SurveyJSON::update to stop it updating questionType when not asked
Fixed unsafe reference bug in SurveyJSON::getMultipleChoiceBundle
Added more Survey Test Suite tests
Tests are defined via a JSON-encoded spec, through Web Crud interface
Test results are TAP encoded, and TAP parsed and prettified into HTML
Added i18n, help and tests
refactored out repetitive checking of takenCount
added i18n template variables to Survey template so that user is told what happened for timeouts etc..
Refactored www_submitQuestions to use utility submitQuestions sub (for ease of testing)
Replaced numeric flags, completedCode etc..
Added restart() and exitUrl() to the Expression Engine
Added more Survey instance tests
Survey Expression Engine now detects invalid variable names passed to value(), score(), etc..
Also now detects situations where you have jump targets/expressions defined at multiple levels - thus causing precedence rules to kick in (normally this indicates a mistake)
Fixed Survey edit page bug where TextEditor would not move after gotoExpression textarea resize caused items to move
Now stores all supplied answers to multi-answer question as arrayref
Variable [[var]] text replacement converts to comma-separated list
Expression Engine's value() returns appropriate value depending on context
Expression Engine's score() does sum of multi-answers, as you would expect
Updated related i18n & hover-help, and tests
Cleaned up survey js somewhat
it in the response data structure along with the actual user input. Tag data
can be used in subsequent expressions, in [[tag]] templated text replacement,
and to classify responses in an arbitrary way.
Refactored Survey expression utility subs that lookup values/scores/tags in
external assets.
Fixed bug whereby only highest precedence Survey expression was being evaluated
rather than letting them all run and do their own short-circuiting.
Added useText option to responseValuesByVariableName so that it can be
used for both branch expressions and [[var]] text substitution correctly
Added extra verbatim handling to [[var]] text substitution
All survey test now pass, except for one involving True/False
multi-chocie bundle, soon to be fixed by updating bundle