Commit Graph

369 Commits (master)

Author SHA1 Message Date
Mark Jenkins 2615e4e1dd added indexes to support objects.filter and .order searches 2016-01-19 07:06:42 -06:00
Mark Jenkins c7add25900 add an index for value field in choice table 2016-01-19 06:28:15 -06:00
Mark Jenkins 841a3b08e0 disable and no longer require globalstyles functionality 2016-01-18 00:18:19 -06:00
Jamie Campbell 81595b2e04 Merge branch 'master' of file:///home/jamiework/work/GAWork/ed-questionnaire
Conflicts:
	questionnaire/admin.py
	questionnaire/views.py
2016-01-13 03:50:32 -06:00
Jamie Campbell 15dda1e5cc typo correction -- why did it autogenerate incorrectly in the first place? 2016-01-13 03:44:30 -06:00
Jamie Campbell 5b048b2303 added support for a maximum number of selections for multiple choice type. don't need to add support for min because "required" already does that. 2016-01-13 03:33:24 -06:00
Jamie Campbell fadcec2fd2 completed work for granular style control 2016-01-13 03:32:55 -06:00
Jamie Campbell 2b43514b95 Merge commit 'e5ba454' 2015-12-21 12:22:42 -06:00
Jamie Campbell ca5a4c0bb6 temporary workaround enabling global style specifications 2015-12-21 12:14:18 -06:00
Jamie Campbell 5ea374d060 work towards more granular style control 2015-12-21 11:43:02 -06:00
Sara Arenson e5ba4547c7 choice-multiple-values: Checkboxes align with text
Put checkbox and choice text inside the same SPAN, so they now line up.
2015-12-17 10:23:53 -06:00
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