Skip to content
Snippets Groups Projects
Commit 24e64e39 authored by David Ormsbee's avatar David Ormsbee
Browse files

Merge pull request #1773 from MITx/hotfix/dave/mult_choice_display

HOTFIX: Accept either a list of possible values, or a string as a value for

I'm pulling this in myself because it's urgent, it's the weekend, and I don't want this to get forgotten.
parents 1c47573b dfd3a699
No related merge requests found
......@@ -17,7 +17,7 @@
% for choice_id, choice_description in choices:
<label for="input_${id}_${choice_id}"
% if input_type == 'radio' and choice_id == value:
% 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'
......@@ -30,9 +30,9 @@
class="choicegroup_${correctness}"
% endif
% endif
>
>
<input type="${input_type}" name="input_${id}${name_array_suffix}" id="input_${id}_${choice_id}" value="${choice_id}"
% if input_type == 'radio' and choice_id == value:
% if input_type == 'radio' and ( (isinstance(value, basestring) and (choice_id == value)) or (not isinstance(value, basestring) and choice_id in value) ):
checked="true"
% elif input_type != 'radio' and choice_id in value:
checked="true"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment