Commit graph

201 commits

Author SHA1 Message Date
Colin Kuskie
be37f12ab1 Clone stopped working in several tests in 5.14.2. Remove it in favor of Storable::dclone.
Clone handles being passed scalar data, but dclone does not.
2012-10-23 10:00:53 -07:00
Scott Walters
0422807b32 Revert "group() function Survey::ExpressionEngine that returns 1/0 depending on whether the current user is in a group" -- wrong branch.
This reverts commit eaa29c5f44.

Conflicts:

	docs/changelog/7.x.x.txt
2012-06-19 19:31:50 -04:00
Scott Walters
eaa29c5f44 group() function Survey::ExpressionEngine that returns 1/0 depending on whether the current user is in a group 2012-06-19 16:22:30 -04:00
Colin Kuskie
200494b28d Fix an edge case where invalid JSON is written the database. Fixes bug #12303. 2011-11-20 22:24:14 -08:00
Patrick Donelan
8b34dc79ee Fix minor Survey bug
WebGUI::Asset::Wobject::Survey::ResponseJSON::responseValues was
returning empty result for indexBy => 'addresses'
2009-12-20 16:10:04 -05:00
Patrick Donelan
804dbcfd26 One-line fix for Survey ExpressionEngine bug that took over a day to find.
One of the file-scoped lexicals in ExpressionEngine wasn't being initialised,
which meant that tagged data was being cached across repeated engine runs
(including, would you believe, across modperl page requests).

The fix includes tests.
2009-11-05 21:15:47 -08:00
Patrick Donelan
5899fa4289 Revert "One-line fix for Survey ExpressionEngine bug that took over a day to find."
This reverts commit bcd99945ca.
2009-11-05 22:37:50 -05:00
Patrick Donelan
bcd99945ca One-line fix for Survey ExpressionEngine bug that took over a day to find.
One of the file-scoped lexicals in ExpressionEngine wasn't being initialised,
which meant that tagged data was being cached across repeated engine runs
(including, would you believe, across modperl page requests).

The fix includes tests.
2009-11-05 22:27:47 -05:00
Patrick Donelan
280e902c09 Fixes to Survey reporting and performance improvements
Fix: Survey export simple/transposed results to csv or tab
Fix: loadTempReportTable handling of revisionDates (and documentation)
Fix: returnResponseForReporting handling of mc questions
NYTProf performance improvements
Added some very basic Survey reporting tests
2009-08-23 05:15:32 +00:00
Patrick Donelan
2cc10d2953 Survey JSON performance warning for non-wre-standard JSON modules/versions
If you have funny combinations of JSON, JSON::XS and JSON::PP installed,
JSON can start deciding to use JSON::PP instead of JSON::XS, which equals
bad performance on very large Survey instances.

This commit adds a new warning to the Edit Survey page if JSON->backend
is detected to be something other than JSON::XS.
2009-08-09 06:25:49 +00:00
Patrick Donelan
146373937d Fixed two new Survey bugs
* Survey response startDate stored twice
startDate was being stored both in a column in Survey_response and also inside the
serialised responseJSON. Consolidated to column and moved startDate methods to
Survey.pm where they are actually used. Was not causing errors because both copies
were initialised to "now" at response creation time, and then never changed (this is also
why we don't need any repair code to fix existing survey repsonses in the wild).

* Survey ExpireIncompleteSurveyResponses Workflow Activity not enabled
The only time you'd actually want to modify startDate is when you're trying to simulate
response expiry in test code, which is why I found the above bug when I was writing the
missing test suite for ExpireIncompleteSurveyResponses. Along with test suite, added
upgrade code to enable workflow activity and add it  to the Daily Maintenance Tasks
workflow. Also made minor fixes to the workflow activity, such as making sure it uses
the correct isComplete code.
2009-08-07 01:08:39 +00:00
Patrick Donelan
84d8b24cec Add missing POD to SurveyJSON
Also fix a bug I noticed while updating POD - when removing a
multiple-choice bundle the question should have its questionType
set to the generic "Multiple Choice' question type rather than
leaving it set to the now-deleted bundle questionType.
2009-07-12 03:28:54 +00:00
Patrick Donelan
b149367c11 Survey: fixed handling of multi-choice question bundles in Test.pm 2009-07-10 03:32:44 +00:00
Colin Kuskie
3cd1e13051 Add missing POD and fix POD typos in subroutine names. 30/441 failing 100% POD coverage. 2009-07-04 20:09:35 +00:00
Patrick Donelan
29f20d3889 Fixed bug in Survey::ExpressionEngine - was not using most recent survey
response to resolve external values
2009-07-03 01:39:53 +00:00
Patrick Donelan
0265e1dfbd Fixed Survey::Test diagnostics when comparing complex data structures 2009-07-03 01:39:16 +00:00
Patrick Donelan
b5186bfbab fixed #10565: Survey: add question doing double-create 2009-06-22 07:08:08 +00:00
Patrick Donelan
cbc308c55a SurveyJSON size reduction/optimization
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.
2009-06-19 08:07:18 +00:00
Patrick Donelan
9004e5d711 Survey cleanup and minor bug fixes
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
2009-06-09 03:27:06 +00:00
Patrick Donelan
3ffb76ef7f Fixed Survey testsuite handling of Tagged question type 2009-06-03 07:16:14 +00:00
Patrick Donelan
5acade845a Fixed Survey test suite 'tagged' check to work with nested data 2009-06-03 07:15:52 +00:00
Patrick Donelan
9702ffcaac Fixed Survey section-level branch precedence bug
For Sections with questions spread out over multiple pages, branch
expressions should only happen on the last page of the Section.
Added explicit test.
2009-06-03 02:12:00 +00:00
Patrick Donelan
da595da89e Remove bloat from Survey response record to reduce json serialisation time 2009-06-03 02:11:31 +00:00
Patrick Donelan
216a48580a Fixed #9927 Survey - verbatim
Fixed inconsistencies between answer 'comment' and 'verbatim'.
Updated tests.
Made minor changes to reporting methods but they still need some love.
2009-06-03 00:29:29 +00:00
Patrick Donelan
7faa9c3e9d Fixed Survey Date question type server-side validation, and made
all validation messages generate debug output
2009-06-02 01:48:41 +00:00
Graham Knop
66843db604 string evals are evil 2009-05-29 21:41:52 +00:00
Patrick Donelan
beff1d2166 Survey NYTProf performance improvements
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.
2009-05-28 07:24:11 +00:00
Patrick Donelan
d14cf19e9d Added Survey tests for more question types 2009-05-28 07:23:43 +00:00
Patrick Donelan
0ad26a1921 Survey: more bug fixes
Fixed invalid calendar markup so that Date question type works in IE
Minor tweaks to ResponseJSON for more robustness
Fixed Number question type javascript
2009-05-24 09:59:43 +00:00
Patrick Donelan
3a25e806c6 Survey bug fixes
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
2009-05-23 09:54:03 +00:00
Patrick Donelan
5e7c594440 Started fixing Survey responseId handling 2009-05-23 09:53:28 +00:00
Colin Kuskie
946cf6e026 Fix syntax warnings in Survey/Test.pm 2009-05-21 15:09:15 +00:00
Patrick Donelan
302e217e7a Survey test suite added support for checking answer properties 2009-05-21 08:22:11 +00:00
Patrick Donelan
f55559e124 Survey: fixed subtle bug in testing of answers with recordedAnswer set to q{} 2009-05-21 08:21:54 +00:00
Patrick Donelan
d246454b2f Survey: fixed bugs in handling of test setup & Slider question type 2009-05-21 08:21:35 +00:00
Patrick Donelan
8baf09948e Fixed bug where ResponseJSON was not properly resetting between
tests. Refactored out reset() sub to make it easy for people to
achieve reliable resetting of rJSON objects.
2009-05-21 08:21:17 +00:00
Patrick Donelan
867aa51507 Fixed Survey bug in handling of logical sections 2009-05-20 10:17:46 +00:00
Colin Kuskie
bee4437007 Fix syntax warning with multiple my's. 2009-05-19 22:13:05 +00:00
Patrick Donelan
59329e9718 Survey tweaks
Added Survey 'Tagged' question type, which builds its answers dynamically from tagged data
Made Survey test suite more forgiving about JSON parsing
2009-05-19 02:45:45 +00:00
Patrick Donelan
a9638ae691 Survey: Let them eat sort 2009-05-19 02:45:26 +00:00
Patrick Donelan
9cbd30c3d8 Refactored Survey test suite diagnostics etc.. 2009-05-17 08:15:59 +00:00
Patrick Donelan
3105b27034 Improved Survey test setup 2009-05-16 09:06:00 +00:00
Patrick Donelan
4d181da7f9 SurveyJSON bug fixes
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
2009-05-16 07:24:55 +00:00
Patrick Donelan
7e0796cc78 Some minor Survey bug fixes
Removed evil "use JSON -support_by_pp"
test() and test_mc() now intelligently start at the right place and give better TAP descriptions
2009-05-16 01:13:20 +00:00
Patrick Donelan
2bde3dc02c Moved Survey test upgrade to 7.7.6-7.7.7 upgrade script 2009-05-15 23:42:10 +00:00
Patrick Donelan
7829d708ea Survey test suite now functional.
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
2009-05-15 10:33:47 +00:00
Patrick Donelan
f18d4e193e Added crud for Survey test suites 2009-05-14 07:14:38 +00:00
Colin Kuskie
edb842e7ae Fix a POD whitespace problem in SurveyJSON. 2009-05-13 02:28:08 +00:00
Patrick Donelan
c9861bdf8f More Survey refactoring
refactored out repetitive checking of takenCount
added i18n template variables to Survey template so that user is told what happened for timeouts etc..
2009-05-13 02:10:57 +00:00
Patrick Donelan
6815cd76aa Improved handling of Survey restart 2009-05-13 02:10:34 +00:00