aliyundocxblock/aliyundocxblock.py
def student_view(self, context=None):
        """
        The primary view of the AliyunDocXBlock, shown to students
        when viewing courses.
        """
        preview_url, download_url = self.get_aliyun_doc_url(self.url)
        context = {
            'display_name': self.display_name,
            'url': preview_url,
            'allow_download': self.allow_download,
            'source_text': self.source_text,
            'source_url': download_url
        }
        html = self.render_template("templates/html/aliyundocxblock.html", context)
        frag = Fragment(html)
        frag.add_css(self.resource_string("static/css/aliyundocxblock.css"))

        # Add i18n js
        statici18n_js_url = self._get_statici18n_js_url()
        if statici18n_js_url:
            frag.add_javascript_url(self.runtime.local_resource_url(self, statici18n_js_url))

        frag.add_javascript(self.resource_string("static/js/src/aliyundocxblock.js"))
        frag.initialize_js('AliyunDocXBlock')
        return frag

        The primary view of the AliyunDocXBlock, shown to students
        when viewing courses.
        
The primary view of the AliyunDocXBlock, shown to students
when viewing courses.
The primary view of the AliyunDocXBlock shown to students when viewing courses .
def student_view(self, context=None):
        preview_url, download_url = self.get_aliyun_doc_url(self.url)
        context = {
            'display_name': self.display_name,
            'url': preview_url,
            'allow_download': self.allow_download,
            'source_text': self.source_text,
            'source_url': download_url
        }
        html = self.render_template("templates/html/aliyundocxblock.html", context)
        frag = Fragment(html)
        frag.add_css(self.resource_string("static/css/aliyundocxblock.css"))
        statici18n_js_url = self._get_statici18n_js_url()
        if statici18n_js_url:
            frag.add_javascript_url(self.runtime.local_resource_url(self, statici18n_js_url))
        frag.add_javascript(self.resource_string("static/js/src/aliyundocxblock.js"))
        frag.initialize_js('AliyunDocXBlock')
        return frag
def student_view ( self , context = None ) : preview_url , download_url = self . get_aliyun_doc_url ( self . url ) context = { 'display_name' : self . display_name , 'url' : preview_url , 'allow_download' : self . allow_download , 'source_text' : self . source_text , 'source_url' : download_url } html = self . render_template ( "templates/html/aliyundocxblock.html" , context ) frag = Fragment ( html ) frag . add_css ( self . resource_string ( "static/css/aliyundocxblock.css" ) ) statici18n_js_url = self . _get_statici18n_js_url ( ) if statici18n_js_url : frag . add_javascript_url ( self . runtime . local_resource_url ( self , statici18n_js_url ) ) frag . add_javascript ( self . resource_string ( "static/js/src/aliyundocxblock.js" ) ) frag . initialize_js ( 'AliyunDocXBlock' ) return frag
The primary view of the AliyunDocXBlock, shown to students
when viewing courses.
The primary view of the AliyunDocXBlock shown to students when viewing courses .
"""
        The primary view of the AliyunDocXBlock, shown to students
        when viewing courses.
        """ # Add i18n js
self
context