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
96c4af9a
Commit
96c4af9a
authored
Jul 30, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add kwargs back to DescriptorSystem init()s
* allow future expansion without breaking interface.
parent
7f2f4759
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
common/lib/xmodule/xmodule/mako_module.py
+2
-2
common/lib/xmodule/xmodule/modulestore/xml.py
+3
-3
common/lib/xmodule/xmodule/x_module.py
+4
-3
No files found.
common/lib/xmodule/xmodule/mako_module.py
View file @
96c4af9a
...
...
@@ -3,9 +3,9 @@ from x_module import XModuleDescriptor, DescriptorSystem
class
MakoDescriptorSystem
(
DescriptorSystem
):
def
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
render_template
):
render_template
,
**
kwargs
):
super
(
MakoDescriptorSystem
,
self
)
.
__init__
(
load_item
,
resources_fs
,
error_handler
)
load_item
,
resources_fs
,
error_handler
,
**
kwargs
)
self
.
render_template
=
render_template
...
...
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
96c4af9a
...
...
@@ -29,7 +29,7 @@ def clean_out_mako_templating(xml_string):
return
xml_string
class
ImportSystem
(
XMLParsingSystem
,
MakoDescriptorSystem
):
def
__init__
(
self
,
xmlstore
,
org
,
course
,
course_dir
,
error_handler
):
def
__init__
(
self
,
xmlstore
,
org
,
course
,
course_dir
,
error_handler
,
**
kwargs
):
"""
A class that handles loading from xml. Does some munging to ensure that
all elements have unique slugs.
...
...
@@ -88,9 +88,9 @@ class ImportSystem(XMLParsingSystem, MakoDescriptorSystem):
resources_fs
=
OSFS
(
xmlstore
.
data_dir
/
course_dir
)
MakoDescriptorSystem
.
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
render_template
)
error_handler
,
render_template
,
**
kwargs
)
XMLParsingSystem
.
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
process_xml
)
error_handler
,
process_xml
,
**
kwargs
)
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
96c4af9a
...
...
@@ -521,7 +521,7 @@ class XModuleDescriptor(Plugin, HTMLSnippet):
class
DescriptorSystem
(
object
):
def
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
):
def
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
**
kwargs
):
"""
load_item: Takes a Location and returns an XModuleDescriptor
...
...
@@ -561,14 +561,15 @@ class DescriptorSystem(object):
class
XMLParsingSystem
(
DescriptorSystem
):
def
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
process_xml
):
def
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
process_xml
,
**
kwargs
):
"""
load_item, resources_fs, error_handler: see DescriptorSystem
process_xml: Takes an xml string, and returns a XModuleDescriptor
created from that xml
"""
DescriptorSystem
.
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
)
DescriptorSystem
.
__init__
(
self
,
load_item
,
resources_fs
,
error_handler
,
**
kwargs
)
self
.
process_xml
=
process_xml
...
...
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