From f17f9d386223eba1e4f6ca6d034a58cf62fe76d5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 19 Aug 2019 12:43:09 -0400 Subject: [PATCH] All of the fall 2012 courses have been imported by now. --- common/lib/xmodule/xmodule/modulestore/xml.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index 371280c866..fc31eda63a 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -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()