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
128846f6
Commit
128846f6
authored
Nov 07, 2013
by
Oleg Marshev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BLD-449: Fix rearrange bug in problems.
parent
3859baa7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
CHANGELOG.rst
+3
-0
common/lib/capa/capa/inputtypes.py
+2
-7
common/lib/capa/capa/tests/test_inputtypes.py
+3
-1
No files found.
CHANGELOG.rst
View file @
128846f6
...
...
@@ -5,6 +5,9 @@ These are notable changes in edx-platform. This is a rolling list of changes,
in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected.
Blades: Fix answer choices rearranging if user tries to stylize something in the
text like with bold or italics. (BLD-449)
LMS: Beta instructor dashboard will only count actively enrolled students for
course enrollment numbers.
...
...
common/lib/capa/capa/inputtypes.py
View file @
128846f6
...
...
@@ -52,6 +52,7 @@ from chem import chemcalc
from
calc.preview
import
latex_preview
import
xqueue_interface
from
datetime
import
datetime
from
xmodule.stringify
import
stringify_children
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -406,13 +407,7 @@ class ChoiceGroup(InputTypeBase):
raise
Exception
(
"[capa.inputtypes.extract_choices] Expected a <choice> tag; got
%
s instead"
%
choice
.
tag
)
choice_text
=
''
.
join
([
etree
.
tostring
(
x
)
for
x
in
choice
])
if
choice
.
text
is
not
None
:
# TODO: fix order?
choice_text
+=
choice
.
text
choices
.
append
((
choice
.
get
(
"name"
),
choice_text
))
choices
.
append
((
choice
.
get
(
"name"
),
stringify_children
(
choice
)))
return
choices
...
...
common/lib/capa/capa/tests/test_inputtypes.py
View file @
128846f6
...
...
@@ -92,6 +92,7 @@ class ChoiceGroupTest(unittest.TestCase):
<choice correct="false" name="foil1"><text>This is foil One.</text></choice>
<choice correct="false" name="foil2"><text>This is foil Two.</text></choice>
<choice correct="true" name="foil3">This is foil Three.</choice>
<choice correct="false" name="foil4">This is <b>foil</b> Four.</choice>
</{tag}>
"""
.
format
(
tag
=
tag
)
...
...
@@ -114,7 +115,8 @@ class ChoiceGroupTest(unittest.TestCase):
'input_type'
:
expected_input_type
,
'choices'
:
[(
'foil1'
,
'<text>This is foil One.</text>'
),
(
'foil2'
,
'<text>This is foil Two.</text>'
),
(
'foil3'
,
'This is foil Three.'
),
],
(
'foil3'
,
'This is foil Three.'
),
(
'foil4'
,
'This is <b>foil</b> Four.'
),
],
'show_correctness'
:
'always'
,
'submitted_message'
:
'Answer received.'
,
'name_array_suffix'
:
expected_suffix
,
# what is this for??
...
...
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