Commit 5b05ea88 by Calen Pennington

Revert "Make import work via mako again, to unblock others while I work on…

Revert "Make import work via mako again, to unblock others while I work on making the LMS work using XModuleDescriptors"

This reverts commit 6ebcfb63.
parent 19ba3ee6
......@@ -7,7 +7,6 @@ from keystore.django import keystore
from raw_module import RawDescriptor
from lxml import etree
from fs.osfs import OSFS
from mako.lookup import TemplateLookup
from path import path
from x_module import XModuleDescriptor, XMLParsingSystem
......@@ -28,6 +27,7 @@ class Command(BaseCommand):
org, course, data_dir = args
data_dir = path(data_dir)
with open(data_dir / "course.xml") as course_file:
class ImportSystem(XMLParsingSystem):
def __init__(self):
......@@ -53,7 +53,4 @@ class Command(BaseCommand):
keystore().update_children(module.url, module.definition['children'])
return module
lookup = TemplateLookup(directories=[data_dir])
template = lookup.get_template("course.xml")
course_string = template.render(groups=[])
ImportSystem().process_xml(course_string)
ImportSystem().process_xml(course_file.read())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment