Commit Graph

100 Commits (e325900aaa13f9c279a4acb6da5afd86d31fa3c6)

Author SHA1 Message Date
Jamie Campbell 6698319b2c Merge branch 'master' of github.com:draconicfae/ed-questionnaire 2016-01-19 13:29:28 -06:00
Jamie Campbell fb6e2a3e16 added a function to deliberately generate an error 2016-01-19 13:28:54 -06:00
Mark Jenkins 841a3b08e0 disable and no longer require globalstyles functionality 2016-01-18 00:18:19 -06:00
Jamie Campbell ca5a4c0bb6 temporary workaround enabling global style specifications 2015-12-21 12:14:18 -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
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
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 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 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
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
Jamie Campbell cad2bd3cfb shownif is shown if 2015-11-29 02:46:50 -06: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
eugena 5c32cc574f Solving problem of compatibility (commit_on_success & Django > 1.6) 2015-08-04 10:28:20 +05:00
Griffin Caprio 3b752628ba Fixing crash when not debugging questionanires; 2015-04-13 22:13:15 -05:00
Griffin Caprio 552104d075 Whitespace & cleanup 2015-02-13 17:42:41 -06:00
Griffin Caprio 4e24bbd336 Adding debug processing for including current questionnaire answers when rendering questionsets 2015-01-08 19:24:23 -06:00
Griffin Caprio 7cb9dbbb2e Starting to add new functioning tests, beginning with dependency checker 2015-01-06 16:45:49 -06:00
Griffin Caprio 1d4608ff40 Rolling back 2015-01-03 22:15:23 -06:00
Griffin Caprio a3b12d7e54 Moving from commit_on_success to atomic for upgrade path 2014-12-22 13:12:55 -02:00
Griffin Caprio 000431b208 cleaning up answer parsing for free form fields 2014-12-09 18:12:29 -06:00
Griffin Caprio 79ba0cfdb6 Fixing case where freeform question answer is checked against dependency for question 2014-12-09 16:39:47 -06:00
Griffin Caprio 67c245bf50 Fixing case where freeform question answer is checked against dependency for question 2014-12-09 16:37:12 -06:00
Griffin Caprio df3b1ea088 Fixing case where negative condition is being evaluated for skipped question 2014-12-05 18:32:33 -06:00
Alex Tsai 2cc0fea6ab fix the null subject case 2014-12-02 16:28:51 -08:00
Griffin Caprio e8db551c9e Moving error handling to use get_object_or_404 for more explicit workflow 2014-11-11 09:26:00 -06:00
Griffin Caprio fd4351e693 Adding optional check 2014-11-10 15:58:37 -06:00
Griffin Caprio e7db80b16e Merging latest from master 2014-11-10 15:52:59 -06:00
Daniel Rozenberg 223ac4862b Added questionnaire_start and questionset_start signals. 2014-11-04 18:00:10 -08:00
Griffin Caprio 17a03ff44e Merging upstream 2014-11-02 17:08:35 -06:00
Daniel Rozenberg 2ee0710a6f Replaces mimetype= with content_type= in calls to HttpResponse, updated for Django 1.6+ 2014-10-28 15:20:41 -07:00
Griffin Caprio a0e0c73f6c Adding optional subject id 2014-10-20 11:52:56 -05:00
matteo.cafarotti 002f8995b4 fixes inconsistency in finish_questionnaire method 2014-10-04 12:42:21 +02:00
Julio C. Menendez 245ae4e15c Fixes returning to previous page when using sessions. 2014-09-14 09:36:08 -06:00
Julio C. Menendez e3ee50530e Allows keeping track of current questionnaire and questionnaire set with sessions instead of url args. 2014-09-14 08:51:29 -06:00
Piotr Szachewicz f8e3744b9e Substitute_answer throwed an exception for empty answer values. 2014-07-13 19:30:45 +02:00
Piotr Szachewicz e61d1e4de2 Bugfix - iftag="" did not work for a question that is in a questionset, in which other questions should be visible.
In that case, even though the question did not fulfill the iftag requirement it was shown.

Conflicts:
	questionnaire/views.py
2014-07-13 16:35:54 +02:00
Piotr Szachewicz fab1c8b37a It is possible to show all questionniare questions when adding show_all=1 GET parameter.
It is useful for debugging purposes, when you want to see all questions rendered
on one screen.

Conflicts:
	questionnaire/views.py
2014-07-13 16:21:03 +02:00
Piotr Szachewicz 68a3825612 Fixed errors when converting choice to unicode, if choice is an Integer. 2014-07-13 16:13:13 +02:00
Carlos Solsona 6eb641fdaf Remove distinct filter, this option is not supported by all database backends, and two questions with same number don't work well 2014-07-13 16:12:19 +02:00
Piotr Szachewicz b96855de90 Tags are added/removed according to the selected CHOICEs.
It is now possible to set tags that need to be enabled if
a user selects some choice from the choice questions.
The tags from the other, non-selected choices are deleted
(in case of somebody changing the previously saved values).
2014-07-13 15:37:39 +02:00