Commit 80d8da60 by Piotr Mitros

Semantic title

parent a18b1960
......@@ -40,7 +40,8 @@ class VideoModule(XModule):
def get_html(self):
return render_to_string('video.html',{'streams':self.video_list(),
'id':self.item_id,
'position':self.position})
'position':self.position,
'title':self.title})
def get_init_js(self):
'''JavaScript code to be run when problem is shown. Be aware
......@@ -58,10 +59,11 @@ class VideoModule(XModule):
def __init__(self, xml, item_id, ajax_url=None, track_url=None, state=None, track_function=None, render_function = None):
XModule.__init__(self, xml, item_id, ajax_url, track_url, state, track_function, render_function)
self.youtube = etree.XML(xml).get('youtube')
self.title = etree.XML(xml).get('title')
self.position = 0
if state != None:
state = json.loads(state)
if 'position' in state:
self.position = int(float(state['position']))
log.debug("POSITION IN STATE")
log.debug(u"LOAD POSITION {0}".format(self.position))
#log.debug("POSITION IN STATE")
#log.debug(u"LOAD POSITION {0}".format(self.position))
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