Commit 8cf8dcd1 by Vasyl Nakvasiuk Committed by Valera Rozuvan

rm `videoalpha_list` method

parent 0b73f0a5
...@@ -39,7 +39,7 @@ class VideoAlphaModule(XModule): ...@@ -39,7 +39,7 @@ class VideoAlphaModule(XModule):
XModule.__init__(self, system, location, definition, descriptor, XModule.__init__(self, system, location, definition, descriptor,
instance_state, shared_state, **kwargs) instance_state, shared_state, **kwargs)
xmltree = etree.fromstring(self.definition['data']) xmltree = etree.fromstring(self.definition['data'])
self.youtube = xmltree.get('youtube') self.youtube_streams = xmltree.get('youtube')
self.sub = xmltree.get('sub') self.sub = xmltree.get('sub')
self.position = 0 self.position = 0
self.show_captions = xmltree.get('show_captions', 'true') self.show_captions = xmltree.get('show_captions', 'true')
...@@ -115,9 +115,6 @@ class VideoAlphaModule(XModule): ...@@ -115,9 +115,6 @@ class VideoAlphaModule(XModule):
#log.debug(u"STATE POSITION {0}".format(self.position)) #log.debug(u"STATE POSITION {0}".format(self.position))
return json.dumps({'position': self.position}) return json.dumps({'position': self.position})
def videoalpha_list(self):
return self.youtube
def get_html(self): def get_html(self):
if isinstance(modulestore(), MongoModuleStore): if isinstance(modulestore(), MongoModuleStore):
caption_asset_path = StaticContent.get_base_url_path_for_course_assets(self.location) + '/subs_' caption_asset_path = StaticContent.get_base_url_path_for_course_assets(self.location) + '/subs_'
...@@ -127,7 +124,7 @@ class VideoAlphaModule(XModule): ...@@ -127,7 +124,7 @@ class VideoAlphaModule(XModule):
caption_asset_path = "/static/{0}/subs/".format(self.metadata['data_dir']) caption_asset_path = "/static/{0}/subs/".format(self.metadata['data_dir'])
return self.system.render_template('videoalpha.html', { return self.system.render_template('videoalpha.html', {
'streams': self.videoalpha_list(), 'youtube_streams': self.youtube_streams,
'id': self.location.html_id(), 'id': self.location.html_id(),
'sub': self.sub, 'sub': self.sub,
'sources': self.sources, 'sources': self.sources,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div <div
id="video_${id}" id="video_${id}"
class="video" class="video"
data-streams="${streams}" data-streams="${youtube_streams}"
${'data-sub="{}"'.format(sub) if sub else ''} ${'data-sub="{}"'.format(sub) if sub else ''}
${'data-mp4-source="{}"'.format(sources.get('mp4')) if sources.get('mp4') else ''} ${'data-mp4-source="{}"'.format(sources.get('mp4')) if sources.get('mp4') else ''}
${'data-webm-source="{}"'.format(sources.get('webm')) if sources.get('webm') else ''} ${'data-webm-source="{}"'.format(sources.get('webm')) if sources.get('webm') else ''}
......
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