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
3e84de32
Commit
3e84de32
authored
Mar 27, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better fix for MentoringBlock attributes saving.
parent
b1e05c75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
mentoring/light_children.py
+1
-1
mentoring/mentoring.py
+1
-9
No files found.
mentoring/light_children.py
View file @
3e84de32
...
@@ -127,7 +127,7 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin):
...
@@ -127,7 +127,7 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin):
return
return
node
=
etree
.
parse
(
StringIO
(
self
.
xml_content
))
.
getroot
()
node
=
etree
.
parse
(
StringIO
(
self
.
xml_content
))
.
getroot
()
LightChildrenMixin
.
init_block_from_node
(
self
,
node
,
{}
)
LightChildrenMixin
.
init_block_from_node
(
self
,
node
,
node
.
items
()
)
def
get_children_objects
(
self
):
def
get_children_objects
(
self
):
"""
"""
...
...
mentoring/mentoring.py
View file @
3e84de32
...
@@ -179,7 +179,7 @@ class MentoringBlock(XBlockWithLightChildren):
...
@@ -179,7 +179,7 @@ class MentoringBlock(XBlockWithLightChildren):
xml_content
=
submissions
[
'xml_content'
]
xml_content
=
submissions
[
'xml_content'
]
try
:
try
:
xml
=
etree
.
parse
(
StringIO
(
xml_content
))
etree
.
parse
(
StringIO
(
xml_content
))
except
etree
.
XMLSyntaxError
as
e
:
except
etree
.
XMLSyntaxError
as
e
:
response
=
{
response
=
{
'result'
:
'error'
,
'result'
:
'error'
,
...
@@ -191,14 +191,6 @@ class MentoringBlock(XBlockWithLightChildren):
...
@@ -191,14 +191,6 @@ class MentoringBlock(XBlockWithLightChildren):
}
}
self
.
xml_content
=
xml_content
self
.
xml_content
=
xml_content
try
:
self
.
url_name
=
xml
.
getroot
()
.
attrib
[
'url_name'
]
except
KeyError
as
e
:
response
=
{
'result'
:
'error'
,
'message'
:
'mentoring "url_name" attribute is missing'
}
log
.
debug
(
u'Response from Studio: {}'
.
format
(
response
))
log
.
debug
(
u'Response from Studio: {}'
.
format
(
response
))
return
response
return
response
...
...
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