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
3b461ee1
Commit
3b461ee1
authored
Oct 13, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
choicegroup should only process choices belonging to its input_id
parent
49a921c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+7
-4
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
3b461ee1
...
@@ -334,10 +334,13 @@ class @Problem
...
@@ -334,10 +334,13 @@ class @Problem
inputtypeShowAnswerMethods
:
inputtypeShowAnswerMethods
:
choicegroup
:
(
element
,
display
,
answers
)
=>
choicegroup
:
(
element
,
display
,
answers
)
=>
element
=
$
(
element
)
element
=
$
(
element
)
for
key
,
value
of
answers
element
.
find
(
'input'
).
attr
(
'disabled'
,
'disabled'
)
element
.
find
(
'input'
).
attr
(
'disabled'
,
'disabled'
)
for
choice
in
value
element
.
find
(
"label[for='input_
#{
key
}
_
#{
choice
}
']"
).
addClass
'choicegroup_correct'
input_id
=
element
.
attr
(
'id'
).
replace
(
/inputtype_/
,
''
)
answer
=
answers
[
input_id
]
for
choice
in
answer
element
.
find
(
"label[for='input_
#{
input_id
}
_
#{
choice
}
']"
).
addClass
'choicegroup_correct'
javascriptinput
:
(
element
,
display
,
answers
)
=>
javascriptinput
:
(
element
,
display
,
answers
)
=>
answer_id
=
$
(
element
).
attr
(
'id'
).
split
(
"_"
)[
1
...].
join
(
"_"
)
answer_id
=
$
(
element
).
attr
(
'id'
).
split
(
"_"
)[
1
...].
join
(
"_"
)
...
...
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