示例#1
0
 def get_context(self):
     _context = EditingMixin.get_context(self)
     _context.update({
         'markdown': self.markdown,
         'enable_markdown': self.markdown is not None,
         'enable_latex_compiler': self.use_latex_compiler,
     })
     return _context
示例#2
0
 def get_context(self):
     _context = EditingMixin.get_context(self)
     _context.update({
         'markdown': self.markdown,
         'enable_markdown': self.markdown is not None,
         'enable_latex_compiler': self.use_latex_compiler,
     })
     return _context
示例#3
0
 def get_context(self):
     """
     an override to add in specific rendering context, in this case we need to
     add in a base path to our c4x content addressing scheme
     """
     _context = EditingMixin.get_context(self)
     # Add some specific HTML rendering context when editing HTML modules where we pass
     # the root /c4x/ url for assets. This allows client-side substitutions to occur.
     _context.update({
         'base_asset_url': StaticContent.get_base_url_path_for_course_assets(self.location.course_key),
         'enable_latex_compiler': self.use_latex_compiler,
         'editor': self.editor
     })
     return _context