From cad2bd3cfb060410771f9d10f3094bfb070b44d5 Mon Sep 17 00:00:00 2001 From: Jamie Campbell Date: Sun, 29 Nov 2015 02:46:50 -0600 Subject: [PATCH] shownif is shown if --- questionnaire/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/questionnaire/views.py b/questionnaire/views.py index fc03311..759935d 100644 --- a/questionnaire/views.py +++ b/questionnaire/views.py @@ -344,8 +344,10 @@ def questionnaire(request, runcode=None, qs=None): else: request.session['runcode'] = runcode args = [] + return HttpResponseRedirect(reverse("questionnaire", args=args)) + runinfo = get_runinfo(runcode) if not runinfo: @@ -556,7 +558,6 @@ def show_questionnaire(request, runinfo, errors={}): # if we got here the questionset will at least contain one question # which passes, so this is all we need to check for question_visible = question_satisfies_checks(question, runinfo) or show_all - Type = question.get_type() _qnum, _qalpha = split_numal(question.number) @@ -576,7 +577,7 @@ def show_questionnaire(request, runinfo, errors={}): # add javascript dependency checks cd = question.getcheckdict() - depon = cd.get('requiredif', None) or cd.get('dependent', None) + depon = cd.get('requiredif', None) or cd.get('dependent', None) or cd.get('shownif', None) if depon: # extra args to BooleanParser are not required for toString parser = BooleanParser(dep_check)