<%! from django.utils.translation import ugettext as _ %> <% element_checked = False %> % for choice_id, _ in choices: <%choice_id = choice_id %> %if choice_id in value: <% element_checked = True %> %endif %endfor
% for choice_id, choice_description in choices: <%choice_id= choice_id %>
% if correctness: class="choicetextgroup_${correctness}" % endif % endif > % for content_node in choice_description: % if content_node['type'] == 'text': ${content_node['contents']} % else: <% my_id = content_node.get('contents','') %> <% my_val = value.get(my_id,'') %> %endif ${content_node['tail_text']} % endfor

% endfor
% if input_type == 'checkbox' or not element_checked: % endif
% if show_correctness == "never" and (value or status not in ['unsubmitted']):
${_(submitted_message)}
%endif % if msg: ${msg|n} % endif