Commit 85d5264f by Christina Roberts

Merge pull request #1616 from MITx/fix/will/mc_checkbox_bug

Fix/will/mc checkbox bug
parents 49db56ab e86ed0db
<form class="choicegroup capa_inputtype" id="inputtype_${id}"> <form class="choicegroup capa_inputtype" id="inputtype_${id}">
<div class="indicator_container">
<fieldset> % if input_type == 'checkbox' or not value:
% for choice_id, choice_description in choices: % if status == 'unsubmitted':
<label for="input_${id}_${choice_id}"> <span class="unanswered" style="display:inline-block;" id="status_${id}"></span>
% elif status == 'correct':
% if choice_id in value: <span class="correct" id="status_${id}"></span>
<span class="indicator_container"> % elif status == 'incorrect':
% if status == 'unsubmitted': <span class="incorrect" id="status_${id}"></span>
<span class="unanswered" style="display:inline-block;" id="status_${id}"></span> % elif status == 'incomplete':
% elif status == 'correct': <span class="incorrect" id="status_${id}"></span>
<span class="correct" id="status_${id}"></span>
% elif status == 'incorrect':
<span class="incorrect" id="status_${id}"></span>
% elif status == 'incomplete':
<span class="incorrect" id="status_${id}"></span>
% endif
</span>
% else:
<span class="indicator_container">&#160;</span>
% endif % endif
<input type="${input_type}" name="input_${id}${name_array_suffix}" id="input_${id}_${choice_id}" value="${choice_id}"
% if choice_id in value:
checked="true"
% endif % endif
/> </div>
${choice_description}
</label> <fieldset>
% for choice_id, choice_description in choices:
<label for="input_${id}_${choice_id}"
% if input_type == 'radio' and choice_id in value:
<%
if status == 'correct':
correctness = 'correct'
if status == 'incorrect':
correctness = 'incorrect'
%>
class="choicegroup_${correctness}"
% endif
>
<input type="${input_type}" name="input_${id}${name_array_suffix}" id="input_${id}_${choice_id}" value="${choice_id}"
% if choice_id in value:
checked="true"
% endif
% endfor /> ${choice_description} </label>
<span id="answer_${id}"></span> % endfor
</fieldset> <span id="answer_${id}"></span>
</fieldset>
</form> </form>
...@@ -42,6 +42,14 @@ section.problem { ...@@ -42,6 +42,14 @@ section.problem {
label.choicegroup_correct{ label.choicegroup_correct{
&:after{ &:after{
content: url('../images/correct-icon.png'); content: url('../images/correct-icon.png');
margin-left:15px
}
}
label.choicegroup_incorrect{
&:after{
content: url('../images/incorrect-icon.png');
margin-left:15px;
} }
} }
...@@ -52,6 +60,7 @@ section.problem { ...@@ -52,6 +60,7 @@ section.problem {
.indicator_container { .indicator_container {
float: left; float: left;
width: 25px; width: 25px;
height: 1px;
margin-right: 15px; margin-right: 15px;
} }
...@@ -69,7 +78,7 @@ section.problem { ...@@ -69,7 +78,7 @@ section.problem {
} }
text { text {
display: block; display: inline;
margin-left: 25px; margin-left: 25px;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment