From 645007f9100eba3ba377d5656be5b4f5152a5e6a Mon Sep 17 00:00:00 2001 From: polesye Date: Mon, 23 Dec 2013 13:03:18 +0200 Subject: [PATCH] BLD-364: Merge "video sources" and "download video" fields. --- CHANGELOG.rst | 3 + .../contentstore/features/video-editor.py | 2 +- cms/static/js/views/metadata.js | 1 - .../lib/xmodule/xmodule/tests/test_video.py | 24 +- common/lib/xmodule/xmodule/video_module.py | 59 +- .../courseware/tests/test_video_mongo.py | 570 ++++++++++++------ .../courseware/tests/test_video_xml.py | 1 + 7 files changed, 457 insertions(+), 203 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index eb43435c68..d41d47d750 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,9 @@ These are notable changes in edx-platform. This is a rolling list of changes, in roughly chronological order, most recent first. Add your entries at or near the top. Include a label indicating the component affected. +Blades: Change the download video field to a dropdown that will allow students +to download the first source listed in the alternate sources. BLD-364. + Blades: Change the track field to a dropdown that will allow students to download the transcript of the video without timecodes. BLD-368. diff --git a/cms/djangoapps/contentstore/features/video-editor.py b/cms/djangoapps/contentstore/features/video-editor.py index 5b4dffcdc0..4036f10351 100644 --- a/cms/djangoapps/contentstore/features/video-editor.py +++ b/cms/djangoapps/contentstore/features/video-editor.py @@ -40,12 +40,12 @@ def correct_video_settings(_step): # advanced ['Display Name', 'Video', False], - ['Download Video', '', False], ['End Time', '00:00:00', False], ['HTML5 Transcript', '', False], ['Show Transcript', 'True', False], ['Start Time', '00:00:00', False], ['Transcript Download Allowed', 'False', False], + ['Video Download Allowed', 'False', False], ['Video Sources', '', False], ['Youtube ID', 'OEoXaMPEzfM', False], ['Youtube ID for .75x speed', '', False], diff --git a/cms/static/js/views/metadata.js b/cms/static/js/views/metadata.js index 98646117d3..c98876c47d 100644 --- a/cms/static/js/views/metadata.js +++ b/cms/static/js/views/metadata.js @@ -106,7 +106,6 @@ function(BaseView, _, MetadataModel, AbstractEditor, VideoList) { } }, - getValueFromEditor : function () { return this.$el.find('#' + this.uniqueId).val(); }, diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index 116aad767a..8fc4aabef3 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -187,6 +187,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase): youtube="1.0:p2Q6BrNhdh8,0.75:izygArpw-Qo,1.25:1EeWXzPdhSA,1.5:rABDYkeK0x8" show_captions="false" download_track="true" + download_video="true" start_time="00:00:01" end_time="00:01:00"> @@ -207,6 +208,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase): 'youtube_id_1_0': 'p2Q6BrNhdh8', 'youtube_id_1_25': '1EeWXzPdhSA', 'youtube_id_1_5': 'rABDYkeK0x8', + 'download_video': True, 'show_captions': False, 'start_time': datetime.timedelta(seconds=1), 'end_time': datetime.timedelta(seconds=60), @@ -224,6 +226,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase): show_captions="false" download_track="false" start_time="00:00:01" + download_video="false" end_time="00:01:00"> @@ -240,7 +243,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase): 'end_time': datetime.timedelta(seconds=60), 'track': 'http://www.example.com/track', 'download_track': False, - 'source': 'http://www.example.com/source.mp4', + 'download_video': False, 'html5_sources': ['http://www.example.com/source.mp4'], 'data': '' }) @@ -269,7 +272,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase): 'end_time': datetime.timedelta(seconds=0.0), 'track': '', 'download_track': False, - 'source': 'http://www.example.com/source.mp4', + 'download_video': False, 'html5_sources': ['http://www.example.com/source.mp4'], 'data': '' }) @@ -291,7 +294,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase): 'end_time': datetime.timedelta(seconds=0.0), 'track': '', 'download_track': False, - 'source': '', + 'download_video': False, 'html5_sources': [], 'data': '' }) @@ -306,7 +309,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase):