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
3dc05aa9
Commit
3dc05aa9
authored
Feb 05, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make some bug fixes, alter definition passing to work
parent
ce0b3146
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
common/lib/xmodule/xmodule/combined_open_ended_module.py
+4
-3
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
+1
-1
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
3dc05aa9
...
...
@@ -19,7 +19,7 @@ from .stringify import stringify_children
from
.x_module
import
XModule
from
.xml_module
import
XmlDescriptor
from
xmodule.modulestore
import
Location
from
combined_open_ended_module
_
v1
import
CombinedOpenEndedV1Module
,
CombinedOpenEndedV1Descriptor
from
combined_open_ended_modulev1
import
CombinedOpenEndedV1Module
,
CombinedOpenEndedV1Descriptor
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
...
@@ -138,7 +138,8 @@ class CombinedOpenEndedModule(XModule):
version_index
=
versions
.
index
(
self
.
version
)
self
.
child_descriptor
=
descriptors
[
version_index
](
self
.
system
)
self
.
child_module
=
modules
[
version_index
](
self
.
system
,
location
,
definition
,
self
.
child_descriptor
,
instance_state
)
self
.
child_definition
=
self
.
child_descriptor
.
definition_from_xml
(
etree
.
fromstring
(
definition
[
'xml_string'
]))
self
.
child_module
=
modules
[
version_index
](
self
.
system
,
location
,
self
.
child_definition
,
self
.
child_descriptor
,
instance_state
)
def
get_html
(
self
):
return
self
.
child_module
.
get_html
()
...
...
@@ -186,7 +187,7 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor):
'task_xml': dictionary of xml strings,
}
"""
return
etree
.
tostring
(
xml_object
)
return
{
'xml_string'
:
etree
.
tostring
(
xml_object
)}
def
definition_to_xml
(
self
,
resource_fs
):
...
...
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
View file @
3dc05aa9
...
...
@@ -649,7 +649,7 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor):
Module for adding combined open ended questions
"""
mako_template
=
"widgets/html-edit.html"
module_class
=
CombinedOpenEndedModule
module_class
=
CombinedOpenEnded
V1
Module
filename_extension
=
"xml"
stores_state
=
True
...
...
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