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
Hide 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,
...
@@ -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
in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected.
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
LMS: Beta instructor dashboard will only count actively enrolled students for
course enrollment numbers.
course enrollment numbers.
...
...
common/lib/capa/capa/inputtypes.py
View file @
128846f6
...
@@ -52,6 +52,7 @@ from chem import chemcalc
...
@@ -52,6 +52,7 @@ from chem import chemcalc
from
calc.preview
import
latex_preview
from
calc.preview
import
latex_preview
import
xqueue_interface
import
xqueue_interface
from
datetime
import
datetime
from
datetime
import
datetime
from
xmodule.stringify
import
stringify_children
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -406,13 +407,7 @@ class ChoiceGroup(InputTypeBase):
...
@@ -406,13 +407,7 @@ class ChoiceGroup(InputTypeBase):
raise
Exception
(
raise
Exception
(
"[capa.inputtypes.extract_choices] Expected a <choice> tag; got
%
s instead"
"[capa.inputtypes.extract_choices] Expected a <choice> tag; got
%
s instead"
%
choice
.
tag
)
%
choice
.
tag
)
choice_text
=
''
.
join
([
etree
.
tostring
(
x
)
for
x
in
choice
])
choices
.
append
((
choice
.
get
(
"name"
),
stringify_children
(
choice
)))
if
choice
.
text
is
not
None
:
# TODO: fix order?
choice_text
+=
choice
.
text
choices
.
append
((
choice
.
get
(
"name"
),
choice_text
))
return
choices
return
choices
...
...
common/lib/capa/capa/tests/test_inputtypes.py
View file @
128846f6
...
@@ -92,6 +92,7 @@ class ChoiceGroupTest(unittest.TestCase):
...
@@ -92,6 +92,7 @@ class ChoiceGroupTest(unittest.TestCase):
<choice correct="false" name="foil1"><text>This is foil One.</text></choice>
<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="false" name="foil2"><text>This is foil Two.</text></choice>
<choice correct="true" name="foil3">This is foil Three.</choice>
<choice correct="true" name="foil3">This is foil Three.</choice>
<choice correct="false" name="foil4">This is <b>foil</b> Four.</choice>
</{tag}>
</{tag}>
"""
.
format
(
tag
=
tag
)
"""
.
format
(
tag
=
tag
)
...
@@ -114,7 +115,8 @@ class ChoiceGroupTest(unittest.TestCase):
...
@@ -114,7 +115,8 @@ class ChoiceGroupTest(unittest.TestCase):
'input_type'
:
expected_input_type
,
'input_type'
:
expected_input_type
,
'choices'
:
[(
'foil1'
,
'<text>This is foil One.</text>'
),
'choices'
:
[(
'foil1'
,
'<text>This is foil One.</text>'
),
(
'foil2'
,
'<text>This is foil Two.</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'
,
'show_correctness'
:
'always'
,
'submitted_message'
:
'Answer received.'
,
'submitted_message'
:
'Answer received.'
,
'name_array_suffix'
:
expected_suffix
,
# what is this for??
'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