changed 'from' and 'to' to 'start_time' and 'end_time'

This commit is contained in:
Lyla Fischer
2013-05-13 08:14:54 -04:00
committed by Valera Rozuvan
parent d68162f9fa
commit 56f60e06e4

View File

@@ -93,7 +93,7 @@ class VideoAlphaModule(VideoAlphaFields, XModule):
return result
def _get_timeframe(self, xmltree):
""" Converts 'from' and 'to' parameters in video tag to seconds.
""" Converts 'start_time' and 'end_time' parameters in video tag to seconds.
If there are no parameters, returns empty string. """
def parse_time(s):
@@ -107,7 +107,7 @@ class VideoAlphaModule(VideoAlphaFields, XModule):
minutes=x.tm_min,
seconds=x.tm_sec).total_seconds()
return parse_time(xmltree.get('from')), parse_time(xmltree.get('to'))
return parse_time(xmltree.get('start_time')), parse_time(xmltree.get('end_time'))
def handle_ajax(self, dispatch, get):
"""Handle ajax calls to this video.