Commit e841f293 by Will Daly

Updated CSS and template for choicegroup response

so that: a) checks/x marks appear after each option
for radio buttons, b) checks/x marks appear for the
entire problem (not individual options) for checkbox
buttons.

Also fixed issue with checks appearing on the next line
by changing <text> to display:inline instead of display:block
parent 999ed17e
<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':
% 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