Commit graph

76 commits

Author SHA1 Message Date
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
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
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
Colin Kuskie
4e2a8bab91 Bump up the version for Clone, since the new version works with
perl 5.10.
Have SurveyJSON use it instead of dclone.
2009-03-30 19:47:27 +00:00
Kaleb Murphy
046dae4f31 Moved multiple choice questions to the data base, and they can now be edited globally from the Survey edito 2009-03-26 21:02:30 +00:00
Kaleb Murphy
cafd31f87a New Question type. Just a Month-Year type with a month drop down and a 4 digit year text box. 2009-03-22 18:18:38 +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
Colin Kuskie
67f3f98731 Fix a Survey typo in the name of a political party. 2009-02-26 18:05:22 +00:00
Graham Knop
24da723629 updating copyright year 2009-02-20 23:47:30 +00:00
Patrick Donelan
50091e8e3a Started working on Survey Multiple Choice bundle management. 2009-02-16 00:13:58 +00:00
Kaleb Murphy
a350398f41 Logic is corrected, but the JS should probably be rewritten to be more like the WG PageLayout drag and drop so that it isn't so finicky. 2009-02-13 18:28:52 +00:00
Patrick Donelan
d882181fd1 Started refactoring the Survey.pm Wobject class
Refactored www_jumpTo and added tests
Added Params::Validate
Improved docs
Made call to SurveyJSON->createSurveyOrder() unnecessary
Turned ResponseJSON->nextResponse a mutator
2009-02-11 09:25:42 +00:00
Patrick Donelan
b0c5c09461 Merge branch 'master' into survey
* master: (127 commits)
  Prefill in the email address in the ITransact credentials form from the user's Shop address.
  fixed Matrix best/worst rated lists
  Fix bad form variable for phone number in EMS Badge address info.
  - Added a switch to allow the use of non-WebGUI objects with the Workflow
  fixing a problem with previous survey fix
  fixed #9671: Survey - breaks admin bar
  fixed a Matrix sql problem
  i18n the image labels and title for the asset manager, manage screen.
  Prevent an imported package from changing the a current asset's status from pending to anything else.
  Remove trailing comma in Shop/Transaction JS so IE6 works.
  fixed documentation
  fixed a bug when a matrix listing didn't have a forum attached
  small char encoding fix to merged upgrade
  fix small issue in addChild
  adding merge point
  Fix a problem with purging an EMS.
  Update this template so that it passes the template i18n test.
  Fix a broken i18n label in answer edit template for the Survey.
  Unify all Survey CSS into 1 file, and use it.
  Adding/fixing Survey i18n and Help
  ...

Conflicts:
	lib/WebGUI/Asset/Wobject/Survey.pm
	lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm
	lib/WebGUI/i18n/English/Asset_Survey.pm
	www/extras/wobject/Survey/editsurvey/object.js
2009-02-10 07:57:42 +00:00
Patrick Donelan
fa6976fb40 More ResponseJSON refactoring.
Finished refactoring nextQuestions()
Added recordedResponses sub
Added getTemplatedText sub
Added sectionId, questionId, answerId, sIndex, qIndex, aIndexes
abstraction subs
2009-02-06 05:15:26 +00:00
Patrick Donelan
932a033b58 More ResponseJSON refactoring
Removed unnecessary $session argument from recordResponses
Refactored nextQuestions to return a list rather than an arrayref
Lots more documentation for ResponseJSON
More param validation for ResponseJSON
Refactored recordResponses
Updated tests
2009-02-06 01:55:56 +00:00
Patrick Donelan
6fb325699f Refactored createSurveyOrder in ResponseJSON
Added lastSectionIndex, lastQuestionIndex, lastAswerIndex convenience
methods to SurveyJSON to simplify iterations over Sections, Questions
and Answers
2009-02-04 00:16:26 +00:00
Patrick Donelan
66a2adcbe5 Moved ResponseJSON data hash to private variable, for security and
consistency with SurveyJSON

Added some more accessors/mutators, and param validation
2009-02-03 08:32:40 +00:00
Patrick Donelan
57fb3cb238 Refactored SurveyJSON for perlcritic compliance.
Simplified some code, refactored out some C-isms.
2009-02-03 08:32:06 +00:00
Patrick Donelan
821635eb71 Refactored ResponseJSON and SurveyJSON
Added Params::Validate to ResponseJSON.pm
Refactored ResponseJSON constructor and re-ordered params for
consistency
Added new ->session accessor
Updates tests
Removed unnecessary logging methods
Further refactored SurveyJSON, gave private variables underscores,
replaced direct hash access with accessors
2009-02-03 08:31:43 +00:00
Patrick Donelan
8833459c74 Added param validation to all SurveyJSON.pm methods. 2009-02-03 08:31:24 +00:00
Patrick Donelan
d00c8661f3 Made first argument to SurveyJSON contructor $session for consistency
with rest of wg.

Also added Params::Validate validation.
2009-02-03 08:31:07 +00:00
Patrick Donelan
a1033aeaa2 Replaced all decode/encode_json method calls with to/from_json method
calls now that we've licked the Survey encoding bug (wrong mysql db
field type)
2009-01-27 05:47:36 +00:00
Yung Han Khoe
a612b56e92 adding grade book view to Survey 2009-01-26 14:57:01 +00:00
Patrick Donelan
c4eb4e3b57 Refactored updateQuestionAnswers and addAnswersToQuestion in SurveyJSON 2009-01-26 02:20:28 +00:00
Patrick Donelan
a2d01c34da Fixed a bug where newly created questions would not pre-populate answers
(caused by my refactoring)
2009-01-26 02:20:11 +00:00
Patrick Donelan
8d5e6880c0 More SurveyJSON refactoring (mostly documentation) 2009-01-21 05:34:58 +00:00
Patrick Donelan
102ec0dd25 More SurveyJSON refactoring.. 2009-01-21 05:34:41 +00:00
Patrick Donelan
ef7c0cfaa1 More SurveJSON refactoring (mostly documentation and simple code
changes)
2009-01-21 05:34:23 +00:00
Patrick Donelan
fe32551bca Added totalSections/Questions/Answers helper subs, refactored
getDragDropList to use helper subs, and added extra $address param
documentation.
2009-01-21 03:34:22 +00:00
Patrick Donelan
6d10570fdb Refactored SurveyJSON's new, freeze and addObject for readability 2009-01-20 07:34:55 +00:00
Patrick Donelan
c4540a96ee Replaces to_json and from_json with encode_json/decode_json to properly
handle non-ascii user input (e.g. MS Word apostrophe)
2009-01-19 03:33:07 +00:00
Yung Han Khoe
46cca4fae1 rfe 9200: Survey Text/TextArea handling 2009-01-15 14:17:40 +00:00
Patrick Donelan
b7520da07d Merge commit 'tags/WebGUI_7.6.8-beta' into survey-rfe
* commit 'tags/WebGUI_7.6.8-beta': (96 commits)
  Release 7.6.8-beta
  preparing for 7.6.8 release
  convert to new storage format
  fixing photo comment test
  fixed: Syndicated Content corrupts wide characters
  Add the WikiPage to the list of contributions shown in the Account Contributions tab.
  added #!/usr/bin/env perl to all utility scripts
  Forward port i18n fix for Gallery Album RSS list.
  Fix some Survey i18n typos in the time limit hoverhelp.
  Large batch of Help and i18n.  Also, make sure that the
  Fix a typo in the i18n help for the ITransact Pay Driver.
  Correct dataform captcha variable name in the help.
  Forward porting expanded patch for handling deleted things.
  Have Thingy check for existance of table and column to prevent
  Fix linking to other things and autocreating the form field for it.
  Update test to match fixed code.
  Remove the warnings pragma
  Only resize photos if they are larger than the Gallery resolutions.
  Fix a syntax error made in the i18n of the search button.
  I18n'ed a submit button in the manage transactions screen.
  ...

Conflicts:

	lib/WebGUI/Asset/Wobject/Survey.pm
	lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm
	www/extras/wobject/Survey/editsurvey.js
	www/extras/wobject/Survey/editsurvey/object.js
2009-01-14 06:00:06 +00:00
Patrick Donelan
fc3851705a Implemented Survey branching expressions (#9233). Woot! 2008-12-15 10:25:44 +00:00
Patrick Donelan
ad0f3b388d SurveyJSON->update() should iterate over supplied object keys, not
existing object keys. Also applied PBP formatting, fat commas, etc..
2008-12-15 10:25:22 +00:00
Patrick Donelan
fa04344b7d SurveyJSON->update() should iterate over supplied object keys, not
existing object keys. Also applied PBP formatting, fat commas, etc..
2008-12-15 05:52:07 +00:00
Colin Kuskie
931b502666 Update SurveyJSON POD for the new method.
Add legal and header POD for ResponseJSON.
2008-12-06 00:23:17 +00:00
Colin Kuskie
8ea45fe456 Switch to using dclone from Clone::clone due to bugs under
perl 5.10
2008-12-05 04:21:43 +00:00
Colin Kuskie
a50c27de67 add POD, fix a few typos.
Add tests for updateQuestionAnswers
2008-12-04 23:35:40 +00:00
Colin Kuskie
75f6497924 Tests for getEditVars, getEditSectionVars and addAnswersToQuestion.
Add POD.
Fix a bug with setting verbatims in addAnswersToQuestion
2008-12-04 22:01:17 +00:00
Colin Kuskie
24fe2e6dc0 Add tests for getQuestionEditVars.
Refactor out the list of valid question types to make testing easier.
2008-12-04 20:47:42 +00:00
Colin Kuskie
0453f47bc1 Tests for getDragDrop and getAnswerEditVars.
More POD.
2008-12-04 20:18:49 +00:00
Colin Kuskie
d370772762 Make copy use safe references.
Add tests for remove, and copy.
2008-12-03 04:41:38 +00:00