From 47f91e79c42102446cba3dee41518cd072225aa2 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Fri, 7 Jun 2013 15:29:21 -0400 Subject: [PATCH] adds in status for overall problem status indicator and replicates needed correctness django logic to show individual choice status --- .../lib/capa/capa/templates/choicegroup.html | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/common/lib/capa/capa/templates/choicegroup.html b/common/lib/capa/capa/templates/choicegroup.html index 8c30910a9c..17f7efcec4 100644 --- a/common/lib/capa/capa/templates/choicegroup.html +++ b/common/lib/capa/capa/templates/choicegroup.html @@ -4,11 +4,11 @@ % if status == 'unsubmitted' or show_correctness == 'never': % elif status == 'correct': - + Status: correct % elif status == 'incorrect': - + Status: incorrect % elif status == 'incomplete': - + Status: incomplete % endif % endif @@ -28,7 +28,6 @@ %> % if correctness and not show_correctness=='never': class="choicegroup_${correctness}" - Status: ${correctness} % endif % endif > @@ -39,7 +38,22 @@ checked="true" % endif - /> ${choice_description} + /> ${choice_description} + + % if input_type == 'radio' and ( (isinstance(value, basestring) and (choice_id == value)) or (not isinstance(value, basestring) and choice_id in value) ): + <% + if status == 'correct': + correctness = 'correct' + elif status == 'incorrect': + correctness = 'incorrect' + else: + correctness = None + %> + % if correctness and not show_correctness=='never': + Status: ${correctness} + % endif + % endif + % endfor