Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
85d5264f
Commit
85d5264f
authored
Mar 07, 2013
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1616 from MITx/fix/will/mc_checkbox_bug
Fix/will/mc checkbox bug
parents
49db56ab
e86ed0db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
31 deletions
+43
-31
common/lib/capa/capa/templates/choicegroup.html
+33
-30
common/lib/xmodule/xmodule/css/capa/display.scss
+10
-1
No files found.
common/lib/capa/capa/templates/choicegroup.html
View file @
85d5264f
<form
class=
"choicegroup capa_inputtype"
id=
"inputtype_${id}"
>
<fieldset>
% for choice_id, choice_description in choices:
<label
for=
"input_${id}_${choice_id}"
>
% if choice_id in value:
<span
class=
"indicator_container"
>
% if status == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif status == 'correct':
<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"
>
 
</span>
<div
class=
"indicator_container"
>
% if input_type == 'checkbox' or not value:
% if status == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif status == 'correct':
<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
<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
/>
${choice_description}
</div>
</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
<span
id=
"answer_${id}"
></span>
</fieldset>
/>
${choice_description}
</label>
% endfor
<span
id=
"answer_${id}"
></span>
</fieldset>
</form>
common/lib/xmodule/xmodule/css/capa/display.scss
View file @
85d5264f
...
...
@@ -42,6 +42,14 @@ section.problem {
label
.choicegroup_correct
{
&
:after
{
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 {
.indicator_container
{
float
:
left
;
width
:
25px
;
height
:
1px
;
margin-right
:
15px
;
}
...
...
@@ -69,7 +78,7 @@ section.problem {
}
text
{
display
:
block
;
display
:
inline
;
margin-left
:
25px
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment