Commit graph

155 commits

Author SHA1 Message Date
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
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
639a3398f0 Fixed Survey expression validation handling of verbatim values 2009-05-11 08:16:14 +00:00
Patrick Donelan
7a3ecea4bb Survey Expressions can now access verbatim values 2009-05-11 06:55:13 +00:00
Patrick Donelan
5f80ac35f6 Fixed Survey "copy" button on Edit Survey page 2009-05-11 05:20:27 +00:00
Patrick Donelan
5d6b4093be Survey Expression Engine validation++
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
2009-05-10 07:45:14 +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
f3ed30d939 Refactored Survey ExpressionEngine tag() util into tag() setter and tagged() accessor.
Updated i18n to reflect the fact that min/max/step are used for all numeric types, not just slider.

Also updated textCols/Rows i18n.
2009-05-06 05:53:10 +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
Patrick Donelan
ac1a00b252 Survey Branch Expressions can now test whether a question
has been reached/answered, rather than just testing for the value
of a response
2009-05-04 04:06:40 +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
Kaleb Murphy
a0d41dc5ae Survey slider answer updates, now update all the answers for max,min,step settings since only the first answers values are used anyways. 2009-04-23 19:33:10 +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
caffe2751a Preliminary check in for new Survey text number type and validation. 2009-04-17 17:08:42 +00:00
Kaleb Murphy
234914c3e2 Survey drag-and-drop now returns the edit box for the item just drug. 2009-04-10 20:03:29 +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
Kaleb Murphy
99a1418714 Default Survey Question settings now save 100% of the answer configuration data. This will not affect previous Surveys, but allow new defaults to be more complex if desired. 2009-04-10 16:06:20 +00:00
Colin Kuskie
1b9fbb5fbd Fix POD syntax error in ExpressionEngine. 2009-04-09 15:12:25 +00:00
Patrick Donelan
f714f212af Added new Survey validation check - jump expressions defined when
enableSurveyExpressionEngine disabled site-wide
2009-04-09 07:58:01 +00:00
Patrick Donelan
571ca5db06 Fixed small bug in Survey validation where invalid branch expressions
wouldn't be shown
Improved and i18n'ed Survey validation warning container
2009-04-09 07:57:37 +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
Patrick Donelan
aa8379188a Survey branch expressions can now resolve score()s and value()s from
other survey instances.
2009-04-09 04:04:39 +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
c1ac5b9761 Fixed SurveyJSON->questions which was short-changing getGotoTargets 2009-04-02 05:55:23 +00:00
Patrick Donelan
57dae409c7 Further improved Survey validation checking 2009-04-02 05:55:00 +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
1ad5303267 Validates goto syntax on all objects now. 2009-03-31 05:00:22 +00:00
Kaleb Murphy
e515817053 Added limited goto expression syntax validator. Needs to do a bit more. 2009-03-31 04:58:00 +00:00
Kaleb Murphy
272283e75d Adding template and js to show warnings. 2009-03-31 04:39:48 +00:00
Kaleb Murphy
e73a7645a7 Survey now shows warnings if bad goto, bad gotoExpressions, no question text, survey looping,
or no question answers are found.
2009-03-31 04:08:44 +00:00