Commit Graph

296 Commits (2f117f79ceb5a9fd9628a594bd24e823d0a1f792)

Author SHA1 Message Date
Mark Jenkins 2f117f79ce oops, broke the build with the last one 2015-12-03 06:45:21 -06:00
Mark Jenkins fe8f5766fc ooops, left debug crud behind on an otherwise brilliant commit 2015-12-03 06:41:32 -06:00
Mark Jenkins b0f0ea1753 shownif made smarter, results from other pages pre-computed for JS
Recursive descent baby!
2015-12-03 06:12:02 -06:00
Sara Arenson d1a0a1d7dd Incidental fix & comment related to cross-page dependency check problem
dependency_checker.py: Now filters out integers in sublists, so that
choice-multiple-values only returns a list of the checked items, not the
values in their boxes.

views.py: Documented the reason for the across-page dependency bug.
Still needs to be fixed in the code.
2015-12-03 01:08:35 -06:00
Sara Arenson d4c20f4437 Merge branch 'master' of git@github.com:draconicfae/ed-questionnaire.git 2015-12-02 18:00:15 -06:00
Sara Arenson f09213ba36 Added URL to get previous page, skipping over all hidden questionsets
Note: Added more functionality to redirect_to_prev_questionnaire() so it
now works regardless of whether sessions are being used.
2015-12-02 17:41:59 -06:00
Mark Jenkins d8ab35feb6 Merging Jamie and Sara December 2 work 2015-12-02 16:22:05 -06:00
Sara Arenson 6e7a314dd3 Fixed bug where choice-multiple-values raises error if nothing selected 2015-12-02 12:25:50 -06:00
Sara Arenson ded42e8fb3 Yes/No questions now restore hidden questions after going back 2015-12-02 12:15:28 -06:00
Sara Arenson 5025e26b12 choice-multiple-values now aligns value boxes (shortens choice text)
Note: removed class from span containing value box and put it around span
containing choice's text

Choice text will wrap if necessary.

Currently, width of choice text is 35% - see questionnaire.css
2015-12-02 11:48:18 -06:00
Jamie Campbell 661772bbf9 changed session id logic from rand(255) to uuid4 to allow more than 255 answer sets 2015-12-02 01:31:34 -06:00
Mark Jenkins 3d06cd5570 Merge Sara and Jamie's work from November 30 and December 1 together 2015-12-01 23:59:17 -06:00
Sara Arenson 3d6ec88268 choice-multiple-values: Validates data and value boxes repopulated on POST
choice.py:

1) Performs validations - requires integers adding up to 100.

2) When key found in POST data, now extracts value and puts it
in box. Checks POST data first, before checking database, so most recently
entered data shows up in box. Also refactored code that was getting
lengthy. NOTICED BUG WHERE DATA FROM BOTH DATABASE AND MOST RECENT POST
REQUEST SHOW UP AT THE SAME TIME.

views.py: Now allow value boxes to trigger other events in the
system. Right now there's no check syntax for this kind of dependency,
though.
2015-12-01 23:37:33 -06:00
Jamie Campbell b134e26b3a added support to question and questionset for rendering content as html instead of the default which just shows html tags as part of the content 2015-12-01 20:46:28 -06:00
Jamie Campbell 98abcf2196 added support for conditional display of footers, initially used to show the user the answer after they make a guess 2015-12-01 20:06:54 -06:00
Jamie Campbell 8dcf49276f added support for maxwords and dropped a commented out print section 2015-12-01 19:04:09 -06:00
Jamie Campbell 4cc490adba extended the framework to actually sort questions the way it claims to sort questions 2015-12-01 15:51:35 -06:00
Sara Arenson 878d453190 Added % sign to choice-multiple-values control - JS also show/hide SPAN
choice-multiple-freeform.html: Text box and % sign wrapped up in the same
SPAN that now has a dependency check instead of the dependency check being
on the text box inside.

questionnaire.css: No need for styling disabled input boxes anymore for
this question type. Span disappears, not box.

questionset.js: Added ability to show/hide spans (with triggers).

choice.py: Had to change jstriggers to set off containing SPAN, not
input box.
2015-12-01 14:50:30 -06:00
Sara Arenson 36d1f2ba9a choice-multiple-values now disappears disabled input boxes 2015-12-01 14:16:38 -06:00
Jamie Campbell a7cce23609 added sorting on questions by sort_id then number. This is the behaviour that the framework claimed to already be doing but wasn't, unless I'm missing something. 2015-12-01 00:31:54 -06:00
Sara Arenson d6a51aa916 choice-multiple-values: checkboxes now enable and disable input fields
Works both on page load and when user interacts. Remembers to
enable/disable checkbox on returning.

choice.py: Added jstriggers for text fields (so they'd be triggered when
checkboxes are checked/unchecked), and return a new dict item qvalues
which contains string qnum_value for each choice selected.

choice-multiple-freeform.html: Now has a dependency check for each
input box - dependent on associated checkbox being checked.

views.py: show_questionnaire() now processes qdict['qvalues'] to send
to questionset.html to trigger initial valchanged() calls - to make sure
inputs are properly enabled/disabled when page loads.

*** This may also allow display of other questions to be conditional on
values of choice-multiple questions.
2015-11-30 23:17:34 -06:00
Sara Arenson 8a63e8e89c choice-multiple-values template restores saved box values upon reload.
Also saves associated box value even if there is only one item checked.
2015-11-30 19:24:10 -06:00
Jamie Campbell a96c7c142a Merge file:///home/jamiework/work/GAWork/ed-questionnaire-latestmark
pulling in changes supporting functionality for multiple checkbox/percent
2015-11-30 03:37:01 -06:00
Jamie Campbell ac17da206d changed the back button to use fully qualified url instead of simply history.back() 2015-11-30 03:36:00 -06:00
Mark Jenkins 2a022d1a34 Merge from Sara changes
Conflicts:
	questionnaire/qprocessors/choice.py
2015-11-30 01:52:49 -06:00
Sara Arenson 2cc58cb8dd question_multiple type now can also pair input boxes with checkboxes 2015-11-30 00:45:47 -06:00
Sara Arenson ce12d3d470 id field added to answer admin interface for easier debugging 2015-11-30 00:33:33 -06:00
Jamie Campbell da82126ac5 fill data if available 2015-11-29 02:49:33 -06:00
Jamie Campbell 90880bcd5e fill data from database if value not in post 2015-11-29 02:48:53 -06:00
Jamie Campbell dcb0182e93 added proper support for questionset heading 2015-11-29 02:47:33 -06:00
Jamie Campbell cad2bd3cfb shownif is shown if 2015-11-29 02:46:50 -06:00
Jamie Campbell a7088c2586 additional option for 'samechoicesas' 2015-11-29 02:46:08 -06:00
Jamie Campbell 667752d60b don't listify a non-list 2015-11-29 02:45:23 -06:00
Jamie Campbell ef649d9b31 migration to english fields 2015-11-29 01:35:45 -06:00
Griffin Caprio d41aaf8f37 Merge pull request #11 from eugena/master
All problems with commit and rollback were solved.
2015-08-23 18:28:12 -05:00
eugena 4df2cc6c7c Solving problem of compatibility (commit, rollback & Django > 1.6) 2015-08-15 22:36:18 +05:00
eugena 00b937176f Solving problem of compatibility (commit, rollback & Django > 1.6) 2015-08-15 22:34:03 +05:00
Griffin Caprio 706319320e Merge pull request #10 from eugena/master
Solving problem of compatibility (commit_on_success & Django > 1.6)
2015-08-09 15:42:04 -05:00
eugena 5c32cc574f Solving problem of compatibility (commit_on_success & Django > 1.6) 2015-08-04 10:28:20 +05:00
gcaprio 692ed44cb3 Merge pull request #9 from gabivoicu/add-comment-about-django1.7-issue
add comment about issue with Django 1.7
2015-07-18 15:09:51 -05:00
Gabriela Voicu 72bc32e6a1 add comment about issue with Django 1.7 2015-07-18 13:33:22 -05:00
gcaprio b165aa8f73 Merge pull request #7 from gabivoicu/complete-setup-of-project
Complete setup of project
2015-06-14 19:49:39 -05:00
Gabriela Voicu c2dc2cf4e7 fix link & formatting 2015-06-13 20:34:53 -05:00
Gabriela Voicu ad5cdabeea remove ls folder 2015-06-13 20:27:42 -05:00
Gabriela Voicu e61a6190b6 add new neede steps to installation in README 2015-06-13 19:51:14 -05:00
gcaprio b1ce6a8e5c Merge pull request #6 from gabivoicu/improve-readme-take-one
fix typos
2015-06-04 21:38:01 -05:00
Gabriela Voicu e7994436d0 fix typos
improve wording in a couple places
fix formatting
2015-06-04 21:03:41 -05:00
Griffin Caprio dea7907b14 Forgot one revert 2015-04-15 07:44:52 -05:00
Griffin Caprio 3f0c65a2cf Reverting change 2015-04-15 07:38:30 -05:00
Griffin Caprio 3b752628ba Fixing crash when not debugging questionanires; 2015-04-13 22:13:15 -05:00