Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
222b0ae3
Commit
222b0ae3
authored
May 21, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix upgrade error when <message> has no 'type' specified explicitly
parent
ee363edf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
problem_builder/message.py
+2
-1
problem_builder/v1/tests/xml/v1_upgrade_a_new.xml
+1
-1
problem_builder/v1/tests/xml/v1_upgrade_a_old.xml
+1
-1
No files found.
problem_builder/message.py
View file @
222b0ae3
...
@@ -159,7 +159,8 @@ class MentoringMessageBlock(XBlock, StudioEditableXBlockMixin):
...
@@ -159,7 +159,8 @@ class MentoringMessageBlock(XBlock, StudioEditableXBlockMixin):
"""
"""
block
=
runtime
.
construct_xblock_from_class
(
cls
,
keys
)
block
=
runtime
.
construct_xblock_from_class
(
cls
,
keys
)
block
.
content
=
unicode
(
node
.
text
or
u""
)
block
.
content
=
unicode
(
node
.
text
or
u""
)
block
.
type
=
node
.
attrib
[
'type'
]
if
'type'
in
node
.
attrib
:
# 'type' is optional - default is 'completed'
block
.
type
=
node
.
attrib
[
'type'
]
for
child
in
node
:
for
child
in
node
:
block
.
content
+=
etree
.
tostring
(
child
,
encoding
=
'unicode'
)
block
.
content
+=
etree
.
tostring
(
child
,
encoding
=
'unicode'
)
...
...
problem_builder/v1/tests/xml/v1_upgrade_a_new.xml
View file @
222b0ae3
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<pb-tip
values=
'["elegance","beauty"]'
>
This is something everyone has to like about this MRQ
</pb-tip>
<pb-tip
values=
'["elegance","beauty"]'
>
This is something everyone has to like about this MRQ
</pb-tip>
<pb-tip
values=
'["bugs"]'
>
Nah, there aren't any!
</pb-tip>
<pb-tip
values=
'["bugs"]'
>
Nah, there aren't any!
</pb-tip>
</pb-mrq>
</pb-mrq>
<pb-message
type=
"completed"
>
<pb-message>
<p>
Congratulations!
</p>
<p>
Congratulations!
</p>
</pb-message>
</pb-message>
<pb-message
type=
"incomplete"
>
<pb-message
type=
"incomplete"
>
...
...
problem_builder/v1/tests/xml/v1_upgrade_a_old.xml
View file @
222b0ae3
...
@@ -56,7 +56,7 @@ Changes from the original:
...
@@ -56,7 +56,7 @@ Changes from the original:
<message
type=
"on-submit"
>
Thank you for answering!
</message>
<message
type=
"on-submit"
>
Thank you for answering!
</message>
</mrq>
</mrq>
<message
type=
"completed"
>
<message>
<html><p>
Congratulations!
</p></html>
<html><p>
Congratulations!
</p></html>
</message>
</message>
<message
type=
"incomplete"
>
<message
type=
"incomplete"
>
...
...
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