All of the fall 2012 courses have been imported by now.
This commit is contained in:
@@ -11,7 +11,6 @@ import sys
|
||||
from collections import defaultdict
|
||||
from contextlib import contextmanager
|
||||
from importlib import import_module
|
||||
from io import BytesIO
|
||||
|
||||
import six
|
||||
from fs.osfs import OSFS
|
||||
@@ -49,16 +48,6 @@ etree.set_default_parser(edx_xml_parser)
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# VS[compat]
|
||||
# TODO (cpennington): Remove this once all fall 2012 courses have been imported
|
||||
# into the cms from xml
|
||||
def clean_out_mako_templating(xml_string):
|
||||
orig_xml = xml_string
|
||||
xml_string = xml_string.replace('%include', 'include')
|
||||
xml_string = re.sub(r"(?m)^\s*%.*$", '', xml_string)
|
||||
return xml_string
|
||||
|
||||
|
||||
class ImportSystem(XMLParsingSystem, MakoDescriptorSystem):
|
||||
def __init__(self, xmlstore, course_id, course_dir,
|
||||
error_tracker,
|
||||
@@ -171,10 +160,6 @@ class ImportSystem(XMLParsingSystem, MakoDescriptorSystem):
|
||||
xml_data.set('url_name', url_name)
|
||||
|
||||
try:
|
||||
# VS[compat]
|
||||
# TODO (cpennington): Remove this once all fall 2012 courses
|
||||
# have been imported into the cms from xml
|
||||
xml = clean_out_mako_templating(xml)
|
||||
xml_data = etree.fromstring(xml)
|
||||
|
||||
make_name_unique(xml_data)
|
||||
@@ -451,10 +436,6 @@ class XMLModuleStore(ModuleStoreReadBase):
|
||||
log.debug('========> Starting courselike import from %s', course_dir)
|
||||
with open(self.data_dir / course_dir / self.parent_xml) as course_file:
|
||||
|
||||
# VS[compat]
|
||||
# TODO (cpennington): Remove this once all fall 2012 courses have
|
||||
# been imported into the cms from xml
|
||||
course_file = BytesIO(clean_out_mako_templating(course_file.read()))
|
||||
|
||||
course_data = etree.parse(course_file, parser=edx_xml_parser).getroot()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user