Commit graph

105 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Patrick Donelan
79db642219 Refactored Survey for more happy endings
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
2009-05-12 12:36:26 +00:00
Patrick Donelan
7a3ecea4bb Survey Expressions can now access verbatim values 2009-05-11 06:55:13 +00:00
Patrick Donelan
cf98c81461 Fixed Survey's handling of multi-answer questions (e.g. maxAnswers != 1)
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
2009-05-08 08:00:04 +00:00
Graham Knop
01de17428e fix pod typo 2009-05-07 15:57:07 +00:00
Patrick Donelan
330c8f416c Fixed Survey jump target and jump expression precedence order across
Answer, Question and Section (and improved documentation in API)
2009-05-07 06:42:27 +00:00
Patrick Donelan
494efe1cf1 Added Country question type to Survey
Refactored WebGUI::Form::Country so that it can be used to return a list of countries
2009-05-06 02:38:26 +00:00
Patrick Donelan
3dda2b49d4 Survey Branch Expressions now allow you to "tag" data along the way and store
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.
2009-05-04 06:28:05 +00:00
Kaleb Murphy
54063ae9f6 Survey sections now have logical section type, which is never shown to the user, only used for silently checking gotos. 2009-04-30 20:43:23 +00:00
Patrick Donelan
6c58e1de81 Added Survey meta-targets NEXT_SECTION and END_SURVEY to allow for more
convenient jumping
Improved processGotoExpression tests
2009-04-22 07:19:23 +00:00
Patrick Donelan
99855719d0 Survey bug fixes: Verbatim responses now properly recorded
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
2009-04-22 05:16:29 +00:00
Patrick Donelan
c3ea6d4683 Added Survey back button, with option to turn it on/off, tests, and i18n
Noticed that some Survey tests are broken, will fix tomorrow
2009-04-21 07:12:07 +00:00
Kaleb Murphy
724675c71c Survey new number type, if slider constraints are left blank, no constraints are applied. 2009-04-19 01:40:49 +00:00
Kaleb Murphy
9df02396b7 added Survey Number type. Text number entry that uses slider restrictions as constraints (server and client side). You can also use the arrow keys
to increment or decrement the number enter.
2009-04-18 22:23:35 +00:00
Kaleb Murphy
8cd5588f10 Survey [[question variable]] now returns the shown answer text for multiple choice questions, and the recorded value for non-multiple choice questions. 2009-04-10 17:46:17 +00:00
Patrick Donelan
aa7a20b4f2 Made Survey use question default score if answer score undefined,
updated hoverHelp
2009-04-09 05:38:49 +00:00
Patrick Donelan
f1f40bc129 Updated Survey help (recordedAnswer, Answer Score, etc..)
Fixed behaviour of Survey Question textInButton
2009-04-09 05:38:22 +00:00
Kaleb Murphy
af00b7a881 Survey summaries now use YUI datatables and charts for extra bling. 2009-04-08 20:03:41 +00:00
Patrick Donelan
a7cb9b031d Made Survey ExpressionEngine disabled by default, controlled via config
file enableSurveyExpressionEngine flag
Added branching based on question score and section score total
Added more tests
2009-04-08 08:12:44 +00:00
Patrick Donelan
9ea4f1cd20 Replaced Survey parseGotoExpression with dedicated ExpressionEngine.
Improved gotoExpression validation error reporting
Added lots more tests
2009-04-08 08:12:14 +00:00
Patrick Donelan
c1b18ea9bb Some fixes to the way Survey handles recordedAnswer, value, etc.. 2009-04-07 07:15:33 +00:00
Kaleb Murphy
a6a70a46e0 Summaries added to the survey 2009-04-05 19:33:46 +00:00
Kaleb Murphy
eda1c533e2 Survey summary code, intermediate check in. Zero changes in function. 2009-04-03 17:13:57 +00:00
Colin Kuskie
71f48efdc3 fix POD typos 2009-04-02 17:04:03 +00:00
Patrick Donelan
be4133d72c Improved Survey validation messages 2009-04-02 05:04:23 +00:00
Colin Kuskie
d05d49d47a Fix POD errors. 2009-04-02 04:09:14 +00:00
Patrick Donelan
654f8d6b72 Rewrote Survey gotoExpression tests now that we have perl power in
expressions
2009-04-02 01:54:21 +00:00
Patrick Donelan
3d70a213cc Made Survey branch expressions eval in safe compartment 2009-04-02 01:53:58 +00:00
Kaleb Murphy
774ef99cb6 Dont let stupid monkies play with object members 2009-03-27 00:11:19 +00:00
Graham Knop
b47ee4ea4d fixing pod 2009-03-12 21:38:58 +00:00
Patrick Donelan
7ec5cab126 Merge branch 'master' into survey
* master: (121 commits)
  Fix a POD typo.
  correct inbox message from user preface
  Fix a typo in the Default gallery view template
  Documentation bug in buildArrayRefOfHashRefs
  changed screenshots in Matrix Listing view to popup
  matrix privileging fixes
  Fix an i18n typo in the Post user defined variables.
  Remove debugging code.
  approval workflow fix
  matrix upgrade and privileging fixes
  fixed: Template parser cannot be set
  forward porting gallery bug fixes
  preparing for 7.7.0 dev
  parser should be a selectbox, not a selectlist.
  labeling survey as beta
  fixeding my borkes to the changelog
  fixed #9852: Users can accept private messages from Visitor, but Visitor cannot send messages
  preparing for 7.6.14 release
  fix AdSpace, Ad tests
  Restore the original properties for the profile category that was modified for test.
  ...

Conflicts:
	docs/gotcha.txt
	docs/upgrades/upgrade_7.6.10-7.6.11.pl
	lib/WebGUI/Asset/Wobject/Survey.pm
	lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm
2009-03-11 15:26:07 +11:00
Kaleb Murphy
0db9be4512 Added goto to sections and questions. Order of precedence is answer, question, then section. 2009-03-09 17:23:06 +00:00
Graham Knop
24da723629 updating copyright year 2009-02-20 23:47:30 +00:00