From 45e32107e74931c36b16ea0b90a556a8e95fa7ca Mon Sep 17 00:00:00 2001 From: Vasyl Nakvasiuk Date: Mon, 3 Jun 2013 11:11:08 +0300 Subject: [PATCH] video module: remove old methods --- common/lib/xmodule/xmodule/video_module.py | 20 ++-------------- .../courseware/tests/test_video_mongo.py | 24 +------------------ .../courseware/tests/test_video_xml.py | 2 -- 3 files changed, 3 insertions(+), 43 deletions(-) diff --git a/common/lib/xmodule/xmodule/video_module.py b/common/lib/xmodule/xmodule/video_module.py index 3bc565da8c..994611c676 100644 --- a/common/lib/xmodule/xmodule/video_module.py +++ b/common/lib/xmodule/xmodule/video_module.py @@ -1,3 +1,4 @@ +# pylint: disable=W0223 """Video is ungraded Xmodule for support video content.""" import json @@ -94,28 +95,11 @@ class VideoModule(VideoFields, XModule): return parse_time(xmltree.get('from')), parse_time(xmltree.get('to')) def handle_ajax(self, dispatch, get): - """Handle ajax calls to this video. - TODO (vshnayder): This is not being called right now, so the position - is not being saved. - """ + """This is not being called right now and we raise 404 error.""" log.debug(u"GET {0}".format(get)) log.debug(u"DISPATCH {0}".format(dispatch)) - if dispatch == 'goto_position': - self.position = int(float(get['position'])) - log.info(u"NEW POSITION {0}".format(self.position)) - return json.dumps({'success': True}) raise Http404() - def get_progress(self): - """TODO (vshnayder): Get and save duration of youtube video, then return - fraction watched. - (Be careful to notice when video link changes and update) - - For now, we have no way of knowing if the video has even been watched, so - just return None. - """ - return None - def get_instance_state(self): """Return information about state (position).""" return json.dumps({'position': self.position}) diff --git a/lms/djangoapps/courseware/tests/test_video_mongo.py b/lms/djangoapps/courseware/tests/test_video_mongo.py index f979ae2686..c041ccc151 100644 --- a/lms/djangoapps/courseware/tests/test_video_mongo.py +++ b/lms/djangoapps/courseware/tests/test_video_mongo.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" -import json - from . import BaseTestXmodule @@ -12,27 +10,7 @@ class TestVideo(BaseTestXmodule): TEMPLATE_NAME = "i4x://edx/templates/video/default" DATA = '