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.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user