Commit 4496143e by ichuang

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

course.xml if missing
parent e842c8ea
...@@ -37,6 +37,11 @@ class Module(XModule): ...@@ -37,6 +37,11 @@ class Module(XModule):
textlist=[i for i in textlist if type(i)==str] textlist=[i for i in textlist if type(i)==str]
return "".join(textlist) return "".join(textlist)
try: 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 filename="html/"+self.filename
return self.filestore.open(filename).read() return self.filestore.open(filename).read()
except: # For backwards compatibility. TODO: Remove except: # For backwards compatibility. TODO: Remove
......
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