Commit 4496143e by ichuang

for compatibility with cms, add ".html" to end of HTML pages in

course.xml if missing
parent e842c8ea
......@@ -36,6 +36,11 @@ class Module(XModule):
textlist=[xmltree.text]+[etree.tostring(i) for i in xmltree]+[xmltree.tail]
textlist=[i for i in textlist if type(i)==str]
return "".join(textlist)
try:
if not self.filename.endswith('.html'):
self.filename += '.html'
except:
log.exception('failed to add .html to HTML filename %s' % self.filename)
try:
filename="html/"+self.filename
return self.filestore.open(filename).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