Commit Graph

308 Commits (c618a30b446cde43800b925954defe031ba850f3)

Author SHA1 Message Date
Jamie Campbell c618a30b44 db model for dynamic stylesheet support 2015-12-14 01:46:32 -06:00
Jamie Campbell 63ecc60740 added inclusion tag for dynamic stylesheet support 2015-12-14 01:45:59 -06:00
Jamie Campbell eac8ab5bd5 work towards database drive stylesheet configurability 2015-12-14 01:26:02 -06:00
Jamie Campbell 259e3850c4 added question id to the list of information displayed 2015-12-13 23:29:44 -06:00
Sara Arenson d8baee9921 Merge branch 'master' of git@github.com:draconicfae/ed-questionnaire.git 2015-12-09 15:28:29 -06:00
Sara Arenson 08d2251f7d Multiple value boxes are now aligned in questionset.js
Now choice-multiple-freeform template calls function in questionset.js,
rather than including the same code for each question.
2015-12-09 12:16:07 -06:00
Sara Arenson ad9b327558 choice-multiple-values questions now align after longest string
Added Javascript to template.

Adjusted CSS so the max width can be a bit wider.
This won't affect Javascript.

Still need to refactor so code is tidier - right now same code included
multiple times on pages.
2015-12-09 12:03:22 -06:00
Jamie Campbell 49aa449a83 changed question sorting from strictly alphabetic from tuple-based sort on sort_id then number 2015-12-08 00:45:24 -06:00
Jamie Campbell 37429dcf32 hoverable now changes font color instead of doing underline 2015-12-07 19:01:22 -06:00
Jamie Campbell 7721d782d9 changed so that clicking anywhere on the line no longer changes the checkbox, you have to click the checkbox itself 2015-12-07 19:00:58 -06:00
Jamie Campbell cfb2209b5b added support for questionnaire name to render as html via html field 2015-12-07 19:00:30 -06:00
Mark Jenkins 67577b8082 oops, was parsing question numbers as integer 2015-12-03 07:27:56 -06:00
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